ASTRONOMY • GRAVITY, MOTION & LIGHT

Spectral Types & Composition — Interpret emission/absorption/continuous spectra and what they reveal about composition.

Every element writes its own fingerprint in light, letting astronomers decode the chemistry of stars billions of light-years away.

Historical Context & Motivation

For most of human history, the chemical composition of celestial objects seemed permanently unknowable. In 1835, the philosopher Auguste Comte famously declared that humanity would never determine what the stars are made of—yet within two decades, a new scientific tool proved him spectacularly wrong. The systematic study of spectroscopy—the decomposition of light into its constituent wavelengths—opened a window into the physical and chemical nature of distant objects. By analyzing how matter emits, absorbs, and transmits electromagnetic radiation, astronomers gained the ability to identify elements, measure temperatures, and infer densities without ever touching a sample. This section traces the key discoveries that transformed spectroscopy from a laboratory curiosity into one of the most powerful diagnostic tools in all of astrophysics.

1666
Newton's Prism Experiments
Isaac Newton demonstrated that white sunlight could be dispersed into a continuous band of colors by a glass prism, establishing that white light is a composite of all visible wavelengths.
1814
Fraunhofer Lines Catalogued
Joseph von Fraunhofer mapped over 570 dark lines in the solar spectrum, labeling the most prominent ones with letters (A through K). These Fraunhofer lines hinted that specific wavelengths were being selectively removed from sunlight.
1859
Kirchhoff & Bunsen's Spectral Laws
Gustav Kirchhoff and Robert Bunsen established that each chemical element produces a unique set of spectral lines. Their work yielded three empirical laws governing continuous, emission, and absorption spectra.
1868
Discovery of Helium in the Sun
During a solar eclipse, Jules Janssen and Joseph Norman Lockyer independently observed a bright yellow emission line at 587.6 nm that matched no known terrestrial element. They named the new element helium (from the Greek helios, meaning sun), decades before it was isolated on Earth.
1913
Bohr's Atomic Model
Niels Bohr provided the theoretical explanation for discrete spectral lines by proposing quantized electron energy levels in the hydrogen atom, directly linking quantum physics to astronomical spectroscopy.

The central question that drove all of this work remains the organizing principle of stellar spectroscopy today: How does the pattern of light emitted or absorbed by matter encode information about its composition, temperature, and physical state? Answering this question requires a firm grasp of the three fundamental spectral types and the physical mechanisms that produce them.

Core Principles — Kirchhoff's Three Spectral Laws

The behavior of light as it interacts with matter can be distilled into three foundational scenarios, codified by Kirchhoff's laws of spectroscopy. These laws are empirical—they describe what is observed under controlled conditions—and they apply universally, from laboratory flame tests to the photospheres of distant stars. Each law corresponds to a distinct type of spectrum: continuous, emission (bright-line), and absorption (dark-line). Understanding the physical conditions that generate each type is essential before we can use spectra as diagnostic tools.

1

Continuous Spectrum

A hot, dense, opaque object (solid, liquid, or dense gas) emits radiation at all wavelengths, producing a smooth, unbroken rainbow. The shape of the spectrum depends on temperature alone (blackbody radiation) and carries no information about chemical composition.
2

Emission (Bright-Line) Spectrum

A hot, low-density (diffuse) gas emits light only at specific discrete wavelengths, producing bright lines against a dark background. Each element's pattern of lines is unique, serving as a chemical fingerprint.
3

Absorption (Dark-Line) Spectrum

When continuous radiation passes through a cooler, low-density gas, the gas absorbs photons at the same discrete wavelengths it would emit if hot. The result is a continuous spectrum crossed by dark lines at those wavelengths.

A crucial complementarity connects the second and third laws: the dark lines in an absorption spectrum occur at exactly the same wavelengths as the bright lines in the emission spectrum of the same element. This correspondence was the first strong evidence that absorption and emission are inverse manifestations of the same atomic transitions. In a stellar context, the hot, dense interior of a star produces a continuous spectrum, while the cooler, more tenuous outer atmosphere imposes absorption lines upon it. The pattern of those dark lines directly encodes the chemical makeup of the stellar atmosphere.

