JOVANA
Library Glossary Getting Started Three Levels Fields How it works Mission
Join the mission
All guides

Decoding a Stellar Spectrum

Spread a star's light into a rainbow and the dark lines crossing it become a coded report on the star — how hot it is, what it is made of, and even how tightly its gravity squeezes its surface. Here is how to read that code.

From a rainbow to a report

In the last two guides you learned two halves of one trick. First, the glow of a hot star is very nearly a blackbody, so the *shape* of its rainbow — where the brightness peaks — already whispers its temperature. Second, when that smooth glow passes up through the cooler gas of the star's own outer layers, individual atoms drink in light at their own exact wavelengths, stamping the rainbow with a forest of dark [[absorption-line-spectrum|absorption lines]]. Each line sits at a wavelength fixed by the atom's energy levels, like a barcode unique to one element. Now we put both halves together and read the star.

A stellar spectrum, then, is not one measurement but a layered document. The smooth background — the continuum — carries the temperature of the deep layers where the light was born. The dark lines cutting across it carry the chemistry and the conditions of the thin atmosphere the light climbed through on its way out. Astronomers learned to read this document so well that, without ever touching a star, they can state its temperature to within a few percent, list the elements in its air, and tell a bloated giant from a compact dwarf. Three readings hide in one strip of light: temperature, composition, and surface gravity. We will pull out each in turn.

The puzzle that broke the obvious answer

Here is where intuition leads you off a cliff, so it is worth slowing down. Hydrogen is by far the most abundant element in every ordinary star — roughly three out of every four atoms. So you would expect the strongest, boldest dark lines in *every* star to be hydrogen lines, especially the famous Balmer lines in the visible band. And yet the Sun's hydrogen lines are only moderate, while in the very hottest blue stars they are weaker still, and in the coolest red stars they nearly vanish. The lines that dominate a cool star's spectrum are not hydrogen at all but heavy molecules and metals. How can hydrogen be everywhere and yet hide?

For decades this looked like a chemistry problem, and it fooled the field. Early astronomers really did conclude that the hottest stars were 'made of hydrogen' and the cool ones were 'made of metals,' as if the recipe changed from star to star. The truth, worked out in the 1920s, is far more elegant: nearly all stars have almost the same recipe — overwhelmingly hydrogen and helium. What changes from star to star is not *what is there* but *what state the atoms are in*. And what sets that state is temperature.

The Saha idea: a line is a thermometer

Here is the key that unlocks it. An atom can only carve a particular dark line if it is in just the right condition first — its electron sitting in the right starting energy level, and the atom holding onto the right number of electrons rather than having some stripped away. Whether an atom is in that ready state depends on how hard it is being jostled, and in a star the jostling is heat. So the strength of a line is not a simple count of how many atoms of that element are present; it is a count of how many are present *and currently in the right state to absorb*. Temperature controls that second factor with a heavy hand.

This is the heart of the [[saha-equation|Saha idea]], named for the physicist Meghnad Saha, who in 1920 wrote down how the balance between intact atoms and ionized ones (atoms that have lost an electron) shifts with temperature. Take the Balmer hydrogen lines. They require a hydrogen atom whose electron sits not in the ground floor but one step up, on the first excited rung. In a cool star, almost no atoms have enough heat to climb to that rung, so the lines are faint — even though hydrogen is everywhere. In a very hot star, the jostling is so fierce that hydrogen atoms are torn apart entirely, stripped of their electrons; a bare proton has no electron left to absorb, so again the lines fade. The Balmer lines roar to their strongest only in between, near 10,000 K, where conditions are just right.

Run the same logic for every element and the whole zoo of spectra falls into order. Each species has its own sweet-spot temperature where its favorite lines peak, then fade above and below. So the *pattern* of which lines are strong becomes a precise thermometer: see strong hydrogen, think roughly 10,000 K; see strong neutral metals and the first hints of titanium-oxide molecules, think a cool star below 4,000 K, since molecules survive only where it is cold enough not to shake them apart. The same element, read at two temperatures, tells two different stories — which is exactly why a line is as much a thermometer as a chemical test.

