Variation of Speed of Sound in Gases, Liquids and Solids

The speed of sound is not a constant, even in air. This is because of the nature of sound - it arises because atoms and molecules hit each other and make them move faster.
If the temperature increase atoms move faster and vibrate more.
ATOMS MOVING FASTER TRANSLATES DIRECTLY INTO A HIGHER SPEED OF SOUND!
If the pressure increases, the number of collisions between atoms increases. The speed of the air atoms and molecules does not increase however, and the speed of sound does not change.
THE SPEED OF SOUND DOES NOT DEPEND ON PRESSURE!
If the density of a substance increases, then for a fixed temperature the speed of atoms and molecules decreases. THE SPEED OF SOUND DECREASES WITH INCREASING TEMPERATURE!
If atoms and molecules are more closely packed then vibrations are transmitted faster. This is because the speed of sound is closely related to the time of collision. Gas molecules are far apart, and can exchange energy between electrostatic and kinetic energy, which increases the time of collision. In liquids, the atoms and molecules are closer together, and the less exchange of energy, and in solids even less so.
SOUND TRAVELS FASTER IN LIQUIDS AND EVEN FASTER IN SOLIDS!