Sub topic 3
How fast sound travels
This chapter assumes you know basic algebra, the relation v = fλ for waves, and how to work with units. You do not need any earlier chapter beyond the idea of sound as a pressure wave. By the end you should be able to estimate the speed of sound in air from temperature, explain why it differs between gases, liquids, and solids, and avoid the usual mistakes when using it.
What sets the speed of a wave
A wave's speed is a property of the medium, not of the source. A louder sound or a higher pitch does not travel faster. The speed depends on two things:
- How strongly the medium pushes back when it is compressed. This is its stiffness.
- How much inertia the medium has. This is its density.
A stiffer medium restores itself faster, so the wave moves faster. A denser medium responds more slowly, so the wave moves slower. In general form:
v = √(stiffness / density)
For a fluid (a gas or a liquid), the stiffness is the bulk modulus B. This is the pressure increase needed to produce a given fractional decrease in volume. The speed is
v = √(B / ρ)
where ρ is the density in kg/m³ and B is in pascals (Pa).
For a long solid rod, the stiffness is Young's modulus E, and the speed is
v = √(E / ρ)
In a bulk solid, which can also resist shearing and is not free to bulge sideways, the effective stiffness is larger still. Solids also carry transverse (shear) waves at a lower speed. This chapter focuses on the longitudinal sound wave.
Why frequency does not change the speed
In ordinary conditions, the speed of sound is nearly the same for all audible frequencies. This is why a distant orchestra sounds in tune: the bass notes and the piccolo arrive together. The relation v = fλ still holds, but when you change the frequency, the wavelength changes to compensate.
| Frequency | Wavelength in air at 20 °C (v ≈ 343 m/s) |
|---|---|
| 20 Hz | 17.2 m |
| 440 Hz | 0.78 m |
| 1000 Hz | 0.34 m |
| 20 000 Hz | 0.017 m |
When you change medium, the frequency stays the same, because the source sets it. The speed and wavelength change together. A sound going from air into water keeps its frequency and gains a much longer wavelength.
Speed of sound in air
For an ideal gas, the bulk modulus under a fast compression is γP, where P is the pressure and γ is the ratio of specific heats (about 1.4 for air). Sound oscillations are fast, so heat has no time to flow between compressed and expanded regions. The process is close to adiabatic, which is why γ appears. Newton's early calculation assumed constant temperature and gave a value about 15% too low. Laplace corrected it by using the adiabatic case.
Using the ideal gas law, P/ρ = RT/M, where R is the gas constant, T is the absolute temperature in kelvin, and M is the molar mass. The speed becomes
v = √(γRT / M)
Two results follow:
- Pressure and density cancel. At a fixed temperature, compressing air or thinning it does not change the speed of sound much. Altitude matters because temperature drops with height, not because pressure does.
- The speed grows as √T. Warm air carries sound faster.
A practical formula
Near everyday temperatures, this square-root law is well approximated by a straight line:
v ≈ 331.3 + 0.606 T
where T is the temperature in °C and v is in m/s. This is the formula used in the code below. It gives 343.4 m/s at 20 °C.
import math
def speed_of_sound_air(temp_c):
"""Approximate speed of sound in dry air, in m/s (good near everyday temperatures)."""
return 331.3 + 0.606 * temp_c
def speed_of_sound_ideal(temp_c, gamma=1.4, molar_mass=0.02897):
"""Speed from v = sqrt(gamma * R * T / M), for an ideal gas."""
R = 8.314 # J/(mol K)
T = temp_c + 273.15
return math.sqrt(gamma * R * T / molar_mass)
for t in (-20, 0, 20, 40):
print(t, round(speed_of_sound_air(t), 1), round(speed_of_sound_ideal(t), 1))Running this prints:
-20 319.2 319.1
0 331.3 331.3
20 343.4 343.2
40 355.5 355.3The two methods agree to within about 0.2 m/s across this range. The linear formula would drift further from the true value at extreme temperatures, for example at 500 °C, so use the square-root form there.
Humidity and composition
Moist air is slightly less dense than dry air at the same temperature, because water vapor (molar mass 18) replaces some nitrogen and oxygen (28 and 32). That raises the speed of sound by a fraction of a percent at ordinary temperatures, and by more in hot, humid air. The temperature effect usually dominates.
The gas itself matters. Helium has a molar mass of about 0.004 kg/mol and a γ of about 1.67. The formula gives roughly 1000 m/s at room temperature, about three times the speed in air. This is why a voice sounds high after inhaling helium: the vocal tract resonates at higher frequencies because the wave speed is higher, while the vocal folds still vibrate at nearly the same rate.
Speed of sound in liquids and solids
Liquids and solids are far stiffer than gases, and the stiffness more than makes up for their higher density. The result is faster sound.
| Medium | Approximate speed (m/s) | Notes |
|---|---|---|
| Air, 0 °C | 331 | Dry |
| Air, 20 °C | 343 | Dry |
| Helium, 20 °C | 1000 | Low molar mass |
| Fresh water, 20 °C | 1480 | Rises with temperature |
| Seawater, 20 °C | 1520 | Rises with salinity and pressure |
| Ice | about 3200 | Longitudinal, bulk |
| Aluminum | about 6400 | Bulk longitudinal |
| Steel | about 5900 | Bulk longitudinal |
| Granite | about 5800 | Varies with the rock |
Treat these as typical values. Real materials vary with alloy, grain, and impurities.
A useful check is to compute the speed from the formula. For water, B ≈ 2.2 × 10⁹ Pa and ρ ≈ 998 kg/m³.
import math
def fluid_speed(bulk_modulus_pa, density_kg_m3):
return math.sqrt(bulk_modulus_pa / density_kg_m3)
print(round(fluid_speed(2.2e9, 998))) # water: about 1485 m/s
print(round(fluid_speed(1.42e5, 1.204))) # air at 20 C: about 343 m/sThe air value uses B = γP = 1.4 × 101 325 Pa ≈ 1.42 × 10⁵ Pa. Water's bulk modulus is about 15 000 times larger than air's, while its density is only about 830 times larger. The ratio B/ρ is therefore about 18 times larger, and the speed about 4.3 times larger.
Water temperature is different from air temperature
In air, warmer means faster, following √T. In water, the speed also rises with temperature, but by a different mechanism and at a different rate: roughly 3 m/s per °C near room temperature. It also rises with salinity and with depth, since pressure stiffens the water. Do not reuse the air formula for water.
Reading the numbers: delays and distances
Because v is known, timing a sound gives distance. The distance is d = vt for one-way travel.
A common example is lightning. Light arrives almost instantly, so the delay between flash and thunder is the sound's travel time. With v ≈ 343 m/s, each second of delay is about 343 m, so about 3 seconds per kilometer.
def distance_from_delay(delay_s, temp_c=20.0):
v = 331.3 + 0.606 * temp_c
return v * delay_s
print(round(distance_from_delay(6.0))) # about 2060 m
print(round(distance_from_delay(6.0, -10.0))) # about 1960 mThe same 6 s delay corresponds to a distance about 100 m shorter on a cold day. If you need accuracy, use the actual temperature.
For an echo, the sound travels out and back, so the distance to the reflecting surface is d = vt/2. Forgetting the factor of 2 is another frequent error.
Common errors and edge cases
- Treating speed as dependent on loudness or pitch. In normal conditions, it is not. Extremely intense sound (shock waves, covered later in the course) is the exception.
- Using 343 m/s everywhere. That value is for dry air at 20 °C. Use the temperature formula when the temperature differs much.
- Expecting pressure to change the speed in air. At constant temperature, it barely does.
- Mixing temperature units. Celsius in the linear formula, kelvin in the square-root formula.
- Forgetting that wavelength changes at a boundary. Frequency is fixed by the source. Speed changes, so wavelength changes.
- Wind. The formulas give the speed relative to the air. If the air moves, add the wind's component along the direction of travel to get the speed relative to the ground.
- Dispersion. In some media, such as thin rods under bending, or at very high frequencies, the speed depends on frequency. The simple relation v = fλ still holds at each frequency, but v is not a single number.
A worked example
A hiker shouts toward a cliff on a day when the air is 5 °C. The echo returns 3.2 s later. How far away is the cliff?
- Compute the speed: v = 331.3 + 0.606 × 5 = 334.3 m/s.
- The sound travels out and back, so the total path is vt = 334.3 × 3.2 ≈ 1070 m.
- The cliff is half of that: about 535 m away.
If you had used 343 m/s, you would have got 549 m, an error of about 14 m, or 2.6%.
Exercise
A sound with frequency 500 Hz travels from air at 20 °C (v = 343 m/s) into fresh water (v = 1480 m/s). What is its frequency in the water, and what is its wavelength in each medium?
Show answer
The frequency stays 500 Hz because the source sets it. In air, λ = 343 / 500 = 0.686 m. In water, λ = 1480 / 500 = 2.96 m. The wavelength is about 4.3 times longer in water.
Exercise
At what air temperature in °C does the speed of sound equal 350 m/s, using v = 331.3 + 0.606 T?
Show answer
Solve 350 = 331.3 + 0.606 T. Then T = (350 − 331.3) / 0.606 = 18.7 / 0.606 ≈ 30.9 °C.
Exercise
A ship's sonar sends a pulse straight down. The echo from the sea floor returns after 0.80 s. Taking the speed of sound in seawater as 1520 m/s, how deep is the water?
Show answer
The pulse travels down and back, so the depth is d = vt/2 = 1520 × 0.80 / 2 = 608 m.
Exercise
Using v = √(γRT/M), by what factor does the speed of sound in air change when the absolute temperature doubles?
Show answer
The speed scales as √T, so it increases by a factor of √2 ≈ 1.41.