Intermediate
How Spectroscopy Works — and How We Can See What Stars Are Made Of
How can we determine what a star hundreds of light-years away is made of when we can't take a sample? We only need its light. More precisely, we need to learn how to read it.
How Spectroscopy Works — and How We Can See What Stars Are Made Of
How can we determine what a star hundreds of light-years away is made of when we can't take a sample? We only need its light. More precisely, we need to learn how to read it.
When we look at the night sky, most stars appear as tiny points of light. We can measure their brightness, color, position, and even their motion. But there is something much more interesting hidden in that light: it contains information about what the star is made of.
This isn't about guessing from color. Astronomers can analyze starlight well enough to identify individual elements, measure the temperature of stellar atmospheres, determine how fast a star is moving, and in some cases even study its magnetic field.
The whole thing starts with spectroscopy.
Light Contains More Information Than Our Eyes Can See
Our eyes detect only a small portion of the electromagnetic spectrum — what we call visible light. Violet is roughly around 400 nm, while red is around 700 nm. Beyond that narrow window lies an enormous amount of radiation we cannot see: infrared, ultraviolet, microwaves, radio waves, X-rays, and gamma rays.
In spectroscopy, the key question is how the intensity of radiation changes with wavelength.
You can think of light as carrying a message encoded in its spectrum. The problem is that simply saying "the star looks yellow" tells us very little. We need to separate its light into different wavelengths and examine what happens at each one.
Why is wavelength so important?
Because the energy of an individual photon depends on its frequency:
E = hf
Since:
f = \frac{c}{\lambda}
we get:
E = \frac{hc}{\lambda}
where h is Planck's constant, c is the speed of light, and \lambda is the wavelength.
So a shorter wavelength means a higher-energy photon. And this is where light starts connecting directly to the physics of atoms.
An Atom Can't Absorb Just Any Amount of Energy
Electrons in atoms cannot take on completely arbitrary energies. They can occupy only specific energy levels.
When an electron moves from one energy level to another, the energy difference has to match the energy of a photon that is either absorbed or emitted:
\Delta E = E_2 - E_1 = hf
This means that a particular atom can absorb or emit light only at specific energies, and therefore at specific wavelengths.
And this gives us something incredibly useful.
Every element has its own characteristic set of possible transitions. As a result, each element produces a characteristic pattern of spectral lines that can be used to identify it.
You can think of this as a kind of chemical barcode. Not because atoms literally contain barcodes, but because the pattern of spectral lines is characteristic of a particular element.
If we know what the spectrum of hydrogen, helium, sodium, iron, or calcium looks like in the laboratory, we can look for those same characteristic lines in the light coming from a distant object.
Suddenly, we don't need to touch a star to find out what it's made of.

So Where Do the Lines in a Stellar Spectrum Come From?
This is where things get even more interesting, because starlight isn't simply "light produced by atoms."
The interior of a star is extremely hot and dense. Deeper layers produce radiation across a broad range of wavelengths. As that radiation travels through the cooler, more tenuous layers of the stellar atmosphere, atoms and ions there can absorb photons with specific energies.
As a result, certain wavelengths are effectively removed from the original spectrum.
This produces an absorption spectrum.
If we spread the star's light across its wavelengths, we see something like a continuous band crossed by characteristic dark lines.
Those dark lines don't mean that the star produces no light at those wavelengths. They mean that some of that light has been absorbed by material between the deeper emitting layers and us.
And those tiny "missing pieces" of light are incredibly valuable to astronomers.
A Spectrograph: Taking Light Apart
To study a spectrum, we need a spectrograph.
At its simplest, a spectrograph has to separate light according to wavelength. This can be done with a prism, but modern astronomical instruments commonly use a diffraction grating.
A diffraction grating contains a huge number of tiny, regularly spaced structures. When light interacts with it, different wavelengths are diffracted at different angles.
A detector can then measure how much light arrives at each wavelength.
So in practice, an astronomer isn't looking through a telescope at a pretty rainbow and thinking, "Hmm, that looks like iron."
They get measurement data — essentially a graph of light intensity as a function of wavelength.
That spectrum can then be compared with laboratory measurements of atomic transitions and with physical models of stellar atmospheres.
How Do We Turn That Into the Chemical Composition of a Star?
Imagine we observe a distant star and find several spectral lines at very specific wavelengths.
We compare them with known atomic transitions.
If the position and characteristics of those lines match transitions produced by iron, we can conclude that iron is present in the star's atmosphere.
The same approach works for hydrogen, helium, sodium, calcium, magnesium, and many other elements.
But there is an important catch.
You can't simply count spectral lines and say "more lines means more of that element."
The strength of a spectral line depends on many things, including temperature, pressure, density, ionization state, and the physical conditions in the stellar atmosphere. Determining the actual abundance of an element therefore requires comparing the observed spectrum with physical models of the atmosphere.
So spectroscopy isn't some magical chemical scanner.
It is a very precise measurement technique that uses atomic physics to extract information about matter located unimaginably far away.
What If the Star Is Moving?
This is where spectroscopy gets another superpower.
When a light source moves relative to an observer, the observed wavelength of its light changes. This is the Doppler effect.
If a star is moving toward us, its spectral lines shift toward shorter wavelengths — toward the blue end of the spectrum.
If it is moving away from us, the lines shift toward longer wavelengths — toward the red.
For velocities much smaller than the speed of light, we can approximately write:
\frac{\Delta \lambda}{\lambda} \approx \frac{v}{c}
where \Delta\lambda is the change in wavelength, v is the radial velocity of the source, and c is the speed of light.
And this is where things get really cool.
If we know the laboratory wavelength of a particular spectral line, we can check where that same line appears in the spectrum of a star. Even a tiny shift can tell us whether the star is moving toward us or away from us, and how fast it is moving along our line of sight.
We don't have to watch the star for a million years and wait to see whether it changes position.
We just need to measure the shift in its spectral lines very precisely.