KEY TAKEAWAY
Think of spectral analysis like a barcode scanner at a grocery checkout. A continuous spectrum is the blank label tape before any barcode is printed—it tells you the medium exists but not what product it is. An emission spectrum is the barcode itself: bright bars on a dark background, uniquely identifying each element. An absorption spectrum is the photographic negative of that same barcode—dark bars carved into a bright background. Whether you read the barcode or its negative, you extract the same product identity. Similarly, whether you observe emission lines from a hot nebula or absorption lines in starlight, you are reading the same elemental fingerprint.

Visual Explanation — The Three Spectral Types

The following diagram illustrates the three physical setups that produce each spectral type according to Kirchhoff's laws. On the left, a hot dense source emits radiation. Depending on whether an observer views the source directly, or views through an intervening cloud of cooler gas, or views only the gas itself from the side, a different type of spectrum results. Study how the geometry of source, gas cloud, and observer determines the spectral outcome.

Three observers viewing the same system under different geometries. Observer A sees only the hot source and records a continuous spectrum. Observer B looks through the cool gas cloud and records an absorption spectrum. Observer C views the gas from the side—away from the hot source—and records an emission spectrum. Notice that the absorption and emission lines occur at identical wavelengths.

This geometric picture maps directly onto stellar structure. The stellar core and photosphere act as the hot, dense source, producing a near-perfect blackbody continuum whose peak wavelength encodes the surface temperature via Wien's displacement law. The cooler stellar atmosphere—composed of various atoms and ions—acts as the intervening gas cloud, carving out absorption lines whose positions reveal the elements present. Meanwhile, hot nebulae (such as H II regions) glow with emission lines because the diffuse ionized gas is viewed directly against the dark sky, with no continuum source behind it.

Mathematical Framework — Atomic Transitions & Spectral Lines

The discrete nature of spectral lines is a direct consequence of quantized energy levels within atoms. When an electron transitions between two energy levels, it either absorbs a photon (jumping to a higher level) or emits one (falling to a lower level). The wavelength of that photon is determined precisely by the energy difference between the two levels. We now formalize this relationship and connect it to the observable spectral line patterns.

PHOTON ENERGY–WAVELENGTH RELATION
E = hν = hc / λ
where E is photon energy, h = 6.626 × 10⁻³⁴ J·s is Planck's constant, ν is frequency, c = 3.00 × 10⁸ m/s is the speed of light, and λ is wavelength.

For a transition between an upper level n2 and a lower level n1, energy conservation requires that the photon energy equals the difference in level energies: ΔE = En₂ − En₁. For hydrogen-like atoms, the Bohr model gives exact energy levels, leading to the Rydberg formula.

RYDBERG FORMULA (HYDROGEN)
1/λ = R∞ (1/n₁² − 1/n₂²)
where R∞ = 1.097 × 10⁷ m⁻¹ is the Rydberg constant, n₁ is the lower principal quantum number, and n₂ is the upper principal quantum number (n₂ > n₁). Different values of n₁ define named series: Lyman (n₁ = 1, UV), Balmer (n₁ = 2, visible), Paschen (n₁ = 3, IR).
HYDROGEN ENERGY LEVELS
Eₙ = −13.6 eV / n²
The energy of the n-th level is negative (bound state). The ground state (n = 1) has E₁ = −13.6 eV, and the ionization limit corresponds to n → ∞ where Eₙ → 0.

While the Rydberg formula applies exactly only to hydrogen (and hydrogen-like ions), the underlying principle generalizes: every element has its own unique set of energy levels, and therefore its own unique set of spectral line wavelengths. Multi-electron atoms produce far more complex spectra because electron–electron interactions split and shift energy levels, but the fundamental mechanism—photon energies matching energy-level differences—remains identical. This is why the pattern of lines serves as an unambiguous chemical fingerprint, regardless of whether the atom is in a laboratory flame or in the atmosphere of a star 10 kiloparsecs away.

