Waves

Doppler Effect

Frequency shift from relative motion — higher pitch coming, lower going

The Doppler effect is the change in frequency observed when source or observer is moving relative to the medium. An approaching siren sounds higher; receding lower. Originally about sound (Doppler, 1842) but generalized to all waves. Used to measure velocity (radar, weather, blood flow), discover exoplanets, prove universe expansion (cosmological redshift), and check baseball pitches.

  • Source moving formulaf' = f · v/(v − v_source) (toward) or v/(v + v_source) (away)
  • Observer moving formulaf' = f · (v + v_obs)/v (toward) or (v − v_obs)/v (away)
  • Combinedf' = f · (v ± v_obs)/(v ∓ v_src)
  • DiscoveredChristian Doppler, 1842
  • Light Doppler (relativistic)f' = f · √((1+β)/(1−β)) where β = v/c
  • Cosmological redshiftStretching of light wavelengths in expanding universe

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.

Formulas

For sound (or any classical wave), with source speed v_s and observer speed v_o relative to medium (sign convention — positive when toward each other):

f' = f · (v + v_o) / (v − v_s)

where v is wave speed in medium.

Common cases:

SetupFrequency observed
Source moving toward stationary observerf' = f · v / (v − v_s) (higher)
Source moving away from stationary observerf' = f · v / (v + v_s) (lower)
Observer moving toward stationary sourcef' = f · (v + v_o) / v (higher)
Observer moving away from stationary sourcef' = f · (v − v_o) / v (lower)
Both moving toward each otherf' = f · (v + v_o) / (v − v_s)
Both moving same direction (source ahead, observer chasing)f' = f · (v − v_o) / (v − v_s)

Numerical examples

ScenarioDoppler shift
Ambulance siren (1 kHz, v_s = 30 m/s, approaching)f' = 1000 × 343/(343 − 30) ≈ 1096 Hz (+96 Hz)
Ambulance recedingf' ≈ 919 Hz (−81 Hz)
Pitch drop (passing): 1096 → 919 Hz, ratio 1.19Music interval ~3 semitones
Police radar (24 GHz, target at 30 m/s)Δf ≈ 4.8 kHz, easily measured
Distant galaxy (z = 0.1) recession speed~30,000 km/s
CMB photons we observeOriginally peaked in visible/UV; now microwave (z ≈ 1100)

Relativistic Doppler (for light)

For relative speed v (along line of sight), frequency observed:

f' = f · √((1 − β) / (1 + β))   (receding)
f' = f · √((1 + β) / (1 − β))   (approaching)

