Here's how:
* Absorption Spectra: The absorption lines in a star's spectrum indicate the elements present in its atmosphere. Each element absorbs light at specific wavelengths, creating dark lines in the spectrum.
* Doppler Shift: When a star is moving towards Earth, the light waves are compressed, shifting the absorption lines towards the blue end of the spectrum (blue shift). Conversely, when a star is moving away from Earth, the light waves are stretched, shifting the absorption lines towards the red end of the spectrum (red shift).
Therefore, astronomers use the Doppler shift of the absorption lines, not the lines themselves, to determine the radial velocity of a star (its motion directly towards or away from us).
Let me know if you'd like to know more about the Doppler effect!