For sound, the Doppler formula depends on who moves: the source, or the listener, relative to the air. Light has no medium, so only the relative velocity of source and observer can matter. The relativistic formula combines the crowding of wavefronts with time dilation of the source's own clock. Astronomers use it to measure how fast galaxies, stars and quasars move along our line of sight.
🔑 Key idea
With $\beta = v/c$ the speed of approach, $$f = f_0\sqrt{\frac{1 + \beta}{1 - \beta}}\qquad(\text{approaching}),$$ and for a receding source, swap the signs: $f = f_0\sqrt{\frac{1 - \beta}{1 + \beta}}$. In wavelengths, a receding source gives $\lambda = \lambda_0\sqrt{\frac{1 + \beta}{1 - \beta}}$, a redshift $z = \frac{\lambda - \lambda_0}{\lambda_0}$.
💡 Why it works
Let a source recede at $v$ and emit wave crests every $T_0$ by its own clock. In our frame its clock runs slow, so crests leave every $\gamma T_0$. Between crests the source moves $v\gamma T_0$ farther away, so each crest has an extra distance to travel, and the crests arrive spaced by $$\lambda = (c + v)\gamma T_0 = \lambda_0(1 + \beta)\gamma = \lambda_0\frac{1 + \beta}{\sqrt{(1 - \beta)(1 + \beta)}} = \lambda_0\sqrt{\frac{1 + \beta}{1 - \beta}}.$$ The same steps for an approaching source give the inverse factor. Work it out instead from a moving observer's point of view and you get the same answer, as postulate 1 requires.
Waves from an approaching and a receding source. At $\beta = 0.3$, approach raises the frequency by a factor of 1.36 and recession lowers it to 0.73 of the original.
Worked examples
✏️ Worked example: A receding galaxy
Hydrogen's red line has $\lambda_0 = 656.3$ nm. Where does it appear in the spectrum of a galaxy receding at $0.10c$?
They differ by the time-dilation factor $\gamma = 1.25$: $2.50/1.25 = 2.00$.
Answer: The frequency doubles, not $2.5\times$
For large cosmic redshifts, most of the shift comes from the expansion of space itself rather than motion through space, so $z = 0.50$ is better read with cosmology (see the Astrophysics course). For stars and nearby galaxies, the formula here is the right one.
⚠️ Common mistake
Using the sound Doppler formula for light. For sound, a moving source and a moving listener give different answers, because the air picks out a frame. Light has no such frame, and its formula depends only on the relative speed, with time dilation built in. Check: for light, approaching at $\beta$ and then receding at $\beta$ must give factors that are exact reciprocals.
Practice
Pass with 3 right answers, the last 2 in a row. Each right answer earns 3 XP.