where β = v/c. As v → c, redshift z = (λ' − λ)/λ → ∞.

For non-radial motion (transverse), there's a transverse Doppler shift even with no radial velocity (purely relativistic effect, no classical analog).

JavaScript — Doppler calculations

// Classical Doppler (sound)
function classicalDoppler(f_source, v_wave, v_source, v_observer, approach = true) {
  // Convention: speeds are magnitudes; approach=true if motion brings them together
  if (approach) {
    return f_source * (v_wave + v_observer) / (v_wave - v_source);
  } else {
    return f_source * (v_wave - v_observer) / (v_wave + v_source);
  }
}

// Approaching ambulance, 1000 Hz siren, 30 m/s
console.log(`Ambulance approach: ${classicalDoppler(1000, 343, 30, 0, true).toFixed(0)} Hz`); // 1096
console.log(`Ambulance recede: ${classicalDoppler(1000, 343, 30, 0, false).toFixed(0)} Hz`); // 919

// Speed from observed Doppler shift (radar)
function speedFromRadarShift(deltaF, f_source) {
  // Reflected wave: factor 2
  // Δf/f = 2v/c → v = c·Δf/(2f)
  const c = 3e8;
  return c * deltaF / (2 * f_source);
}

console.log(`Δf = 4 kHz at 24 GHz: speed = ${speedFromRadarShift(4000, 24e9).toFixed(2)} m/s`); // 25
console.log(`= ${(speedFromRadarShift(4000, 24e9) * 3.6).toFixed(0)} km/h`); // 90 km/h

// Relativistic Doppler
function relativisticDoppler(f_source, v_relative, c = 3e8) {
  const beta = v_relative / c;
  // Negative beta = receding; positive = approaching
  if (beta < 0) {
    return f_source * Math.sqrt((1 + beta) / (1 - beta));
  } else {
    return f_source * Math.sqrt((1 + beta) / (1 - beta));
  }
}

// Galaxy at 30,000 km/s (z = 0.1)
console.log(`Galaxy 30,000 km/s: f' = ${(relativisticDoppler(1, -3e7).toFixed(4))}`);  // ~0.905

// Cosmological redshift
function redshift(z) {
  // z = (λ_obs - λ_emit) / λ_emit; v ≈ z·c for small z
  return z * 3e8;  // approximate recession speed
}

console.log(`z=0.5: v ≈ ${(redshift(0.5)/1000).toFixed(0)} km/s`);  // 150,000

// Rectifying for very high z
function highZRedshiftSpeed(z) {
  // Special relativity: 1+z = √((1+β)/(1−β))
  // Solve for β
  const sq = (1 + z) * (1 + z);
  return (sq - 1) / (sq + 1);  // β = v/c
}

console.log(`z=1: β = ${highZRedshiftSpeed(1).toFixed(3)}`); // 0.6 (60% of c)
console.log(`z=10: β = ${highZRedshiftSpeed(10).toFixed(3)}`); // 0.984

// Doppler effect on sound from passing car
function passingCarPitch(f, v_car, v_sound = 343) {
  return {
    approaching: f * v_sound / (v_sound - v_car),
    passing: f,  // when momentarily perpendicular
    receding: f * v_sound / (v_sound + v_car)
  };
}

console.log(passingCarPitch(440, 30));  // approach 482, recede 405 Hz

Where Doppler effect shows up

  • Radar. Police speed measurement, military tracking, weather radar (storm motion).
  • Astronomy. Stellar radial velocities, exoplanet detection, galaxy recession (cosmological redshift), 21-cm line in radio astronomy.
  • Medicine. Doppler ultrasound — measure blood flow velocity, fetal heart monitoring, vascular imaging.
  • Aviation. Air traffic control, military targeting, weather avoidance.
  • Sports. Baseball pitch radars, tennis serves, formula 1 telemetry.
  • Cosmology. Hubble's law (recession velocity ∝ distance), CMB studies, dark energy.
  • Music. Pitch-shifting effects in sirens, train whistles — distinctive "doppler" feel as object passes.

Common mistakes

  • Wrong sign convention. Source approaching observer raises pitch (smaller denominator). Don't flip the sign accidentally.
  • Using classical formula for high speeds. Classical Doppler (with v/v_wave) breaks at v_wave. For light at relativistic speeds, must use special-relativistic formula.
  • Ignoring difference between source and observer motion. Source motion gives one shift; observer motion gives slightly different. For small v/v_wave, they're nearly equal; otherwise, they differ.
  • Using radial component only. Doppler depends on velocity COMPONENT along line of sight. Transverse motion doesn't shift frequency (in classical) or has only a tiny relativistic shift.
  • Confusing redshift z and recession velocity. z = Δλ/λ. For small z, v ≈ zc. For large z (e.g., z > 1), need relativistic formula. For very large z (early universe), space itself expanded, not just motion.
  • Forgetting medium dependence for sound. Doppler frequency depends on the medium's wave speed. Same source-observer geometry in air vs water gives different shifts because c_sound differs.

Frequently asked questions

Why does the pitch shift?

Sound speed is fixed by the medium. A moving source emits sound at fixed times, but each emission is at a different position. Approaching source — successive wavefronts compressed (shorter λ → higher f). Receding source — wavefronts stretched (longer λ → lower f). Same idea for any wave.

How does Doppler radar measure speed?

Send out radar pulse at known frequency. Reflected wave from moving target has frequency shifted by Doppler. Δf = 2v·f/c (factor of 2 because reflected wave gains another shift). For 24 GHz radar, 60 mph (~27 m/s) gives Δf ≈ 4.3 kHz — easily measured. Used by police, weather radar, traffic.

What's the cosmological redshift?

All distant galaxies appear redshifted (light stretched to longer λ). This is from the expanding universe — space itself stretches between us and distant galaxies, lengthening light's wavelength as it travels. Hubble (1929) found redshift proportional to distance — universe is expanding. Distinct from regular Doppler (galaxies aren't moving through space, space is expanding).

Why does the speed of light matter?

For light, the Doppler formula must use special relativity. Classical Doppler over-corrects. Relativistic formula — f' = f · √((1+β)/(1−β)) for radial motion, where β = v/c. For low v (β &lt;&lt; 1), reduces to classical. For high v (β → 1), redshifts approach infinity. Used in astrophysics for high-velocity objects.

How do you discover exoplanets via Doppler?

A planet's gravity pulls on its star, causing the star to wobble. The star's spectrum shows tiny periodic Doppler shifts as it moves toward/away from us. Wavelength shifts as small as 1 m/s detectable by modern spectrographs (HARPS, ESPRESSO). Most exoplanets pre-2012 found this way.

Why does an ambulance pitch suddenly drop as it passes?

While approaching, you hear higher f (compressed wavefronts). When passing, the velocity component toward you switches to away. Pitch drops to lower f. The transition isn't instantaneous — depends on the angle. Sometimes a sweep through pitches as the angle changes.

How fast can sound's Doppler effect be?

As source approaches sound speed (~Mach 1), classical formula gives infinite frequency at v = sound speed. Beyond Mach 1, behind the source there's a region with no sound (it's faster than the sound it produces). Sonic boom occurs at the wavefront cone. Relativistic Doppler doesn't have these issues for light.