Astronomy Labs

Stellar Astrophysics › Stellar properties

Stellar spectra

Dark absorption lines in a star's rainbow-like spectrum are fingerprints of the atoms in its atmosphere. Sorting stars by those lines gives the O–B–A–F–G–K–M temperature sequence and reveals composition, surface gravity and rotation.

foundation · Birth of astrophysics · Modern universe · Precision & multi-messenger era · Reviewed:

Key takeaways

  • Spectral type O→M is a temperature sequence: O stars are hottest and bluest, M stars coolest and reddest.
  • The Sun is a G-type star; its strongest lines come from ionized calcium and metals.
  • One spectrum yields temperature, chemical makeup, rotation speed and surface gravity at once.
  • Lines shift with motion: the Doppler effect reveals whether a star approaches or recedes.

What Stellar spectra means

Spread a star's light into a rainbow and dark absorption lines appear — fingerprints of the atoms in its atmosphere. Sorting stars by their lines produces the O–B–A–F–G–K–M sequence, which is really a temperature ladder from ~30,000 K blue stars down to ~3,000 K red ones. From line strengths astronomers also read off composition, surface gravity, rotation speed and even magnetic fields.

Try it — interactive simulation

Stellar Spectrum LabSlide the stellar temperature to shift the Planck peak and watch Balmer lines strengthen and fade across OBAFGKM.
410434486656λpeak 500 nmλ (nm) →OBAFGKMhot ← O · B · A · F · G · K · M → cool
Spectral classG
Peak wavelength500 nm
Balmer-line depth17%

Interactive model — simplified for intuition, not precision ephemerides.

Core formulas

Wien lawλ_max T = b

Hotter blackbodies peak at shorter wavelengths.

Stefan–BoltzmannL = 4πR²σT⁴

A spherical thermal emitter’s luminosity scales with area and the fourth power of temperature.

Worked numerical example

Stellar spectra — T=5800 K → λ_max≈500 nm

  1. Write the numerical inputs with units and identify which are measured and which are assumed.
  2. Substitute into the compact relation without dropping powers of ten or unit conversions.
  3. Compare the result with the stated scale and flag any model dependence before treating it as an astrophysical inference.

T=5800 K → λ_max≈500 nm

History & methods

How it is measured or modeled

Use calibrated photometry/spectroscopy plus distance or binary geometry; propagate covariance because temperature, radius, luminosity, metallicity and extinction can be degenerate. Record calibration/model assumptions and an uncertainty budget so another reader can reproduce the inference.

Historical development

Ideas related to Stellar spectra evolved as angular measurement, clocks, optics, spectroscopy, photography, electronics, spacecraft and computation improved. Historical models should be read in the context of the evidence available at the time: later observations often preserved useful mathematics while replacing the underlying physical picture.

Quick quiz

1. Which relation is the anchor formula for this topic?

2. Which relation is the anchor formula for this topic?

Editorial note

Anchor: spectral classification O–B–A–F–G–K–M tracks temperature and line diagnostics.

References & further reading

  1. Astronomy 2e — The H–R Diagram (OpenStax)
  2. Astronomy 2e — Spectroscopy in Astronomy (OpenStax)
  3. Stars (NASA Science)
  4. Astronomy 2e (OpenStax)
  5. Astronomy 2e — The Spectra of Stars (and Brown Dwarfs) (OpenStax)
  6. Astronomy 2e — Using Spectra to Measure Stellar Radius, Composition, and Motion (OpenStax)
  7. Spectroscopy 101 — Introduction (NASA Science / Webb)