WIEN'S DISPLACEMENT LAW
λ_max = b / T
where b = 2.898 × 10⁻³ m·K is Wien's displacement constant and T is the surface temperature of the blackbody in kelvins. This law governs the peak wavelength of the continuous spectrum and is used to determine stellar surface temperatures.

Stellar Spectral Classification — The Harvard System

Astronomers classify stars by their spectral type using a system refined at Harvard Observatory in the late 19th and early 20th centuries, primarily through the work of Annie Jump Cannon. The classification sequence—O B A F G K M—ranks stars from hottest (O, surface temperatures above 30,000 K) to coolest (M, below about 3,500 K). Critically, the spectral type is determined not by which elements are present (most stars share a similar hydrogen-dominated composition) but by which ionization and excitation states are populated at a given temperature. A star's surface temperature controls which absorption lines are strong, which are weak, and which are absent.

A schematic of how absorption-line strength varies across the OBAFGKM sequence for five diagnostic species. The bar opacity is proportional to observed line strength. Note that the variation is governed by temperature-dependent ionization and excitation, not differences in actual elemental abundance.
The seven major Harvard spectral classes and their defining features.
Spectral TypeTemperature Range (K)ColorKey Absorption FeaturesExample Star
O≥ 30,000BlueHe II, N III, C III; weak H10 Lacertae
B10,000–30,000Blue-whiteHe I; moderate H BalmerRigel
A7,500–10,000WhiteStrongest H Balmer linesSirius (A1V)
F6,000–7,500Yellow-whiteH Balmer weakening; Ca II emergingProcyon
G5,200–6,000YellowStrong Ca II H & K; Fe I, CHSun (G2V)
K3,700–5,200OrangeStrong metals (Fe I, Ca I); weak HArcturus
M2,400–3,700RedTiO molecular bands; very weak HBetelgeuse
⚠️ Common Misconception
Students often assume that a star showing strong calcium lines must have more calcium than a star showing strong hydrogen lines. In reality, virtually all main-sequence stars have nearly the same hydrogen-dominated composition. The variation in line strength across spectral types is almost entirely a temperature effect: different temperatures favor different ionization and excitation states, which in turn determine which lines are observable. This is governed by the Boltzmann and Saha equations.

Worked Example — Identifying Composition from a Spectrum

Suppose you observe the absorption spectrum of a distant star and identify dark lines at the following wavelengths: 393.4 nm, 396.8 nm, 410.2 nm, 434.0 nm, 486.1 nm, and 656.3 nm. Determine which elements are responsible for these lines, estimate the star's spectral type, and calculate the energy of the photon absorbed at 656.3 nm.

