Waves

Sound Waves

Longitudinal pressure waves in matter — what we hear, see in oscilloscopes, and use in sonar

Sound waves are longitudinal pressure variations propagating through a medium (air, water, solids). Frequencies 20-20,000 Hz are audible to humans. Speed depends on the medium — 343 m/s in air, 1480 m/s in water, 5,000+ m/s in steel. Sound intensity in decibels (logarithmic scale). Carries information about everything from speech to sonar to musical instruments.

  • Sound is longitudinalCompression and rarefaction along propagation direction
  • Audible range (humans)20 Hz - 20 kHz (varies with age)
  • Speed in air (20°C)343 m/s
  • Decibel scaledB = 10·log₁₀(I/I_ref); I_ref = 10⁻¹² W/m²
  • Threshold of pain~120 dB (jet engine close)
  • Doppler shiftf_observed = f·(v ± v_observer)/(v ∓ v_source)

Interactive visualization

Press play, or step through manually. The visualization is yours to drive — try it before reading on.

Open visualization fullscreen ↗

Watch the 60-second explainer

A condensed visual walkthrough — narrated, captioned, under a minute.

Basics

Sound waves are longitudinal pressure variations. As a sound wave passes, molecules oscillate back and forth along the direction of wave propagation — alternately compressing and rarefying the medium.

For sinusoidal sound:

p(x, t) = p_max · sin(kx − ωt)

where p is pressure variation from atmospheric (small — sound at threshold of hearing is ~10⁻⁵ Pa, vs 10⁵ Pa atmospheric).

Speed in different media

MediumSpeed
Air (0°C)331 m/s
Air (20°C)343 m/s
Air (100°C)387 m/s
Helium (20°C)1,007 m/s
Water (fresh, 20°C)1,482 m/s
Seawater (20°C)1,531 m/s
Iron5,120 m/s
Aluminum6,420 m/s
Diamond12,000 m/s

Speed in air increases ~0.6 m/s per °C. Cold winter air → slightly slower sound (and more sound bending due to thermal layers).

Frequency ranges

RangeFrequenciesExamples
Infrasound< 20 HzVolcanic activity, large explosions, earthquake aftershocks
Audible to humans20 Hz - 20 kHzMusic, speech, ambient sounds
Speech (humans)~85-255 Hz fundamental, harmonics to ~3 kHz
Bass guitar low E~41 Hz
A4 (concert pitch)440 HzTuning standard
Soprano top note~1300 Hz
Ultrasound (cleaning)20-40 kHzLab instruments, jewelry cleaners
Medical ultrasound1-20 MHzImaging
Bat echolocation9-150 kHzHunt insects

Intensity and decibels

Sound intensity I (W/m²) measures power per unit area. The decibel scale:

L = 10 · log₁₀(I / I_ref)

where I_ref = 10⁻¹² W/m² (threshold of hearing at 1 kHz).

SoundApproximate dB
Threshold of hearing0
Whisper at 1 m30
Normal conversation60
City traffic80
Lawnmower90
Chainsaw110
Threshold of pain120
Jet engine at 30 m140
Stun grenade170
Krakatoa eruption (1883)~310 dB at source

JavaScript — sound calculations

// Sound speed in air (Celsius)
function soundSpeedInAir(T_C) {
  return 331.4 + 0.6 * T_C;  // approximate
}

console.log(`Sound at 20°C: ${soundSpeedInAir(20).toFixed(0)} m/s`); // 343
console.log(`Sound at 0°C: ${soundSpeedInAir(0).toFixed(0)} m/s`); // 331
console.log(`Sound at 100°C: ${soundSpeedInAir(100).toFixed(0)} m/s`); // 391

// Wavelength of sound at given frequency in air
function soundWavelength(frequency, soundSpeed = 343) {
  return soundSpeed / frequency;
}

console.log(`A4 (440 Hz): λ = ${soundWavelength(440).toFixed(2)} m`); // 0.78
console.log(`Bass (100 Hz): λ = ${soundWavelength(100).toFixed(2)} m`); // 3.43
console.log(`20 kHz: λ = ${(soundWavelength(20000) * 1000).toFixed(0)} mm`); // 17

// dB calculations
function intensityToDecibels(intensity) {
  return 10 * Math.log10(intensity / 1e-12);
}

function decibelsToIntensity(dB) {
  return 1e-12 * Math.pow(10, dB / 10);
}

console.log(`Conversation 60 dB: ${decibelsToIntensity(60).toExponential(2)} W/m²`);  // 10⁻⁶
console.log(`Two 60 dB sources: ${intensityToDecibels(2 * 1e-6).toFixed(2)} dB`);  // 63 dB

// Adding sounds in dB (intensities add)
function addDB(dB1, dB2) {
  return 10 * Math.log10(Math.pow(10, dB1/10) + Math.pow(10, dB2/10));
}

console.log(`Two 70 dB sources: ${addDB(70, 70).toFixed(2)} dB`);  // 73 dB
console.log(`70 dB + 80 dB: ${addDB(70, 80).toFixed(2)} dB`);  // 80.4 dB

// Sound pressure to dB (atmospheric pressure → effective)
function pressureToDB(pressure_Pa) {
  const p_ref = 20e-6;  // 20 µPa = threshold
  return 20 * Math.log10(pressure_Pa / p_ref);
}