And This Is How We Detect Planets We Can't Even See
The same technique has allowed astronomers to detect many exoplanets.
A planet also exerts a gravitational force on its star. In the simplest picture, the planet isn't really orbiting a completely stationary star. Both objects orbit their common center of mass.
As a result, the star moves slightly back and forth.
For a sufficiently massive planet, this motion can produce tiny, periodic shifts in the star's spectral lines. Astronomers can therefore look for regular changes in the star's radial velocity.
If the variation is periodic and fits an orbital model, it can provide evidence for the presence of a planet.
This is the radial velocity method, also known as the Doppler method.
And there is something wonderfully absurd about it: we don't actually see the planet.
We see the tiny gravitational "wobble" it causes in its star.
Spectroscopy Tells Us More Than Just What's There
Chemical composition is only the beginning.
A spectrum can also tell us about a star's temperature. Stars emit radiation across a broad range of wavelengths, and the wavelength corresponding to the maximum of that thermal emission is related to temperature through Wien's displacement law:
\lambda_{\text{max}} T = b
where b is Wien's displacement constant.
The hotter the star, the shorter the wavelength at which its thermal emission peaks.
That is why very hot stars have their emission peak shifted toward shorter wavelengths, while cooler stars peak at longer wavelengths.
Of course, real stellar analysis is more complicated than simply looking at a star's color. Astronomers analyze the full spectrum and use models of stellar atmospheres and radiation to determine the physical parameters more accurately.
We Can Even See a Star Rotating
Stars rotate too.
If one side of a rotating star is moving toward us, its light is shifted slightly toward the blue. The opposite side, moving away from us, produces a shift toward the red.
Because we observe both effects at the same time, the spectral lines can become broadened.
By analyzing this broadening, astronomers can estimate the projected rotational velocity of the star.
The spectrum is therefore starting to look less like a chemical fingerprint and more like a record of the object's motion.
And Sometimes We Can Detect a Magnetic Field
There is an even more interesting effect: the Zeeman effect.
In the presence of a magnetic field, some atomic energy levels split into multiple components. As a result, a single spectral line can split into several closely spaced components.
If the instrument is sensitive enough, analyzing this splitting can reveal information about the magnetic field of the star.
This is one of those moments when spectroscopy stops looking like an analysis of colors and starts looking like an incredibly powerful diagnostic tool.
We don't directly see the magnetic field.
We see its effect on atomic energy levels — and then on the light.

Light Is Our Tool for Exploring the Universe
The most remarkable thing about spectroscopy isn't even the fact that we can detect iron in a star hundreds of light-years away.
It is the fact that light can travel that enormous distance while carrying information about the processes that produced it and the matter it passed through along the way.
A telescope collects that light. A spectrograph separates it by wavelength. A detector turns it into data. And then physics allows us to decode what those data mean.
An absorption line tells us about an atomic transition. Its shift can tell us about the motion of the source. Its shape and width can reveal information about physical conditions. The overall spectrum can tell us about the temperature and composition of a stellar atmosphere.
That is why astronomers can study objects we will never visit.
We don't take a sample from a star.
The light brings us a sample of information.
And that is why spectroscopy is one of the most important tools in modern astronomy.
Because when we look at the sky, we aren't just seeing points of light.
We're seeing data.
Sources and references
- Web Spectroscopy | European Southern Observatory hq.eso.org
- Web Stellar Spectroscopy | American Association of Variable Star Observers aavso.org
- Web Using Spectra to Measure Stellar Radius, Composition, and Motion | OpenStax Astronomy 2e openstax.org
- Web Introduction to Stellar Spectroscopy | University of Iowa itu.physics.uiowa.edu
- Web Stellar Spectra | Fundamental Astronomy astro.amu.edu.pl
Enjoyed this one?