Here's why:
* Spectrometer Absorption Lines: Spectrometers break down light into its component wavelengths, revealing absorption lines (dark lines) at specific wavelengths where elements in the star have absorbed light. These lines act like fingerprints, telling us the composition of the star.
* Redshift: When these absorption lines are shifted towards the red end of the spectrum (longer wavelengths), it indicates that the star (and the galaxy it's in) is moving away from us. This is because the light waves are stretched out as the source of the light moves away.
* Doppler Effect: This phenomenon is analogous to the Doppler effect you experience with sound waves. When a car approaches you, the sound waves are compressed, making the pitch higher. As the car moves away, the sound waves are stretched out, making the pitch lower.
Important Note: While redshift is often associated with the expansion of the universe, it can also be caused by other factors like the motion of a star within a galaxy.