We have seen that light always travels at the same speed of about 300,000 km/s; in particular light emitted by a sources in relative motion to an observer travels at this speed. Yet there is one effect on light which shows that its source is moving with respect to the observer: its color changes.
Imagine standing by the train tracks and listening to the train's horn. As the train approaches the pitch of the blast is higher and it becomes lower as the train recedes from you. This implies that the frequency of the sound waves changes depending on the velocity of the source with respect to you, as the train approaches the pitch is higher indicating a higher frequency and smaller wavelength, as the train recedes from you the pitch is lower corresponding to a smaller frequency and a correspondingly larger wavelength.
This fact, called the Doppler effect, is common to all waves, including light waves. Imagine a light bulb giving off pure yellow light; when it moves towards you the light that reaches you eye will be bluer, when the bulb moves away form you the light reaching your eye will be redder. If you have a source of light of a known (and pure) color, you can determine its velocity with respect to you by measuring the color you observe. Qualitatively, if one observes a redder color (longer wavelength than the one you know is being emitted) then the source is moving away from you, if bluer (shorter wavelength that the one you know is being emitted) the source is moving toward you (see Fig. 8.2).
The important point here is that knowing the frequency at the source and
measuring the observed frequency one can deduce the velocity of the
source
If the source is moving sufficiently fast towards you the yellow light
will be received as, for example, X-rays; in this case, however, the
source must move at 99.99995% of the speed of light. For most sources
the shift in frequency is small.