The sequence O B A F G K M

Once you accept that line patterns track temperature, you can line up all stars in a single temperature order. That order is the famous [[obafgkm-sequence|spectral sequence]]: O, B, A, F, G, K, M, running from the hottest, bluest stars to the coolest, reddest. Each letter is a spectral type with its own signature: O and B stars (30,000–10,000 K) show lines of ionized helium; A stars (around 10,000 K) blaze with hydrogen Balmer lines; G stars like our Sun (about 5,800 K) show strong calcium and many metal lines; M stars (under 3,500 K) are crowded with titanium-oxide molecular bands. The order looks alphabetically scrambled because it was first sorted by hydrogen-line strength alone, then re-sorted by temperature once Saha's idea revealed the true thread.

  O    B    A    F    G    K    M       (+ L, T, Y for brown dwarfs)
 hot ----------------------------> cool
 ~40,000 K                      ~2,500 K
 blue        white       yellow        red
  He+  | H Balmer |  metals |  molecules (TiO)
                  ^Sun is a G star ~5,800 K
The spectral sequence, ordered by surface temperature. Which lines dominate shifts smoothly along it, from ionized helium in the hottest stars to molecular bands in the coolest.

Generations of students remember the letters with the mnemonic 'Oh Be A Fine star.' Each type is sliced finer with a digit from 0 to 9 — our Sun is a G2 star, slightly hotter than a G5. And the sequence now extends past M into the L, T, and Y classes for the dim, cool brown dwarfs that never grew hot enough to fuse hydrogen steadily. The whole ladder, from a blazing O star to a barely-glowing Y dwarf, is one continuous temperature scale — and you can place a star on it just by reading which lines its spectrum wears most boldly.

Composition and gravity: the rest of the report

Now that temperature is pinned down, the *leftover* line strengths reveal real chemistry. Knowing the temperature tells you what fraction of, say, iron atoms should be in the absorbing state; if the iron lines are stronger or weaker than that predicts, the difference points to genuinely more or less iron. This is how we measure a star's [[chemical-abundance|chemical abundance]] — and, summed over the heavy elements, its metallicity, astronomers' shorthand for everything heavier than hydrogen and helium. Old stars born in the young, unenriched universe are metal-poor; stars like the Sun, forged from gas already seeded by earlier generations, are metal-rich. A spectrum thus carries a faint memory of cosmic history.

There is a third reading, subtler and beautiful: surface gravity. Two stars at the same temperature can still differ in how densely their atmospheres are packed. A puffy red giant, spread over a vast surface, has thin, low-pressure air; a compact main-sequence dwarf of the same color has dense, high-pressure air. In the crowded atmosphere, atoms collide far more often, and each collision smears the energy levels slightly, so the lines come out broader and fuzzier. Sharp, narrow lines therefore betray a low-gravity giant; broad, blurry lines betray a high-gravity dwarf. Read the line *widths* and you read the surface gravity — and so the star's size — without ever measuring its diameter.

Astronomers package this second reading as a [[luminosity-class|luminosity class]], a Roman numeral from I (supergiants) through III (giants) to V (ordinary dwarfs like the Sun). Bolt it onto the spectral type and you get a star's full two-part label. Our Sun is a 'G2V': a G2 surface temperature, dwarf gravity. That compact tag — temperature letter plus gravity numeral — is a remarkably complete portrait, pulled entirely from the pattern and shape of dark lines in a strip of light.

Reading a spectrum, step by step

  1. Look at the smooth continuum first: where does its brightness peak? That blackbody shape gives a rough temperature before you read a single line.
  2. Identify which dark lines are strongest. Strong hydrogen Balmer lines point near 10,000 K; strong metals and a hint of molecules point to a cool star. The pattern fixes the temperature precisely and gives the spectral type O–M.
  3. With temperature known, weigh the leftover line strengths against what that temperature predicts to read off the chemical abundances and the metallicity.
  4. Finally inspect the line widths: narrow and sharp means a low-gravity giant, broad and blurry means a high-gravity dwarf. That sets the luminosity class, completing the star's label.