The motion of an observer does not affect the velocity of light but it does change the color or wavelength of light to give the Doppler effect. However, only stars and galaxies move fast enough to show the effect. If the star and the observer are moving apart [A] the wavelength increases because the individual waves are encountered less frequently. The light is more red than if the star were stationary [B] and this red shift shows as a shift in the lines of the spectrum of the star from  to . If a star and observer are approaching [C], wavelength decreases and the light appears bluer . A similar shift of frequency is used in radar to detect the movement of aircraft or cars.
The Doppler effect is the change in the observed frequency of sound or light that occurs when the observer and the source are in relative motion. Examples of the Doppler effect in everyday life include the change in pitch of the siren of an ambulance or police car as it speeds past. The Doppler effect is important in astronomy because it enables the velocity of light-emitting objects in space, such as stars or galaxies, to be worked out.
The change in pitch, or frequency, of a sound which results when a source of sound and its observer are moving relative to one another was first predicted by the Austrian physicist Christian Doppler in 1842. He showed that if the source was approaching the observer (or the observer was approaching the source) then the sound waves would be more crowded (and hence the pitch higher) than if both source and observer were stationary.
A sound of a certain steady frequency f, will emit f complete sound waves (a series of push and pull changes in pressure) in one second. If the source is stationary relative to the observer, the observer's ears receive f sound waves in a second, so that the observer hears the actual sound that was given out by the source. However, if the source is moving, this motion causes the air ahead of the source to be compressed by the vibrations more than f times in a second, while the air behind is compressed less less than f times in a second. As a consequence an observer in front of the approaching sound actually hears a sound of higher frequency, since more than f vibrations reach her in a second. After the source of sound has passed her the number of vibrations reaching her in a second is less than f so she hears a sound of lower pitch than the source.
Until the advent of railways, there were no vehicles capable of traveling fast enough for there to be any noticeable Doppler effect. (Horse drawn mail coaches traveled at about 16 km/h.) The first recorded demonstration of the Doppler effect was carried out in 1845 by C. H. D. Buys-Ballot, the Dutch scientist who is chiefly remembered for his contributions to meteorology. He used a trumpet as the source of sound which was conveyed in a railway locomotive.
Light and the Doppler effect
Light and sound are both forms of wave motion, and the Doppler effect is also observed where a source of light, such as a distant star, is moving along the line of sight. Whereas a change in frequency of sound is heard as a change in the pitch of a note, a change in frequency in light is seen as a change in color of light. Light of high frequency (and short wavelength) gives the sensation or color we know as blue; light of low frequency (and long wavelength) gives the sensation or color we know as red. hence a decrease in frequency in light means a change in color from blue to green or green to yellow or yellow to orange or orange to red. The spectra of stars and galaxies that are traveling away from the Earth suffer what is known as a red shift while luminous objects that are approaching Earth have spectra with a blue shift. A shift in the pattern of lines observed in the spectrum of a star or galaxy is useful to astronomers since it gives an indication both of the direction and of the speed of the object.