Here's why:
* Doppler Effect: The Doppler effect applies to light waves just like sound waves. As a source of light moves towards an observer, the waves are compressed, resulting in a higher frequency.
* Frequency and Color: Higher frequency light corresponds to bluer colors, while lower frequency light corresponds to redder colors.
* Spectral Lines: Spectral lines are specific wavelengths of light emitted or absorbed by atoms in the star. When the star moves towards us, these wavelengths are compressed, shifting the lines towards the blue end of the spectrum.
Therefore, a star moving towards Earth will have its spectral lines blueshifted. The amount of blueshift is proportional to the star's velocity relative to Earth. This is a valuable tool for astronomers to determine the motion of stars and other celestial objects.