The speed of sound

In general, the speed of a mechanical wave is given by:
v = (
elastic property
inertial property
) ½
e.g., For a wave on a string:     v = (
T
μ
) ½

For sound waves the inertial factor is the density, ρ.

The relevant elastic property is the bulk modulus, B. This tells us how much a medium's volume changes when the pressure on it changes.
B = -
Δp
ΔV/V
Therefore the speed of sound is     v = (
B
ρ
) ½

The bulk modulus is a measure of how incompressible a material is. The higher the value, the less its volume changes when the pressure changes. Gases generally have small values of B, liquids have higher values, and solids even higher.

Some sample values of the speed of sound are:

Medium Speed of Sound (m/s)
Air (0 degrees C) 331
Air (20 degrees C) 343
Helium 965
Water 1402
Aluminum 6420
Steel 5941