console.log(`Whisper 20 mPa = ${pressureToDB(0.02).toFixed(0)} dB`);
console.log(`Conversation 0.02 Pa = ${pressureToDB(0.02).toFixed(0)} dB`);
console.log(`Jet 200 Pa = ${pressureToDB(200).toFixed(0)} dB`);

// Distance estimation from echo timing
function distanceFromEcho(timeDelay, soundSpeed = 343) {
  // Echo time = 2× distance / speed
  return timeDelay * soundSpeed / 2;
}

console.log(`0.1 s echo: ${distanceFromEcho(0.1).toFixed(1)} m`);
console.log(`1 s echo: ${distanceFromEcho(1).toFixed(0)} m`);

// Sonar depth from echo
function sonarDepth(timeDelay) {
  // Water sound speed
  return distanceFromEcho(timeDelay, 1500);
}

console.log(`0.5 s sonar: ${sonarDepth(0.5)} m`);  // 375 m

// Frequency from string vibration
function stringFrequency(L, tension, mass_per_length, harmonic = 1) {
  const v = Math.sqrt(tension / mass_per_length);
  return harmonic * v / (2 * L);
}

// Guitar A string: 0.65m, ~80 N tension, ~0.005 kg/m
console.log(`Guitar A: ${stringFrequency(0.65, 80, 0.005).toFixed(1)} Hz`); // ~97 Hz

Where sound matters

  • Communication. Speech, music, telephony, broadcast.
  • Acoustic engineering. Concert halls, recording studios, noise control, hearing aids.
  • Sonar. Marine navigation, fish finding, submarine detection.
  • Medical imaging. Ultrasound for prenatal, cardiac, abdominal imaging — uses MHz-frequency sound.
  • Industrial NDT. Ultrasonic detection of cracks/voids in materials.
  • Music. Instrument design, audio engineering, sound synthesis.
  • Animal communication. Bat echolocation, dolphin sonar, bird song.

Common mistakes

  • Treating dB as linear. dB is logarithmic. 60 dB is 10⁶× more intense than 0 dB. Doubling intensity adds ~3 dB, not 60.
  • Forgetting Doppler effect for moving sources. Moving source/observer → frequency shift. Don't ignore for ambulances, jets, sports physics.
  • Ignoring medium dependence. Sound speed varies dramatically: 343 m/s in air, 5000+ in steel. Pitch from a string in water vs air differs.
  • Confusing sound and ultrasound. Both are pressure waves; just different frequencies. Audible 20-20k Hz; ultrasonic above 20 kHz.
  • Conflating loudness with intensity. Loudness is psychoacoustic (perception), influenced by frequency. Intensity is physical (W/m²). The ear is most sensitive at 1-4 kHz.
  • Confusing dB SPL with dB other. dB scales depend on reference. dB SPL (sound pressure) uses 20 µPa. dB SIL (sound intensity) uses 10⁻¹² W/m². dB(A) is A-weighted (mimics ear response).

Frequently asked questions

Why is sound longitudinal?

Sound propagates by compressing and rarefying the medium (gas molecules getting closer together, then farther apart). Direction of medium oscillation is parallel to wave propagation. In contrast, light is transverse — electric and magnetic fields perpendicular to propagation. Some seismic waves are longitudinal (P-waves), others transverse (S-waves).

Why does sound travel faster in solids than gases?

In solids, molecules are tightly bound — small displacement causes strong restoring force. In gases, molecules are far apart and weakly interacting — slow restoring response. Sound speed v = √(stiffness/density). Steel: stiff (E ≈ 200 GPa) and dense (7850 kg/m³). Air: not stiff (B ≈ 0.14 MPa) and very low density (1.2 kg/m³). Steel sound speed ~5000 m/s vs air 343 m/s.

What's the decibel scale and why is it logarithmic?

Sound intensity ranges over 12+ orders of magnitude (whisper to jet engine). Logarithmic dB compresses this. dB = 10·log₁₀(I/I_ref) where I_ref = 10⁻¹² W/m² (threshold of human hearing at 1 kHz). Each 10 dB is 10× more intensity, but only ~2× loudness perceived (subjective). 20 dB increase = 100× intensity = ~4× loudness.

What are common sound levels?

0 dB — silent room. 30 dB — quiet library. 60 dB — normal conversation. 80 dB — heavy traffic. 100 dB — chainsaw. 120 dB — jet engine close. 140 dB — instant hearing damage. Sustained exposure above 85 dB causes long-term hearing loss.

How does sound carry information?

Frequency content (timbre, pitch), amplitude (loudness), spatial distribution (binaural cues — slight phase/intensity difference between ears for direction). Speech analyzed via formant frequencies (vocal tract resonances). Music carries rhythm, melody, harmony. Modern audio uses spectrograms (frequency vs time) for analysis.

What happens to sound when it crosses a medium boundary?

Some reflects, some refracts (changes speed in new medium). Same general principles as light, but with sound's typical wavelengths (cm to meters) being much larger than atomic structures. Echoes occur from reflective surfaces. Speed-of-sound changes in stratified atmosphere or ocean cause sound rays to curve (refraction).

How is sound used in technology?

Sonar (water depth, fish finding, military). Ultrasound imaging (medical, prenatal). Speech recognition (frequency analysis). Audio equipment (microphones convert pressure to voltage; speakers do the reverse). Noise cancellation (destructive interference). Industrial — detecting cracks (ultrasonic NDT), thickness measurements.