In school they teach the speed of sound is 1,126 feet per second. That is only part of the story and it is only partially true. The reason for this is that the speed of sound changes.
The factors that effect the speed of sound are not random effects based on a whim but exact scientific principles that effect the speed of sound. The exact number 1,126 feet per second is taken in some precise conditions: in dry air at 68% Fahrenheit. In other words in the most “average” conditions possible. Therefore a great average, but it is variable.
Here are the factors that effect the speed of sound:
Medium has a huge effect of the speed of sound. When most people discuss the “speed of sound” they are talking about the propagation of sound waves through the medium of “Air”. For anyone who has gone underwater and listen to people talking above it is likely that one would notice the muted an “odd” way that voices sound underwater. This is because the “medium” of water greatly bends, distorts and changes the speed of sound wave.
There is a whole aspect of science that measure and defines the effect of different mediums (gaseous and liquid) on the speed of sound. This is called Fluid Dynamics. Underwater communication is possible if you understand how this wave propagation as well as another important factor (pressure).
Because of elasticity of materials sound will, as a rule of thumb, generally travel faster in solids than in liquids and faster in liquids than in gases.
Temperature has a large effect on the speed of sound. Not as much as the “Medium” does, but far more than anything else. Temperature affects the speed of sound because temperature can affect the “elastic” qualities of different mediums. At the very basics lower temperatures will decrease the speed of sound while higher temperatures will increase the speed of sound, all other factors being equal.
Pressure is the final factor that has a significant impact on the speed of sound. The effect of pressure on the speed of sound is due to the materials inertial properties. In short, the more pressure that is applied to the material or medium the denser it becomes and the greater the “inertia” becomes. This makes any interactions between particles slower. Therefore the speed of sound throughout the medium is slowed due to the greater pressure.