Stellar Spectrum Analysis
1
Step 1 — Match Lines to Known WavelengthsConsulting a standard table of spectral lines, we recognize the following matches. The lines at 410.2 nm (Hδ), 434.0 nm (Hγ), 486.1 nm (Hβ), and 656.3 nm (Hα) all belong to the Balmer series of hydrogen (transitions from upper levels n₂ = 6, 5, 4, 3 down to n₁ = 2). The lines at 393.4 nm and 396.8 nm correspond to the Ca II H and K lines, the resonance lines of singly ionized calcium.
Elements identified: Hydrogen (H) and Calcium (Ca II)
2
Step 2 — Estimate Spectral TypeThe Balmer lines are present but not at their maximum possible strength (an A-type star would show the strongest Balmer absorption). The prominent Ca II H and K lines indicate that the temperature is cool enough for Ca II to be the dominant ionization state, which occurs around 5,200–6,000 K. The combination of moderate Balmer lines and strong Ca II lines is the hallmark of a G-type star. Without further information on line ratios, we estimate the spectral type as approximately G2, consistent with a Sun-like star.
Estimated spectral type: G2 (T ≈ 5,800 K)
3
Step 3 — Calculate Photon Energy at Hα (656.3 nm)Using E = hc/λ with h = 6.626 × 10⁻³⁴ J·s, c = 3.00 × 10⁸ m/s, and λ = 656.3 × 10⁻⁹ m: E = (6.626 × 10⁻³⁴)(3.00 × 10⁸) / (656.3 × 10⁻⁹) E = 1.989 × 10⁻²⁵ / 6.563 × 10⁻⁷ E = 3.03 × 10⁻¹⁹ J
Photon energy: E = 3.03 × 10⁻¹⁹ J ≈ 1.89 eV
4
Step 4 — Verify via Rydberg FormulaFor the Hα transition (n₁ = 2, n₂ = 3), the Rydberg formula gives: 1/λ = R∞(1/2² − 1/3²) = 1.097 × 10⁷ (1/4 − 1/9) = 1.097 × 10⁷ × (9 − 4)/36 = 1.097 × 10⁷ × 5/36 = 1.097 × 10⁷ × 0.13889 = 1.524 × 10⁶ m⁻¹ λ = 1 / (1.524 × 10⁶) = 6.562 × 10⁻⁷ m = 656.2 nm
Rydberg prediction: λ = 656.2 nm ✓ (matches observed 656.3 nm)

Strengths and Limitations of Spectral Analysis

Spectroscopy is arguably the most information-rich observational technique in astronomy, but it is not without constraints. The following table summarizes what spectral analysis can and cannot do, highlighting both its remarkable diagnostic power and the situations where additional techniques or assumptions are required.

Strengths and limitations of astronomical spectroscopy
StrengthsLimitations
Identifies chemical elements and ions remotely—no sample requiredRequires sufficient photon flux; very faint objects yield low signal-to-noise spectra
Measures radial velocity via Doppler shift with high precision (< 1 m/s for exoplanet detection)Only measures the line-of-sight (radial) velocity component, not full 3D motion
Determines surface temperature, surface gravity, and chemical abundances simultaneouslyDegeneracies exist: e.g., a metal-poor star can mimic a slightly hotter star's line strengths
Applies to all electromagnetic wavelengths (radio through gamma-ray)Earth's atmosphere absorbs many UV, IR, and radio bands, requiring space-based observatories
Line profiles reveal magnetic fields (Zeeman splitting), turbulence, and rotation ratesBlended lines in crowded spectra can be difficult to deconvolve without high spectral resolution
KEY TAKEAWAY
Spectroscopy functions like a multi-channel sensor in engineering telemetry. A single spectrum simultaneously encodes temperature (via the continuum shape), composition (via line wavelengths), motion (via Doppler shifts), density and pressure (via line broadening), and magnetic fields (via Zeeman splitting). No other single observation carries this much information, which is why spectroscopy remains the backbone of astrophysical diagnostics—but interpreting the signal correctly requires careful attention to the degeneracies and blending effects that can compromise accuracy.

Connection to Advanced Theory — Beyond Visual Spectra

The framework of Kirchhoff's laws and the Rydberg formula provides a solid foundation, but modern astrophysical spectroscopy extends far beyond simple line identification. Advanced techniques incorporate quantum-mechanical selection rules, the Saha ionization equation (which quantitatively predicts ionization fractions as a function of temperature and electron density), and the Boltzmann excitation equation (which determines the population of different energy levels within a single ionization state). Together, these tools enable astronomers to derive precise chemical abundances, not merely detect the presence or absence of an element.

Progression from introductory spectroscopy to advanced astrophysical applications
Introductory ConceptAdvanced Extension
Kirchhoff's three laws (qualitative)Radiative transfer equation; optical depth and source function formalism
Line identification by wavelength matchingCurve-of-growth analysis for quantitative abundance determination
Harvard OBAFGKM classificationMK (Morgan–Keenan) two-dimensional classification adding luminosity classes (I–V)
Rydberg formula for hydrogenQuantum-mechanical treatment with angular momentum, spin–orbit coupling, and fine structure
Doppler shift for radial velocityLine profile fitting for rotational broadening (v sin i), pressure broadening, and Zeeman effect

