Here's why:
* Stars emit light: Stars are hot balls of gas that emit light across the entire spectrum. This light is a continuous spectrum, meaning all colors are present.
* Elements absorb specific wavelengths: The atoms of different elements in the star's atmosphere absorb specific wavelengths of light.
* Missing wavelengths create dark lines: When light passes through the star's atmosphere, the atoms absorb the wavelengths they resonate with. These missing wavelengths show up as dark lines in the continuous spectrum.
Think of it like this: Imagine shining a white light through a prism. You see a rainbow. Now, imagine shining that light through a gas. Some colors will be absorbed by the gas, leaving gaps in the rainbow.
What do these absorption lines tell us?
The position and intensity of absorption lines reveal:
* Composition of the star: Each element has a unique set of absorption lines, allowing astronomers to determine the star's chemical composition.
* Temperature: The strength of absorption lines can indicate the star's temperature.
* Motion: The Doppler effect shifts the position of absorption lines, indicating whether the star is moving towards or away from us.
Therefore, analyzing the absorption lines in a star's spectrum provides valuable information about the star itself.