Astronomy · Unit 4: Stars · Activity 4.1.1

Deep Dive: Reading a Spectrum

🔬 Deep Dive
This is your textbook for this topic. Take your time. Read it more than once.
OpenStax Astronomy 2e · 5.1, 5.2Concept

Starlight Is Data

Even the nearest star beyond the Sun is more than four light-years away. No probe has reached one, and none will in your lifetime. That leaves astronomers with exactly one thing to work with: the light that reaches our telescopes. The trick is not to just look at that light, but to take it apart.

Send starlight through a prism or a diffraction grating and it fans out by wavelength into a spectrum — violet at the short-wavelength end (around 400 nanometers), red at the long end (around 700 nm). Beyond violet is ultraviolet; beyond red is infrared. Our eyes only see the thin middle slice, but a star shines across all of it, and every part carries information.

A spectrum = light sorted by wavelength

A star's spectrum answers two big questions at once: how hot is it? (read from the overall shape and color) and what is it made of? (read from the thin dark lines crossing it). The rest of this page takes those one at a time.

OpenStax Astronomy 2e · 5.2, 17.2ConceptSkill

Color Is a Thermometer

Any hot, dense object — a stove burner, a lightbulb filament, the glowing surface of a star — gives off light across a smooth range of wavelengths. Physicists call an ideal version of this a blackbody, and stars behave very much like one. The important part: the shape of that glow is set almost entirely by temperature.

Every blackbody's output rises to a peak and falls off again. As the object gets hotter, that peak slides toward shorter wavelengths. This is Wien's law:

λpeak ≈ 2,900,000 nm·K ÷ T

Double the temperature and the peak wavelength is cut in half. The Sun's surface, at about 5,800 K, peaks near 500 nm. A cool 3,000 K star peaks near 1,000 nm, out in the infrared, so what we do see of it is mostly red. A 30,000 K star peaks near 100 nm, deep in the ultraviolet, and its visible light is dominated by blue.

Turn up the heat

Drag the temperature. Watch the star's color and where its light peaks — the curve's peak slides toward shorter wavelengths as the star heats up.

Temperature
peak 500 nm100500100015002000visiblewavelength (nm) →
T = 5,800 Kλpeak = 500 nmpeaks in visible lightclass G

Each curve is scaled to fit the box. In reality, a hotter star gives off far more light at every wavelength, not just a different mix.

⚠️Common mix-up: everyday life teaches that red means hot and blue means cold — think faucet handles. For stars it's the reverse. Red stars are the coolest; blue stars are the hottest. "Red hot" is just the first color something glows as it heats up.

And there's a second payoff: a hotter star doesn't just shift its color — it emits more energy at every wavelength. Temperature controls both the color and how much light pours off each square meter of the star's surface. That will matter a lot in Activity 4.1.2.

OpenStax Astronomy 2e · 5.3, 5.5ConceptSkill

Fingerprints in the Light

Look closely at a star's spectrum and the rainbow isn't smooth — it's crossed by thin dark gaps called absorption lines. In the 1800s, Gustav Kirchhoff worked out that there are three basic kinds of spectra, and which one you see depends on what the light passes through:

SpectrumWhat makes itWhat it looks like
ContinuousA hot, dense object (a filament, a star's inner layers)An unbroken rainbow
EmissionA hot, thin gas on its ownBright colored lines on a dark background
AbsorptionCooler gas in front of a hotter light sourceA rainbow crossed by dark lines

A star is a hot, dense interior wrapped in a thinner, slightly cooler atmosphere — exactly the recipe for an absorption spectrum. So where do the lines come from? Electrons in an atom can only sit at certain energy levels, like rungs on a ladder. An electron can absorb a photon only if that photon carries exactly the energy needed to jump from one rung to another — which means only very specific wavelengths get absorbed.

🔑Every element has its own unique ladder of energy levels, so every element absorbs its own unique set of wavelengths. That pattern is a fingerprint — and it's the same whether the atom is in a lab on Earth or in a star 500 light-years away.

Astronomers identify elements in a star by matching its dark lines against lab spectra of known elements. A match has to be the whole pattern, not one line: sodium always shows its close pair near 589 nm, hydrogen always shows its set at 656, 486, 434, and 410 nm. This method was so powerful that helium was discovered in the Sun's spectrum in 1868 — decades before anyone found it on Earth. Its name comes from helios, Greek for Sun.

Match the fingerprints

The top strip is a mystery star. Pick an element to lay its lab spectrum underneath. If every one of its bright lines lines up with a dark line in the star, that element is there.

MYSTERY STAR · absorptionLAB · HELIUM emission400450500550600650700
✗ No match — no helium here
Its lines at 447, 492, 502, 588, 668 nm have no dark partners — the pattern doesn't fit.
Mystery lines explained: 0 / 16
OpenStax Astronomy 2e · 17.3Concept⚠ Watch Out

Spectral Classes

In the early 1900s, a team at Harvard sorted the spectra of hundreds of thousands of stars. Annie Jump Cannon built the system still used today: seven spectral classes arranged from hottest to coolest —

O · B · A · F · G · K · M

The letters look scrambled because the classes were first named alphabetically by how strong their hydrogen lines were, then reordered once astronomers realized temperature was the real pattern. Generations of students have remembered the order with "Oh Be A Fine Girl/Guy, Kiss Me." Each class splits into subclasses 0–9, with 0 the hottest. The Sun is a G2 star.

Explore the classes

Click a class. The bars show how strong the hydrogen lines are in each class — watch where they peak.

HYDROGEN LINE STRENGTHOBAFGKMhotcool
Class G — Yellow, 5,200–6,000 K
Lines: Strong ionized calcium; many metal lines
Examples: The Sun (G2), Alpha Centauri A

Notice the hydrogen bars: they peak at class A and fade in both directions. That's a temperature effect. Visible hydrogen lines need electrons sitting on the second rung of the ladder. In a cool M star, almost every electron is stuck on the bottom rung. In a blazing O star, most hydrogen is ionized — its electron knocked off entirely — so there's nothing left to absorb. Around 10,000 K is the sweet spot.

⚠️Common mix-up: a star with weak hydrogen lines is not short on hydrogen. In 1925, Cecilia Payne showed that nearly all stars are mostly hydrogen and helium. The huge differences between stellar spectra come mainly from temperature, not composition.
OpenStax Astronomy 2e · 17.3, 17.4SkillExample

Reading a Real Spectrum

Put it all together and you have a repeatable routine for any star — including the unnamed one waiting for you in Problem 4.3.1:

StepLook atWhat it tells you
1 · ShapeWhere the light peaks; the overall colorSurface temperature (Wien's law)
2 · LinesWhich dark lines appear, matched to lab spectraWhich elements are in the atmosphere
3 · PatternWhich lines are strong vs. weak (ionized helium? strong hydrogen? molecules?)Spectral class — and a cross-check on temperature
4 · Sanity checkDo steps 1 and 3 agree?If a "red" star shows ionized helium, something's off — look again

Try it on Betelgeuse and Rigel, the two brightest stars in Orion. Betelgeuse glows red-orange, peaks in the infrared, and shows molecular bands: a cool M star. Rigel is blue-white, peaks in the ultraviolet, and shows helium and hydrogen: a hot B star. Same constellation, opposite ends of the scale — and you can see the difference with your own eyes on a clear winter night.

🔑A spectral class is really a temperature label. In Activity 4.1.2, that temperature becomes the horizontal axis of the H-R diagram — and pairing it with a star's true brightness starts to reveal its size, its stage of life, and eventually its fate.
← Back to Activity 4.1.1📝 Formative Activity →Up next: Activity 4.1.2, The H-R Diagram.