The spectrum from M31 reflects the fact that M31 is moving with respect
to the Earth, and the light it emits is therefore Doppler shifted. What
does this mean?

Johann Christian
Doppler 1803-1853

Have you noticed that when an emergency vehicle with its siren blaring
passes you that the tone that you hear changes in pitch? This is an
example of what is called the Doppler shift, and it is an effect that is
associated with any wave phenomena (such as sound waves). It is the same
effect that Hubble used to measure the velocities of distant galaxies. This
is how it works:

Consider first a case where the fire truck is at rest in the station
driveway waiting for the firemen to board the firetruck. The siren is
already on, and a listener some distance away to the right will perceive
the
siren at the same frequency as which it is emitted. Note that another
stationary person on the left side of the truck would hear the same tone
also.

The stationary listener on the right hears the same 400 Hz tone emitted by
the fire truck.

Now consider how this situation changes when the truck is moving
towards the stationary observer with a constant velocity, v.

The frequency of the fire engine's siren as heard by a person on the
firetruck has not changed! However, the waves in the
direction of the truck bunch up as the fire truck is catching up to its own
sound waves. This means that the pressure variations, which are represented
by the sine waves, impinge upon the eardrum of the stationary observer at
an increased frequency. The stationary observer to the right therefore
perceives a higher tone. Notice also that the waves traveling towards the
rear of the fire truck seem are spread out as the siren is moving away from
its own sound as it travels with velocity v to the right. This would cause
a stationary observer to the left of the truck to perceive a decrease in
the frequency of the of the siren.

For a source moving to the right, a stationary observer to the right would
perceive a higher tone and one to the left would perceive a lower tone.

The non-relativistic Doppler shifted frequency of an object moving with speed
v with respect to a stationary observer, is:

and the Doppler shifted wavelength can be shown to be:

In these two equations, c_{o} is the speed of the wave in a
stationary medium (in this case the speed of sound), and the velocity is
the radial component of the velocity (the part in a straight line from
the observer). Both these formulas
are non-relativistic approximations that are true as long as the velocity
of the moving object is much less than the speed of light. As a convention,
the velocity is positive if the source is moving away from us and
negative if the source is moving towards the observer. Thus:

if the source is moving away (positive velocity) the observed frequency
is lower and the observed wavelength is greater (redshifted).

if the source is moving towards (negative velocity) the observed
frequency is higher and the wavelength is shorter (blueshifted).

Without much additional thought, as I know you have been thinking for a
while now, you could easily convince yourself that the doppler shift will
occur under any of the following circumstances:

The source is approaching a stationary observer.

The observer is approaching a stationary source.

The source and the observer are moving towards one another.

The source is moving away from a stationary observer.

The observer is moving away from a stationary source.

The source and the observer are both moving away from each other.

The source and the observer are moving in the same direction at
different speeds.

You should also be able to easily convince yourself that the shift will
yield an increase in the perceived frequency whenever the source and the
observer are approaching one another, and a decrease in the perceived
frequency whenever the source and the observer are moving away from each
other.

So....here's the big question. How does this affect the spectra of distant
objects in the Universe, you might ask? Does light doppler shift? You
probably remember the spectrum of visible light as ROYGBIV. So if the
doppler shift works also for light then it must be possible to move so
quickly towards a red traffic light that it would appear green to you! You
might find it clever to use this argument if you get stopped for running a
red light. However, the police officer might in turn charge you not for
running the red but rather speeding. You might find it fun on your own to
calculate your fine for traveling the speed necessary to make the light
appear green to you, if the fine is $1 per mile per hour over the limit and
you are traveling in a 25 mph zone. (You can do this problem in the Doppler
Quiz which is linked to this site.)

Well, we guess you have discovered by now that light (or any part of
the
electromagnetic spectrum) can be shifted up in frequency or down depending
upon your relative motion. In fact, if your recession velocity is
great
enough away from a visible light source, you could in theory warm yourself
as you would be able to shift to the infrared or heat area of the
electromagnetic spectrum.

Now take a moment to consider the diagram that follows:

You will recognize it as the same as the fire truck approaching the
stationary observer except now the source is emitting light instead of sound.
Notice that the right region where a perceived increase in the frequency
is
noticed is referred to as "blueshifted", and the region which would appear
to be of a lower frequency to an observer on the left is referred to as
"redshifted." And, it is important to note that the equations which were
derived for sound will work equally well for moving light sources provided
the light sources are not moving near the speed of light. (We would
have to take relativistic effects into account at speeds approaching the
speed of light.)

Imagine the Universe is a service of the High Energy Astrophysics Science Archive Research Center (HEASARC), Dr. Alan Smale (Director), within the Astrophysics Science Division (ASD) at NASA's Goddard Space Flight Center.