From the glow of a distant star to the faint light of an exoplanet’s atmosphere, the universe whispers its secrets in the language of light. Spectroscopy, the science of decoding that light, is one of astronomy’s most powerful tools. By splitting light into its component colors—much like a prism creates a rainbow—astronomers can read the chemical fingerprints of celestial objects billions of light-years away. This technique allows scientists to determine not only what stars, planets, and galaxies are made of, but also how they move, how hot they are, and even whether they might harbor conditions suitable for life.

What Is Spectroscopy?

At its core, spectroscopy is the study of the interaction between matter and electromagnetic radiation. When light from a celestial body passes through or is emitted by a gas, solid, or plasma, specific wavelengths are absorbed or emitted depending on the elements and molecules present. The resulting spectrum—a plot of intensity versus wavelength—contains patterns like bright emission lines or dark absorption lines. These patterns act as unique fingerprints for each element and compound. The basic principle was first articulated by Gustav Kirchhoff and Robert Bunsen in the 1850s, and it remains the foundation of modern astrophysics.

Astronomers use three main regimes of the electromagnetic spectrum for spectroscopy: visible light, infrared, and ultraviolet. Each regime reveals different information. Visible and ultraviolet light are excellent for studying hot, energetic objects like stars and quasars. Infrared spectroscopy is essential for observing cooler objects such as planets, dust clouds, and the atmospheres of exoplanets, because cooler bodies emit most of their radiation at longer wavelengths. Radio spectroscopy—which examines the radio portion of the spectrum—can detect molecules like carbon monoxide and ammonia in giant molecular clouds, revealing the chemistry of star-forming regions.

The key instrument used is a spectrograph (or spectrometer), which disperses light into its constituent wavelengths using a diffraction grating or a prism. A detector then records the spectrum. Modern astronomical spectrographs are often mounted on large telescopes, including space-based observatories like the Hubble Space Telescope and the James Webb Space Telescope, which can observe wavelengths blocked by Earth’s atmosphere.

A Brief History of Astronomical Spectroscopy

The birth of astronomical spectroscopy can be traced to the early 19th century. In 1802, English chemist William Hyde Wollaston observed dark lines in the solar spectrum, but he did not understand their origin. A few years later, in 1814, German optician Joseph von Fraunhofer independently mapped hundreds of these dark lines (now called Fraunhofer lines) and labeled them with letters. It took until the 1850s for Kirchhoff and Bunsen to explain that each dark line corresponds to a specific element absorbing light at that wavelength—and that the same element could produce bright emission lines when heated. They thus laid the groundwork for identifying the chemical composition of the Sun and other stars.

By the late 19th century, astronomers like William Huggins had used spectroscopy to show that stars contain the same elements found on Earth, confirming that the laws of physics are universal. In the 20th century, spectroscopy became central to stellar classification, the measurement of radial velocities via the Doppler shift, and the discovery of the expansion of the universe (through the redshift of galaxy spectra). Today, spectroscopy remains at the forefront of every major astronomy subfield.

Types of Spectroscopy Used in Astronomy

Astronomers deploy a variety of spectroscopic techniques depending on the object and the type of light they receive. The three most common are absorption, emission, and reflectance spectroscopy.

Absorption Spectroscopy

When light from a hot, continuous source (like the interior of a star) passes through a cooler gas, atoms and molecules in that gas absorb specific wavelengths, creating dark lines in the spectrum. These absorption lines reveal the composition of the gas. For example, the Sun’s spectrum is dominated by hydrogen (Balmer series) and by lines of neutral metals like iron, sodium, and calcium. By measuring the strength and shape of absorption lines, astronomers can determine the temperature, density, and chemical abundance of a star’s atmosphere. Absorption spectroscopy is also used to study the interstellar medium—the tenuous gas and dust between stars—by observing how it absorbs light from background stars.

Emission Spectroscopy

