HomeArticlesSpace & Astronomy

Redshift and the Doppler Shift: Reading Motion From a Spectrum

How a stretched or compressed spectral line reveals whether a source is moving through space or riding the expansion of space itself.

mysimulator teamUpdated June 2026≈ 7 min read▶ Open the simulation

Stretching and squeezing a wave

When a source of waves moves relative to an observer, the waves the observer receives are not at the frequency the source actually emits. A source approaching squeezes its wavefronts closer together in the direction of travel, raising the received frequency; a source receding stretches them apart, lowering it. This is the Doppler effect, most familiar from a passing ambulance's siren dropping in pitch, and light obeys the same underlying geometry even though it needs no medium to travel through.

live demo - a moving source stretching and compressing its wavefronts● LIVE

Redshift and blueshift, quantified

For light, astronomers quantify the shift with a single dimensionless number, z, defined as the fractional change between the observed wavelength and the wavelength the source emits in its own rest frame.

z = (lambda_observed - lambda_emitted) / lambda_emitted

z > 0   ->  wavelength stretched   -> redshift  (receding)
z < 0   ->  wavelength compressed -> blueshift (approaching)

for velocities much slower than light (v << c):
  z ~ v / c

Two different physical causes, one formula

A shift in a spectral line can come from more than one physical cause, and it matters which one you are looking at. A peculiar velocity shift is the ordinary Doppler effect: a galaxy genuinely moving through space relative to an observer, the same physics as the ambulance siren. A cosmological redshift is different in kind - it is not caused by galaxies flying through static space at all, but by space itself stretching while the light is in transit, carrying the light's wavelength along with the expansion. At low redshift the two are numerically almost indistinguishable and the simple Doppler formula works as an approximation; at high redshift, where light has spent billions of years crossing an expanding universe, only the full cosmological treatment gives the right answer.

Spectral lines: the ruler that makes redshift measurable

None of this would be measurable without something to compare against. Atoms absorb and emit light only at sharp, specific wavelengths set by their internal quantum structure - the hydrogen atom's Balmer lines, for instance, sit at wavelengths that have been measured in laboratories on Earth to extraordinary precision. When astronomers see that exact same pattern of spectral lines in a distant galaxy's light, but shifted uniformly to longer or shorter wavelengths, the shift factor applied to a known, trusted reference pattern is what actually gets measured as z - not a vague colour change, but a precise ratio applied to a recognisable fingerprint.

From redshift to Hubble's law

In 1929 Edwin Hubble combined redshift measurements with independent distance estimates for a sample of galaxies and found a strikingly simple pattern: on average, the further away a galaxy is, the faster its redshift indicates it is receding, in direct proportion to distance. That relationship, Hubble’s law, v = H0 * d, turned redshift from an interesting spectral curiosity into the single most practical tool in observational cosmology - a single spectrum, taken from one galaxy, yields both its recession velocity and, through Hubble's law, an estimate of its distance, without ever needing to send a probe or measure a parallax angle.

Frequently asked questions

Is cosmological redshift the same thing as the Doppler effect?

They produce a similar-looking wavelength shift but arise from different physics. The ordinary Doppler effect comes from a source genuinely moving through space; cosmological redshift comes from space itself expanding while light travels through it. At low redshift the distinction barely matters numerically, but at high redshift only the cosmological expansion picture gives accurate results.

How can astronomers tell a redshift is real and not just a naturally red-looking object?

Because redshift is measured as a uniform shift applied to a whole pattern of sharp spectral lines with known laboratory wavelengths, not as a general shift in overall colour. A recognisable fingerprint of lines shifted by a consistent factor is very hard to confuse with an object that is simply intrinsically red.

Can an object be blueshifted instead of redshifted?

Yes. Any object with a large enough peculiar velocity toward the observer can show a blueshift, and this does happen locally - the Andromeda galaxy, for example, is close enough that its motion toward the Milky Way currently outweighs cosmological expansion, so its light is blueshifted rather than redshifted.

Try it live

Everything above runs in your browser — open Redshift & Doppler Shift Visualizer and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Redshift & Doppler Shift Visualizer simulation

What did you find?

Add reproduction steps (optional)