Astronomy 2e · Radiation and Spectra
Spectroscopy in Astronomy
On this page 9 sections
In 30 seconds
Spectroscopy is the technique of spreading light into its component wavelengths — like a prism turning sunlight into a rainbow — and analyzing the result, the spectrum Light spread out by wavelength, like a rainbow, possibly with lines Full entry →. It is the most powerful tool in astronomy. A spectrum is a fingerprint: it reveals what a star is made of, how hot it is, how dense its gas is, how fast it is moving, and whether it is rotating or expanding. There are three fundamental types of spectra — continuous, emission line, and absorption line — and the rules connecting them (Kirchhoff's laws) let astronomers read a spectrum like a coded message. This topic explains how spectra are produced and what they mean; the next two topics (atom structure, spectral lines) explain the atomic machinery behind the lines.
Why this matters
Without spectroscopy, astronomy would be limited to pictures — and a picture of a star tells you almost nothing beyond position and brightness. Spectroscopy opened the door to astrophysics. In the 1860s, astronomers found bright lines in the Sun's spectrum matching no known element and named the new element helium (from the Greek for "Sun") — decades before it was found on Earth. Today spectroscopy is how we know the composition of stars and nebulae, how we measure the expansion of the universe (galaxy redshifts), how we discover exoplanets (the Doppler wobble of their stars), and how we detect molecules like water in distant planetary atmospheres. Understand spectra, and you understand how most of modern astronomy works.
The college version
Core Concepts
How a spectrograph works
A spectrograph Instrument that disperses light (usually with a diffraction grating) and records it Full entry → attached to a telescope spreads incoming light by wavelength. The key element is a diffraction grating A grooved surface that spreads light by wavelength Full entry → — a surface with thousands of fine parallel grooves — which, like a prism, bends different wavelengths by different amounts. The result is a spectrum: a strip of light whose color changes smoothly along its length (continuous source) or carries bright or dark lines at specific wavelengths (line source). Modern detectors (CCDs, the same technology as digital cameras) record the spectrum digitally, and astronomers plot it as brightness versus wavelength.
Three types of spectra: Kirchhoff's laws
In 1859, Gustav Kirchhoff (working with Robert Bunsen) summarized decades of experiments in three rules:
- continuous spectrum Smooth emission at all wavelengths from a hot, dense, opaque source Full entry →: a hot, dense, opaque object — a solid, liquid, or very dense gas like a star's visible surface — emits light at all wavelengths, producing a smooth rainbow. Its shape reveals temperature (Wien's law).
- emission line spectrum Bright lines at specific wavelengths from a hot, low-density gas Full entry →: a hot, low-density gas (a nebula, or a star's outer layers) emits light only at specific wavelengths — bright lines on a dark background. Each element produces its own characteristic pattern: its fingerprint.
- absorption line spectrum Continuous spectrum with dark lines where cooler gas absorbed specific wavelengths Full entry →: continuous light from a hot dense source passing through cooler, low-density gas loses light at the gas's characteristic wavelengths — dark lines crossing a bright rainbow.
The Sun's spectrum combines cases: the dense interior gives a continuous spectrum, and cooler gas in the outer atmosphere imprints dark absorption lines — the famous Fraunhofer lines Dark absorption lines in the Sun's spectrum, cataloged by Fraunhofer (1814) Full entry →, cataloged by Joseph von Fraunhofer in 1814.
Every element has a unique fingerprint
The single most important fact for astronomy: each element has a unique pattern of spectral lines. Hydrogen's lines sit at different wavelengths than helium's, sodium's, or iron's. So a spectrum identifies composition: match the observed line pattern to laboratory patterns, and you have identified the elements present. The Sun's spectrum shows hydrogen, helium, iron, calcium, and many others; the same matching identifies elements in a star 1,000 light-years away.
What else a spectrum reveals
- Temperature: where the continuous part peaks gives the temperature; cool stars show molecular lines, hot stars show ionized-atom lines.
- Density and pressure: lines are broadened in dense, high-pressure gas and narrow in thin gas.
- Motion (Doppler effect): motion toward or away from us shifts all lines to shorter or longer wavelengths (blueshift/redshift); the shift gives radial velocity. (Full treatment in the final topic of this chapter.)
- Magnetic fields and rotation: strong fields can split lines (Zeeman effect); rapid rotation smears lines into broad, shallow features.
One observation yields composition, temperature, density, and velocity — why spectroscopy is astronomy's most information-rich measurement.
Practical limits
Spectra are powerful but not magic. A star's spectrum shows its outer layers, not its deep interior, plus any foreground gas along the line of sight. Faint objects give noisy spectra, which is why astronomers build ever-larger telescopes. Every interpretation relies on models and laboratory measurements, so conclusions carry some uncertainty.
Common Confusions
| Do Not Confuse | With | Difference |
|---|---|---|
| Emission spectrum | Absorption spectrum | Emission = bright lines on dark (hot thin gas); absorption = dark lines on a bright continuous rainbow (cool gas in front of a hot dense source) |
| Continuous spectrum | Absorption spectrum | Continuous has no lines (hot dense object); absorption has dark lines on top of a continuous rainbow |
| Line position (composition) | Line width (density) | Where lines sit identifies elements; how broad they are reflects pressure, rotation, and temperature |
| The Sun's spectrum being emission | The Sun showing absorption lines | The Sun's dense interior gives continuous light; its cooler atmosphere adds dark absorption lines |
| One element = one line | One element = a unique pattern of many lines | Identifying elements means matching the whole pattern, not a single line |
| Spectra showing a star's interior | Spectra probing outer layers + line of sight | A star's spectrum shows its atmosphere and any foreground gas, not its core |

Eli explains
The same idea, in plain words
Explain it like I’m 10
If you sort light like crayons by color, a hot dense object gives you every color at once — a smooth rainbow. A hot thin gas gives you only a few specific colors, like a secret code of bright lines. Each element has its own code, so by reading the code in a star's light you can tell which elements are in it, even from trillions of kilometers away.
Worked example
Suppose a spectrograph records a star's light. Decode it step by step:
- Overall shape. The spectrum rises smoothly toward blue wavelengths and peaks in the blue-violet. By Wien's law, a blue-peaked continuous spectrum means a hot star (roughly 20,000 K — a commonly taught reference for such stars). A red peak would mean a much cooler star.
- Lines. The rainbow is crossed by dark lines. You identify strong dark lines at hydrogen's known wavelengths (the Balmer series) and weaker helium lines. Conclusion: the star's atmosphere contains hydrogen and helium.
- Line width. The lines are narrow, so the gas is low-pressure — a main-sequence star, not a bloated giant.
- Line positions. The hydrogen lines are shifted slightly toward the red compared with lab measurements. That is a Doppler shift: the star is moving away from us at a speed proportional to the shift.
- Caveats. The spectrum reveals the star's outer layers and anything along the line of sight; a foreground interstellar cloud could add absorption lines of its own.
One spectrum, five answers: temperature, composition, density, radial velocity, and line-of-sight material. That is why astronomers call spectra cosmic fingerprints.
Key takeaways
- Spectroscopy = spreading light by wavelength and analyzing it; the most information-rich astronomical measurement.
- Kirchhoff's rules: hot dense object → continuous; hot thin gas → emission lines; continuous light through cooler thin gas → absorption lines.
- Each element has a unique line pattern — the basis of cosmic composition analysis (helium was discovered in the Sun's spectrum before it was found on Earth).
- The Sun shows a continuous spectrum crossed by dark Fraunhofer absorption lines from its cooler outer atmosphere.
- Lines reveal: composition (positions), temperature (shape/which lines appear), density (width), radial motion (Doppler shift), rotation (broadening), magnetic fields (splitting).
- A spectrograph typically uses a diffraction grating and a CCD detector.
- Exam trap: emission lines are bright on dark; absorption lines are dark on a bright rainbow — the same element's lines sit at the same wavelengths in both.
Check yourself
5 review questions from the chapter. Try each one, then open the answer.
What are the three types of spectra, and what physical situation produces each?
Show answer
Continuous (hot, dense, opaque object — all wavelengths); emission line (hot, low-density gas — bright lines); absorption line (continuous light through cooler, low-density gas — dark lines on a rainbow).
Why can a single spectrum reveal a star's composition?
Show answer
Because each element produces a unique pattern of lines at specific wavelengths; matching the observed pattern to laboratory spectra identifies the elements.
How was helium discovered before it was found on Earth?
Show answer
In 1868, astronomers observed bright lines in the Sun's spectrum that matched no known element and named the new element helium; it was not isolated on Earth until the 1890s.
A star's spectrum shows dark lines all shifted toward longer wavelengths. What does that tell you?
Show answer
The lines are redshifted — the star is moving away from us; the shift amount gives its radial velocity (Doppler effect).
Why do dense, high-pressure gas conditions make spectral lines broader?
Show answer
In dense, high-pressure gas, atoms collide frequently and their energy levels are perturbed, spreading the emitted/absorbed wavelengths into broader lines.
Study tools & related lessonsKey vocabulary · Related
Key vocabulary
- spectrum
- Light spread out by wavelength, like a rainbow, possibly with lines
- spectrograph
- Instrument that disperses light (usually with a diffraction grating) and records it
- continuous spectrum
- Smooth emission at all wavelengths from a hot, dense, opaque source
- emission line spectrum
- Bright lines at specific wavelengths from a hot, low-density gas
- absorption line spectrum
- Continuous spectrum with dark lines where cooler gas absorbed specific wavelengths
- Fraunhofer lines
- Dark absorption lines in the Sun's spectrum, cataloged by Fraunhofer (1814)
- diffraction grating
- A grooved surface that spreads light by wavelength
Sources & references
This lesson was adapted from the open educational references above; their licenses and attributions are preserved. See Copyright & Licensing.
Educational content only. It is not medical, legal or professional advice. Found an error? Tell us.