Hot, low-density gases emit light at specific wavelengths, producing emission lines. Nebulae (clouds of ionized gas), planetary nebulae, and the outer atmospheres of stars are classic examples. Emission spectroscopy is particularly valuable for studying regions of active star formation and supernova remnants. Each excited element or ion produces a characteristic set of lines; for instance, the green glow of a planetary nebula often comes from doubly ionized oxygen (O III) at 500.7 nm. Emission lines also reveal physical conditions like temperature, pressure, and ionization state.

Reflectance Spectroscopy

For solid surfaces such as those of asteroids, moons, and planets, astronomers use reflectance spectroscopy. This technique measures the fraction of sunlight that reflects off a surface at different wavelengths. The reflected spectrum shows absorption features caused by minerals and ices. For example, a spectrum of the Moon reveals the presence of iron-bearing minerals like pyroxene and olivine. Reflectance spectroscopy is critical for identifying the composition of planetary surfaces and for characterizing the mineralogy of asteroids, which helps us understand the formation of the solar system.

How Spectroscopy Reveals Composition

The underlying physics is that each element and molecule has a unique set of electronic, vibrational, and rotational energy levels. When an electron jumps from a lower to a higher energy level, it absorbs a photon of specific energy (wavelength). Conversely, when it falls from a higher to a lower level, it emits a photon. The energy differences are quantized, so the allowed wavelengths are discrete lines. This is why we speak of spectral line “fingerprints.” For molecules, the patterns are more complex, involving vibrations and rotations, and they appear as bands of many closely spaced lines.

Astronomers identify elements by matching observed line wavelengths with laboratory measurements. The Doppler shift—the change in wavelength caused by the relative motion of the source—also provides velocity information. If a star is moving toward us, its spectral lines shift to shorter wavelengths (blueshift); if moving away, they shift to longer wavelengths (redshift). The amount of shift reveals the line-of-sight velocity, and this is how we measure the orbits of binary stars, the rotation of galaxies, and the expansion of the universe.

Quantitative analysis goes beyond identification. By modeling the physical conditions in a stellar atmosphere or a planetary atmosphere, astronomers can fit synthetic spectra to observed data and extract abundances of elements (like the ratio of iron to hydrogen), effective temperatures, surface gravities, and even magnetic field strengths. For exoplanet atmospheres, spectroscopy during a transit (when a planet passes in front of its star) allows astronomers to detect molecules like water, carbon dioxide, and methane—key indicators of potential habitability.

Applications in Astronomy

Spectroscopy is woven into nearly every branch of astronomy. Below are some of the most important applications, illustrating its power to answer fundamental questions.

Stellar Classification and Evolution

The classic Harvard spectral classification system (O, B, A, F, G, K, M) is based on the strength of hydrogen lines and the presence of other absorption features. These spectral types correlate directly with stellar temperature. Spectroscopy also reveals a star’s luminosity class (dwarf, giant, supergiant) via line width differences. By combining temperature and luminosity, astronomers can place a star on the Hertzsprung-Russell diagram and infer its mass, age, and evolutionary stage. Furthermore, abundance measurements of elements like carbon, nitrogen, and oxygen help trace the chemical enrichment of the galaxy over time.

Exoplanet Atmospheres

One of the most exciting modern applications is transmission spectroscopy of exoplanet atmospheres. When an exoplanet transits its host star, a tiny fraction of starlight passes through the planet’s atmosphere before reaching us. By comparing the star’s spectrum during transit with its spectrum outside transit, astronomers can extract the planet’s atmospheric absorption features. This method has detected water vapor, sodium, potassium, and even clouds and hazes in the atmospheres of hot Jupiters and smaller super-Earths. The James Webb Space Telescope is now pushing this technique to characterize cooler, potentially habitable worlds.

Galaxies and Cosmology

