Here's how it works:
* Light from a star: Stars emit light across a wide range of wavelengths, creating a unique spectrum.
* Spectral lines: Certain wavelengths are absorbed by elements in the star's atmosphere, creating dark lines (absorption lines) within the spectrum.
* Temperature and spectral lines: The strength and position of these lines depend on the star's temperature. Hotter stars have stronger lines of ionized elements, while cooler stars have stronger lines of neutral elements.
* Spectral classification: Astronomers have organized these spectral lines into different classes, labeled with letters: O, B, A, F, G, K, and M.
The sequence from O to M represents decreasing temperature, with O stars being the hottest and M stars being the coolest.
So, by analyzing the spectral lines of a star, astronomers can determine its surface temperature and classify it into a specific spectral type.