In recent decades, high-resolution spectrographs such as HARPS, ESPRESSO, and the James Webb Space Telescope's NIRSpec have pushed spectroscopy into new frontiers: detecting atmospheric compositions of exoplanets via transmission spectroscopy, measuring the chemical evolution of galaxies across cosmic time through stellar archaeology, and probing the intergalactic medium using quasar absorption-line systems. The foundational principles remain exactly those described in this lesson—only the scale and precision have grown.

Practice Problems

PROBLEM 1CONCEPTUAL
A hot, dense stellar core emits a continuous spectrum. Its light passes through the star's cooler outer atmosphere before reaching us. Explain, using Kirchhoff's laws, why the observed stellar spectrum is an absorption spectrum rather than a continuous or emission spectrum. Under what observing geometry would you instead see an emission spectrum from the same atmospheric gas?
PROBLEM 2BASIC CALCULATION
Using the Rydberg formula, calculate the wavelength of the Hβ line (the Balmer-series transition from n₂ = 4 to n₁ = 2). Express your answer in nanometers. Does this wavelength fall in the visible range?
PROBLEM 3INTERMEDIATE
An astronomer observes a star whose continuous spectrum peaks at a wavelength of λ_max = 500 nm. Use Wien's displacement law to estimate the star's surface temperature. Based on this temperature, predict which Harvard spectral class this star belongs to and identify one absorption feature you would expect to be prominent in its spectrum.
PROBLEM 4APPLIED
The spectrum of a planetary nebula shows bright emission lines at 486.1 nm, 656.3 nm, and 500.7 nm. The first two are identified as hydrogen Balmer lines (Hβ and Hα). The third line at 500.7 nm does not match any laboratory element spectrum measured at the time of its discovery and was historically attributed to a hypothetical element called 'nebulium.' Using your understanding of emission spectra and atomic physics, explain why this line was eventually identified as a forbidden line of doubly ionized oxygen ([O III]), and discuss what physical conditions in the nebula allow this transition to occur.
PROBLEM 5CRITICAL THINKING
Consider two stars of identical composition. Star A is classified as A0V (T ≈ 9,500 K), and Star B is classified as K2III (T ≈ 4,500 K). Explain quantitatively, using the Boltzmann and Saha equations conceptually, why the hydrogen Balmer lines are much stronger in Star A than in Star B, even though both stars have the same hydrogen abundance. Then discuss why the Balmer lines weaken again for O-type stars (T ≈ 35,000 K), despite the even higher temperature.

Summary — Spectral Types & Composition

Light from celestial objects encodes a wealth of physical information through three fundamental spectral types, formalized by Kirchhoff's laws. A continuous spectrum arises from a hot, dense source and depends only on temperature, following Wien's displacement law (λ_max = b/T). An emission spectrum consists of bright lines at discrete wavelengths produced by a hot, diffuse gas, while an absorption spectrum shows dark lines at those same wavelengths when continuum radiation passes through a cooler gas. The specific wavelengths are determined by quantized atomic energy levels and are unique to each element, making spectral lines an unambiguous chemical fingerprint—quantified for hydrogen by the Rydberg formula (1/λ = R∞[1/n₁² − 1/n₂²]).

Stellar spectra are classified by the Harvard OBAFGKM sequence, ordered by decreasing surface temperature. Crucially, the variation in absorption-line strength across spectral types reflects differences in temperature-driven ionization and excitation (governed by the Saha and Boltzmann equations), not differences in elemental abundance. From a single spectrum, astronomers can simultaneously determine composition, temperature, radial velocity, and density conditions—making spectroscopy the most powerful diagnostic tool in observational astrophysics.

Varsity Tutors • Astronomy • Spectral Types & Composition