
The Doppler effect for sound was described by Christian Doppler in 1842. Astronomer Vesto Slipher began measuring shifts of lines in the spectra of nebulae back in the 1910s. But the decisive step was made by Edwin Hubble in 1929, discovering the proportionality of redshift to the distance of galaxies.
Atoms emit light at specific wavelengths — like fingerprints. When a galaxy recedes, the wave crests arrive less frequently, and the entire spectrum shifts toward longer wavelengths — to the red. From the amount of shift, the recession velocity is calculated. It's like a comb with sparse teeth: if the source moves, the 'teeth' of the spectrum become even sparser.