Doppler Effect

Heard a train go by recently? Remember how the train's pitch changed as the vehicle raced towards, then away from you? First the pitch became higher, then lower.  Originally discovered by the Austrian mathematician and physicist, Christian Doppler (1803-53), this change in pitch results from a shift in the frequency of the sound waves. As the ambulance approaches, the sound waves from its siren are compressed towards the observer. The intervals between waves diminish, which translates into an increase in frequency or pitch. As the ambulance recedes, the sound waves are stretched relative to the observer, causing the siren's pitch to decrease. By the change in pitch of the siren, you can determine if the ambulance is coming nearer or speeding away.

The same effect occurs with light waves. When a source emitting light waves is standing still the waves are spread out evenly in all directions. However, if the source is moving, the wavelengths change. If the object is moving towards you the light waves are compressed shifting its spectrum to the blue end. If the object is moving away from you, the light waves are spread out shifting its spectrum to the red end.

Remember that each element has a unique bright-line (emission) spectrum. Stars also have unique dark-line (absorption) spectrums for the elements found in the stars. In the lab, we know the bright-line spectrum for hydrogen looks like this:

A star that is not moving at all would create a dark-line spectrum like the one below:

The missing lines in the dark-line spectrum exactly match the locations of the lines in the bright-line spectrum.
When a star is moving the wavelengths of the light either is compressed (if moving towards the observer), or are spread out (if moving away from the observer). This causes the dark lines of the dark-line spectrum to shift either to the red end or to the violet end as shown below:


This shifting of the wavelengths is called the Doppler Effect. If the star is moving away from the observer, the dark lines of the dark-line spectrum are shifted toward the red end of the spectrum.
If the star is moving towards the observer, the darklines of the dark-line spectrum are shifted toward the blue end of the spectrum as in the figure below.

In 1929, an astronomer named Edwin Hubble discovered that the more distant a galaxy was, the greater its redshift, and therefore the higher its velocity While at the Wilson Observatory, Hubble studied galaxies, measuring the length of light waves in distant galaxies and discovering that the waves were longer and redder (redshift). He then calculated the distance to the galaxy and its redshift and found that there was a proportional relationship between the two. This relationship was that the more distant a galaxy, the greater its velocity. This discovery also confirmed the Universe is expanding.

borrowed from  Mr Duff's earth science page