1. Concept
Astronomers sort stars into spectral classes O B A F G K M, which run from hottest to coolest.
Why Doesn’t Every Star Have the Same Spectrum?
We have seen that the spectrum of a star can reveal which elements are present and can also tell us something about its temperature. But if we compare the spectra of different stars, we find that their absorption lines are not all equally strong. Some stars show strong hydrogen lines, while others show weak ones or show much stronger lines from other atoms. Why should stars made of broadly similar kinds of matter have such different spectra?
The answer is that a star’s surface temperature changes the state of the atoms in its atmosphere. Temperature determines how much energy the atoms have and which energy levels their electrons are likely to occupy. It can also determine whether atoms remain neutral or become ionized. As a result, the same element can produce very different spectral patterns under different temperature conditions.
This means that the strength of a spectral line cannot always be interpreted simply as “more of that element.” A weak hydrogen line, for example, does not necessarily mean that the star contains little hydrogen. The atoms may simply not be in the right physical state to produce a strong line.
Temperature therefore becomes a useful organizing principle. By studying which spectral lines appear and how strong they are, astronomers can arrange stars into different spectral types, with each type corresponding to a characteristic range of surface temperatures.
This gives us a much more useful way to think about stellar spectra:
the spectrum is not determined only by what is present; it is also determined by the physical conditions under which the atoms exist.
Among those conditions, temperature plays a particularly important role.
Now we can explore one of the most interesting examples of this idea: hydrogen. Since hydrogen is extremely common in stars, we might expect its absorption lines to become strongest in the hottest stars. But that is not what happens. Understanding why will reveal how temperature controls spectral lines in a surprisingly subtle way.
Why Do Astronomers Classify Stars by Spectral Type?
We have seen that a star’s spectrum depends strongly on its surface temperature. Stars with different temperatures can show different patterns and strengths of spectral lines because their atoms and ions exist in different physical states. This means that the spectrum of a star contains a useful clue about its temperature.
Astronomers use this clue to place stars into spectral classes. A spectral class is not simply a label for the colour of a star. It represents a characteristic range of surface temperatures and, more fundamentally, a characteristic pattern of spectral features.
The classes are arranged in a particular sequence:
O – B – A – F – G – K – M
This sequence runs from the hottest stars to the coolest stars. O-type stars are extremely hot, while M-type stars are the coolest among these seven main spectral classes.
The order may seem strange because the letters do not follow the ordinary alphabetical sequence. There is a historical reason for this, but what matters scientifically is learning the sequence itself and understanding what it represents.
As we move from O toward M, the surface temperature generally decreases. Therefore, the sequence is also a temperature scale written using letters:
O (hottest) → B → A → F → G → K → M (coolest)
For example, the Sun belongs to the G-type class, whose temperature is intermediate within this sequence. O-type stars are much hotter, while M-type stars are much cooler.
So when you see a spectral type such as G or K, think of it not merely as a name, but as a clue to the star’s surface temperature and spectral behaviour.
We now know why the sequence exists.
Meeting the Seven Spectral Classes
The sequence O–B–A–F–G–K–M becomes much easier to understand once we stop treating the letters as arbitrary labels and see them as positions along a temperature sequence. Starting from O and moving toward M, the surface temperature decreases. O-type stars are therefore the hottest among these seven classes, while M-type stars are the coolest.
O-type stars have extremely high surface temperatures, often above about 30,000 K, and their light is strongly associated with the blue part of the spectrum. At the other end, M-type stars are much cooler, usually below about 3,700 K, and tend to appear red. Between these two extremes lie B, A, F, G and K stars, forming a continuous progression of stellar temperatures. The Sun belongs to the G-type class and has a surface temperature of about 5,800 K.
The colours are useful as a broad visual guide, but remember that spectral class is fundamentally a classification based on the star’s spectrum and temperature, not simply on what colour it appears to our eyes. The spectral lines provide the detailed information that allows astronomers to distinguish one class from another.
The lines themselves change in a regular way along the sequence. O stars show lines of ionized helium and B stars lines of neutral helium; the hydrogen lines are strongest in A stars; F and G stars show weaker hydrogen lines and a growing number of lines of metals such as calcium and iron; K stars are dominated by metal lines; and in the coolest, M stars, broad absorption bands of molecules such as titanium oxide (TiO) appear. A cooler atmosphere therefore shows many more absorption lines than a hot one, because more of its atoms remain neutral and molecules can survive in it.
There are also objects cooler than the ordinary M-type stars. Brown dwarfs, including the cooler spectral types L, T and Y, lie beyond the M class on the temperature sequence. They are much cooler than ordinary stars and may emit very little visible light.
For the seven main stellar classes, the essential sequence is therefore:
O → B → A → F → G → K → M
from hottest to coolest.
If we want the order from coolest to hottest, we simply reverse it:
M → K → G → F → A → B → O
Once this sequence becomes familiar, a spectral type immediately gives us a first idea of where a star lies on the temperature scale.
Key results.
- O B A F G K M: hottest to coolest
- the Sun is a G2 star, about 5800 K
- plotting stars by temperature (or class) against true brightness gives the Hertzsprung–Russell (HR) diagram; most stars, the Sun too, lie on a band called the main sequence
Common mistakes. Each of these is false:
- ✗ Stars of different classes are made of different elements (most differ mainly in temperature).
- ✗ The letters are in alphabetical order of temperature (the order is historical).
2. Explore it
Try it. What spectral class is the Sun?
3. Worked example
Put these spectral classes in order from the hottest to the coolest (an old memory aid is “Oh Be A Fine Girl/Guy, Kiss Me”).
(a) O B A F G K M
(b) M K G F A B O
(c) A B F G K M O
(d) G K M O B A F
Solution. Answer: (a). The sequence O B A F G K M runs from the hottest stars (O, above 30 000 K) to the coolest (M, below about 3700 K). The Sun is a G star.
4. From a past paper
NSEA 2024, NCR paper, Question 35 (official paper: IAPT). Put these stars in order of rising surface temperature. (a) yellow dwarf, brown dwarf, red giant, blue giant (b) brown dwarf, yellow dwarf, blue giant, red giant (c) red giant, blue giant, yellow dwarf, brown dwarf (d) brown dwarf, red giant, yellow dwarf, blue giant
Our solution. Answer: (d). Brown dwarf, Red giant, Yellow dwarf, Blue giant
Typical surface temperatures: brown dwarf below about 2500 K; red giant about 3500–4500 K; yellow dwarf (like the Sun) about 5800 K; blue giant above about 10 000 K.
Ready for more? At NSEA level this topic continues in Spectral classes O B A F G K M, The Hertzsprung–Russell diagram.