Spectroscopy is essential for measuring the redshifts of galaxies, which are used to determine distances and map the large-scale structure of the universe. By analyzing the spectra of galaxies, astronomers can study their stellar populations, star formation histories, and metallicities. For active galactic nuclei (AGN), broad emission lines reveal the presence of fast-moving gas near a supermassive black hole. In cosmology, the cosmic microwave background has been measured with exquisite precision using spectroscopy, confirming the Big Bang model. Additionally, spectroscopic surveys like the Sloan Digital Sky Survey have cataloged millions of objects, enabling statistical studies of galaxy evolution.

Interstellar Medium and Star Formation

Radio spectroscopy is a vital tool for observing the cold, dense molecular clouds where stars are born. Molecules such as carbon monoxide (CO), ammonia (NH₃), and formaldehyde (H₂CO) emit at specific radio wavelengths, allowing astronomers to map the distribution, density, and temperature of gas in these clouds. This has revealed the filamentary structures that fragment into protostars. Ultraviolet spectroscopy, on the other hand, probes the diffuse interstellar medium and the hot gas in supernova remnants, providing insights into the cycle of matter and energy in galaxies.

Modern Spectroscopic Instruments and Observatories

Advances in technology have continually expanded the reach of astronomical spectroscopy. Ground-based telescopes now use highly efficient, multi-object spectrographs that can capture spectra of hundreds or even thousands of objects simultaneously in a single observation. For example, the Dark Energy Spectroscopic Instrument (DESI) on the Mayall Telescope in Arizona can measure spectra of up to 5,000 galaxies or quasars at once, mapping the expansion history of the universe.

Space-based observatories offer unique capabilities because they avoid atmospheric absorption. The Hubble Space Telescope’s Space Telescope Imaging Spectrograph (STIS) and Cosmic Origins Spectrograph (COS) have been workhorses for ultraviolet spectroscopy. The James Webb Space Telescope carries the Near-Infrared Spectrograph (NIRSpec) and the Mid-Infrared Instrument (MIRI), which provide unprecedented sensitivity in the infrared. Looking ahead, the Nancy Grace Roman Space Telescope (set to launch in the mid-2020s) will carry a powerful slitless spectrograph designed for wide-field surveys of exoplanets and galaxies.

Another exciting frontier is high-resolution spectroscopy, which can resolve individual spectral lines to measure tiny Doppler shifts. Instruments like ESPRESSO on the Very Large Telescope in Chile can detect radial velocity changes as small as a few centimeters per second—enough to find Earth-sized exoplanets in the habitable zones of Sun-like stars.

Challenges and Limitations

Despite its power, spectroscopy comes with challenges. One major limitation is the faintness of many astronomical sources: collecting enough light for a high-quality spectrum often requires long integration times, even on the largest telescopes. Additionally, Earth’s atmosphere absorbs many wavelengths, particularly in the infrared and ultraviolet, necessitating space-based observatories for certain regions of the spectrum. Spectral line blending in dense wavelength regions can make it difficult to isolate individual features. Also, models used to interpret spectra are only as good as our understanding of atomic and molecular physics; missing or incomplete line lists can lead to errors in abundance determinations. Finally, for exoplanet atmospheres, the signal from the planet’s atmosphere is extremely tiny compared to the star’s light, requiring careful calibration and multiple transit observations to achieve a robust detection.

Conclusion

Spectroscopy is the key that unlocks the hidden composition of celestial bodies across the cosmos. From the humble dark lines in the Sun’s spectrum observed two centuries ago to the detection of water vapor in the atmosphere of an exoplanet 100 light-years away, this technique has revolutionized our understanding of the universe. It bridges the gap between the light we receive and the physical reality of stars, planets, and galaxies. As new telescopes with ever-greater collecting areas and broader wavelength coverage come online, spectroscopy will continue to push the boundaries of discovery—helping us answer profound questions about the origin of chemical elements, the formation of planetary systems, and the potential for life beyond Earth.

For further reading, explore the European Space Agency’s introduction to spectroscopy, the NASA page on spectroscopy in astrophysics, and the detailed Princeton lecture notes on astronomical spectroscopy.