Red Shifts and Blue
Shifts for Spectral Lines

For light waves emitted from a moving source, the Doppler shift is related to the velocity v and the speed of light c by

where 1 labels the unshifted and 2 labels the shifted wavelength.

Here is a Java Virtual Experiment illustrating the Doppler effect.