The light spectrum is the many different wavelengths of energy produced by a light source, such as the sun.
If we look at the stars and galaxies in our universe using a simple optical telescope, it is impossible to tell if they are moving. If we look at a spectrum of light emitted by a star or galaxy, we can discover how fast the star is and in which direction it is moving. We can do this by an effect called the doppler effect.
Each and every wave has the Doppler Effect. It is an increase or decrease in the frequency of waves as the observer and source move in respect to one another.
The dark lines in light spectra are called absorption spectra. They are the amount of light absorbed by different elements, such as hydrogen. By shifting the dark lines, we can determine how far the stars are. When the dark lines move towards the red part of the light spectra, we call it a redshift.
Redshift indicates the source of light waves moving away from the observer. Blueshift indicates the source of light is moving towards the observer.
A clear pattern emerges when we compare the light emitted from all the galaxies. Almost all galaxies emit light with redshift. The further away a galaxy is the greater redshift and, therefore, the faster it moves from us. We see exactly this pattern in situations involving explosions. So scientists believe that the universe is expanding.
The doppler equation is a change in wavelength/reference wavelength = velocity of the galaxy/speed of light.
This equation allows us to calculate how fast a star or galaxy moves.