Stars are classified based on the properties of their spectra, primarily the absorption lines present due to metals in the outer layers of the star. These properties are determined primarily by the temperature of the star, but the physical size of the star also plays a role. For a complete spectral classification of a star we must use two classification systems:
- the Harvard spectral classification divides stars into a series of spectral types according to their temperatures.
- The Morgan-Keenan (M-K) classification adds a luminosity class to the spectral type to account for the effect of luminosity (which in this case is due to size) on the appearance of stellar spectra.
The Sun is classified as a G2V star, where G2 is the Harvard classification and V is the M-K classification.