Explainer
How spectroscopy works: reading light from stars and planets
Spectroscopy splits light into its colours and reads the pattern, which tells astronomers what an object is made of, how hot and dense it is and how fast it is moving.[1][2] It works because every element absorbs and emits its own set of wavelengths, set by the fixed energy levels of its electrons.[3][4]
Read the electromagnetic spectrum explained first. This page is the bridge to how exoplanets are found, the cosmic distance ladder and survey projects such as DESI.
What a spectrum is
A rainbow is a spectrum: water droplets act like prisms and spread sunlight into its colours.[5] Spectroscopy is the science of reading such patterns. It studies the colours (wavelengths) that materials emit, absorb, transmit or reflect.[1] From that alone, astronomers can work out what something is made of, how hot and dense it is and how fast it is moving.[2]
Spectra have shown that 91.2% of the atoms in the Sun are hydrogen. They have revealed water vapour on the planet WASP-39 b, about 700 light-years away, and that the Whirlpool Galaxy is moving away from us at 460 kilometres per second.[6]
Instruments disperse light with a prism, a diffraction grating or a grism. Spectrographs record the result.[5] Gratings separate wavelengths by diffraction and interference, and the resulting spectral signature constrains the physical state and composition of stellar and interstellar matter.[7] Spectra are analysed as brightness against wavelength.[8] Almost everything known about the composition, temperature and motion of planets, stars and galaxies comes from spectroscopy.[2]
Three kinds of spectrum
- Continuous. A smooth band of colours, like the glow of a hot object. Its shape and peak depend only on surface temperature (the blackbody curve), so hot stars look bluer and cool stars redder.[9]
- Absorption. A continuous spectrum with dark lines where a gas has absorbed particular wavelengths. Each element absorbs its own pattern. How dark the lines are indicates the amounts, temperature and density of the gas.[3]
- Emission. Mostly dark, with bright lines from hot gas. An atom’s emission lines sit at exactly the same wavelengths as its absorption lines.[10]
In the 1850s scientists found that each element gives off its own pattern of light when heated, and that these patterns matched lines in sunlight. Helium was discovered as unexplained absorption lines in the Sun before it was found on Earth.[11]
Why every element has a barcode
An electron in an atom can sit only at certain energy levels. It jumps between them by absorbing or emitting a photon with exactly the matching energy, and so exactly the matching wavelength.[4] Hydrogen’s visible lines, for example, fall at 410, 434, 486 and 656 nanometres.[4] Molecules such as water, carbon dioxide and methane also have fingerprints. Their absorption bands come from electron jumps and from the molecules rotating and vibrating.[12] How atoms work covers electron energy levels.
What astronomers do with it
- Exoplanet atmospheres. When starlight passes through a planet’s atmosphere, gases absorb some of it. The transmission spectrum shows which molecules are there.[13] The james-webb-space-telescope uses this to study planets around other stars. See how exoplanets are found.
- Motion and redshift. Light from a receding source is stretched to longer, redder wavelengths. In the 1920s redshifts showed that almost all galaxies are moving away, the farther the faster: Hubble’s law.[14] The cosmic distance ladder explains how distance is paired with redshift.
- Hidden things. Spectra help detect planets, infer black holes and dark matter, and calculate the expansion rate and age of the universe.[15]
What is known and what is open
The method rests on well-understood atomic physics.[4] The open questions lie in what spectra are being used to test, such as which gases fill the atmospheres of distant planets and how fast the universe is expanding.[15]
Read next
Next in the crash course
What is Noether's theorem? Symmetry and conservation laws explained
How symmetries give physics its conservation laws, from Noether's theorem to broken mirror and matter-antimatter symmetry and the Higgs mechanism.
Questions readers ask
What is spectroscopy in astronomy?
Studying objects from the detailed pattern of colours (wavelengths) in their light. It reveals composition, temperature, density and motion.[1][2]
How do astronomers know what stars are made of?
When light passes through gas, its atoms absorb particular wavelengths, leaving dark lines. Each element has its own pattern, so the lines identify the elements. Helium was first found this way, in the Sun.[3][11]
How can a telescope tell what is in an exoplanet's atmosphere?
Some starlight passes through the planet's atmosphere on its way to us. Molecules there absorb certain bands, and the resulting transmission spectrum shows which gases are present.[13][12]
What is redshift?
Light from an object moving away from us is stretched to longer, redder wavelengths. Measuring redshift showed in the 1920s that galaxies are moving apart.[14]
Sources
· 15 claims from 3 publishers
Each numbered claim is a statement we checked against the sources listed with it. Tap a number in the text to see its sources in place.
- [1]
Spectroscopy is the study of objects and materials from the detailed patterns of colours (wavelengths) of light they emit, absorb, transmit or reflect. confirmedas of 2026-11-22
- Spectroscopy 101: Introduction · NASA Science (Webb mission explainers, STScI) · Primary source (retrieved 2026-11-22)
- Spectroscopy 101: Introduction · NASA Science (Webb mission explainers, STScI) · Primary source (retrieved 2026-11-22)
- [2]
Spectroscopy is used to work out what objects are made of, how hot and dense they are and how fast they are moving; almost everything known about the make-up, temperature and motion of planets, stars and galaxies comes from it. confirmedas of 2026-11-22
- Spectroscopy 101: Introduction · NASA Science (Webb mission explainers, STScI) · Primary source (retrieved 2026-11-22)
- Spectroscopy 101: Introduction · NASA Science (Webb mission explainers, STScI) · Primary source (retrieved 2026-11-22)
- [3]
When light passes through a gas, its atoms and molecules absorb specific wavelengths, leaving dark absorption lines; each element absorbs its own pattern, and the strength of the lines indicates amounts, temperature and density. confirmedas of 2026-11-22
- Spectroscopy 101: Types of Spectra and Spectroscopy · NASA Science (Webb mission explainers, STScI) · Primary source (retrieved 2026-11-22)
- Spectroscopy 101: Types of Spectra and Spectroscopy · NASA Science (Webb mission explainers, STScI) · Primary source (retrieved 2026-11-22)
- [4]
Each element has its own lines because an electron can only jump between fixed energy levels, absorbing or emitting a photon of exactly the matching energy; hydrogen's visible lines are at 410, 434, 486 and 656 nanometres. confirmedas of 2026-11-22
- Spectroscopy 101: How Absorption and Emission Spectra Work · NASA Science (Webb mission explainers, STScI) · Primary source (retrieved 2026-11-22)
- Spectroscopy 101: How Absorption and Emission Spectra Work · NASA Science (Webb mission explainers, STScI) · Primary source (retrieved 2026-11-22)
- Spectroscopy 101: How Absorption and Emission Spectra Work · NASA Science (Webb mission explainers, STScI) · Primary source (retrieved 2026-11-22)
- [5]
The first step is to split light into its colours with a prism, a diffraction grating or a combination called a grism; instruments built to capture and measure spectra are called spectroscopes and spectrographs. confirmedas of 2026-11-22
- Spectroscopy 101: Types of Spectra and Spectroscopy · NASA Science (Webb mission explainers, STScI) · Primary source (retrieved 2026-11-22)
- Spectroscopy 101: Types of Spectra and Spectroscopy · NASA Science (Webb mission explainers, STScI) · Primary source (retrieved 2026-11-22)
- Spectroscopy 101: Types of Spectra and Spectroscopy · NASA Science (Webb mission explainers, STScI) · Primary source (retrieved 2026-11-22)
- [6]
Spectra show, for example, that 91.2% of the atoms in the Sun are hydrogen, that there is water vapour in the atmosphere of the planet WASP-39 b about 700 light-years away, and that the Whirlpool Galaxy is moving away from us at 460 kilometres per second. confirmedas of 2026-11-22
- Spectroscopy 101: Introduction · NASA Science (Webb mission explainers, STScI) · Primary source (retrieved 2026-11-22)
- Spectroscopy 101: Introduction · NASA Science (Webb mission explainers, STScI) · Primary source (retrieved 2026-11-22)
- [7]
A spectrometer uses diffraction of light through slits or gratings to separate wavelengths, and the resulting spectral signature helps identify the condition and composition of stars and interstellar matter. confirmedas of 2026-11-22
- Wave Behaviors · NASA Science · Primary source (retrieved 2026-11-22)
- Wave Behaviors · NASA Science · Primary source (retrieved 2026-11-22)
- [8]
A spectrum is usually plotted as a graph of brightness against wavelength, which reveals differences too subtle for the eye. confirmedas of 2026-11-22
- Spectroscopy 101: Types of Spectra and Spectroscopy · NASA Science (Webb mission explainers, STScI) · Primary source (retrieved 2026-11-22)
- Spectroscopy 101: Types of Spectra and Spectroscopy · NASA Science (Webb mission explainers, STScI) · Primary source (retrieved 2026-11-22)
- [9]
A blackbody curve is a continuous spectrum whose shape and peak wavelength depend only on the object's surface temperature, so hot stars look bluer and cool stars redder. confirmedas of 2026-11-22
- Spectroscopy 101: Types of Spectra and Spectroscopy · NASA Science (Webb mission explainers, STScI) · Primary source (retrieved 2026-11-22)
- [10]
Hot gas gives an emission spectrum of bright lines, and an atom's emission lines fall at exactly the same wavelengths as its absorption lines. confirmedas of 2026-11-22
- Spectroscopy 101: Types of Spectra and Spectroscopy · NASA Science (Webb mission explainers, STScI) · Primary source (retrieved 2026-11-22)
- Spectroscopy 101: Types of Spectra and Spectroscopy · NASA Science (Webb mission explainers, STScI) · Primary source (retrieved 2026-11-22)
- [11]
In the 1850s scientists found that each element emits its own pattern of light when heated, matching absorption lines in the Sun; helium was first discovered as unexplained absorption lines in the Sun's spectrum. confirmedas of 2026-11-22
- Spectroscopy 101: Types of Spectra and Spectroscopy · NASA Science (Webb mission explainers, STScI) · Primary source (retrieved 2026-11-22)
- Spectroscopy 101: Types of Spectra and Spectroscopy · NASA Science (Webb mission explainers, STScI) · Primary source (retrieved 2026-11-22)
- [12]
Molecules such as water, carbon dioxide and methane absorb bands of light linked to electron jumps and also to the molecules' rotations and vibrations. confirmedas of 2026-11-22
- Spectroscopy 101: How Absorption and Emission Spectra Work · NASA Science (Webb mission explainers, STScI) · Primary source (retrieved 2026-11-22)
- Spectroscopy 101: How Absorption and Emission Spectra Work · NASA Science (Webb mission explainers, STScI) · Primary source (retrieved 2026-11-22)
- [13]
A transmission spectrum is a kind of absorption spectrum made when starlight passes through a planet's atmosphere; it is used to study the atmospheres of planets orbiting other stars, including with the James Webb Space Telescope. confirmedas of 2026-11-22
- Spectroscopy 101: Types of Spectra and Spectroscopy · NASA Science (Webb mission explainers, STScI) · Primary source (retrieved 2026-11-22)
- Spectroscopy 101: Types of Spectra and Spectroscopy · NASA Science (Webb mission explainers, STScI) · Primary source (retrieved 2026-11-22)
- Spectroscopy 101: Types of Spectra and Spectroscopy · NASA Science (Webb mission explainers, STScI) · Primary source (retrieved 2026-11-22)
- [14]
Light from a source moving away from us is redshifted, its wavelength stretched towards the red; in the 1920s astronomers used redshifts to show that almost all galaxies are moving away from us, and that farther galaxies move faster, which is Hubble's law. confirmedas of 2026-11-22
- The Nobel Prize in Physics 2011 (popular information) · The Royal Swedish Academy of Sciences (NobelPrize.org) · Primary source (retrieved 2026-11-22)
- The Nobel Prize in Physics 2011 (popular information) · The Royal Swedish Academy of Sciences (NobelPrize.org) · Primary source (retrieved 2026-11-22)
- The Nobel Prize in Physics 2011 (popular information) · The Royal Swedish Academy of Sciences (NobelPrize.org) · Primary source (retrieved 2026-11-22)
- [15]
Spectroscopy is used to identify gases in planetary atmospheres, detect and characterise planets around other stars, infer the presence of black holes and dark matter, and help calculate the expansion rate and age of the universe. confirmedas of 2026-11-22
- Spectroscopy 101: Introduction · NASA Science (Webb mission explainers, STScI) · Primary source (retrieved 2026-11-22)
- Spectroscopy 101: Introduction · NASA Science (Webb mission explainers, STScI) · Primary source (retrieved 2026-11-22)
- Spectroscopy 101: Introduction · NASA Science (Webb mission explainers, STScI) · Primary source (retrieved 2026-11-22)
Revision history (1)
- Page created.
Created Nov 22, 2026. Last reviewed by an editor on Nov 22, 2026. Next scheduled review: Nov 22, 2027.
Cite this page
"How spectroscopy works: reading light from stars and planets." ContentLora, updated Nov 22, 2026. https://contentlora.com/explain/how-spectroscopy-works
Spotted an error? Suggest a correction or emailcorrections@contentlora.com.