The speed of sound depends on the elasticity and density of the medium through which it is traveling. In general, sound travels faster in liquids than in gases and faster in solids than in liquids. The greater the elasticity and the lower the density, the faster sound travels in a medium. The mathematical relationship is speed = (elasticity/density).
The effect of elasticity and density on the speed of sound can be seen by comparing the speed of sound in air, hydrogen, and iron. Air and hydrogen have nearly the same elastic properties, but the density of hydrogen is less than that of air. Sound thus travels faster (about 4 times as fast) in hydrogen than in air. Although the density of air is much less than that of iron, the elasticity of iron is very much greater than that of air. Sound thus travels faster (about 14 times as fast) in iron than in air.
The speed of sound in a material, particularly in a gas or liquid, varies with temperature because a change in temperature affects the material's density. In air, for example, the speed of sound increases with an increase in temperature. At 32 °F. (0 °C.), the speed of sound in air is 1,087 feet per second (331 m/s); at 68 °F. (20 °C.), it is 1,127 feet per second (343 m/s).
The terms subsonic and supersonic refer to the speed of an object, such as an airplane, in relation to the speed of sound in the surrounding air. A subsonic speed is below the speed of sound; a supersonic speed, above the speed of sound. An object traveling at supersonic speed produces shock waves rather than ordinary sound waves. A shock wave is a compression wave that, when produced in air, can usually be heard as a sonic boom.
The speeds of supersonic objects are often expressed in terms of Mach number—the ratio of the object's speed to the speed of sound in the surrounding air. Thus an object traveling at Mach 1 is traveling at the speed of sound; at Mach 2 it is traveling at twice the speed of sound.