The Sun is 150 million kilometres away, and no probe has ever touched its surface. Yet we know it is 73 percent hydrogen and 25 percent helium, with traces of oxygen, carbon, neon, and iron. We know this because of a pattern of dark lines that show up when sunlight is spread into a spectrum, lines first catalogued by Joseph von Fraunhofer in 1814, and decoded, element by element, over the century that followed. That decoding is spectroscopy, and it remains the primary tool by which astronomers read the universe.
Why a Rainbow Is Not Just a Rainbow
![Diffraction Grating Spectrum]()
Diffraction Grating Spectrum
Image credit : AI
Observing stellar spectroscopy: Fraunhofer lines reveal star composition. Light diffracts into a spectrum, showing absorption patterns.
Pass white light through a glass prism and it fans out into the familiar arc of colours, from violet at one end to red at the other. This happens because different wavelengths of light bend by different amounts through glass, a property called dispersion. What you get is a continuous spectrum, every wavelength present and accounted for.
But starlight, examined carefully, is not continuous. It is interrupted. Spread the Sun's light finely enough and you find hundreds of dark vertical lines cutting across the spectrum at precise, repeatable positions. Fraunhofer counted 574 of them. He labelled the strongest with letters, the D lines in the yellow, the H and K lines in the violet, without yet knowing what caused them. The cause came later: atoms.
Each chemical element absorbs light at specific wavelengths and only those wavelengths. When light from a hot stellar core passes through the cooler gas of a star's outer atmosphere, atoms in that gas absorb the exact wavelengths they are tuned to, leaving gaps. Those gaps are the dark lines, called absorption lines, or Fraunhofer lines, and they are as specific to an element as a fingerprint is to a person. Sodium produces two close lines in the yellow. Hydrogen produces a series called the Balmer lines, the most prominent sitting in the red. Iron produces dozens of lines scattered across the spectrum. Match the pattern of dark lines in a stellar spectrum to the known patterns of elements measured in a laboratory, and you know what the star contains.
The Temperature Hidden in the Colour
Spectroscopy does more than identify elements. The overall colour of a star's spectrum, which wavelength carries the most energy, is a direct measure of surface temperature. A cool red star like Betelgeuse peaks in the infrared and glows at around 3,500 Kelvin. A hot blue-white star like Rigel peaks in the ultraviolet and burns at over 10,000 Kelvin. Our Sun, yellow-white, sits at roughly 5,778 Kelvin.
This relationship between temperature and peak wavelength follows a law worked out by Wilhelm Wien in 1893. It means that a spectrum is simultaneously a chemical inventory and a thermometer. The same rainbow that tells you a star contains calcium also tells you how hot its surface is.
The strength of particular absorption lines adds a third layer. Some lines only appear at certain temperatures because the atoms producing them must be in a specific energy state to absorb the right wavelengths. The Harvard classification system, the O, B, A, F, G, K, M sequence that astronomers still use, is built entirely on which lines are strong and which are absent in a stellar spectrum. Our Sun is a G-type star. The classification is a spectroscopic one.
Redshift, Blueshift, and a Universe That Is Moving
![Pre-Dawn Observatory Silhouette]()
Pre-Dawn Observatory Silhouette
Image credit : AI
Observatory dome at dawn, hinting at the study of stellar spectroscopy and how astronomers know what stars are made of.
In 1842, Christian Doppler described what happens to wave frequency when a source moves relative to an observer. Sound does it, a train horn drops in pitch as it passes. Light does it too. When a star moves away from Earth, its light is stretched toward longer, redder wavelengths. When it moves toward us, the light is compressed toward shorter, bluer wavelengths. The dark lines in the spectrum shift position accordingly.
This Doppler shift is measurable with precision. It tells astronomers not just that a star is moving, but how fast and in which direction. When Edwin Hubble applied the same principle to galaxies in the 1920s, measuring the redshift of their spectra, he found that nearly all of them were moving away from us, and the farther away they were, the faster they receded. That observation became the observational foundation of the expanding universe. The Big Bang theory rests, in part, on absorption lines shifting toward red.
India's own space science community has contributed to this field. ISRO's AstroSat, launched in 2015 from Sriharikota, carries ultraviolet and X-ray instruments that collect spectroscopic data from distant stars and galaxies, wavelengths blocked by Earth's atmosphere and invisible from the ground. AstroSat has studied the spectra of neutron stars, black hole binaries, and hot young stellar clusters, adding Indian data to a global picture that began with Fraunhofer's careful eye and a glass prism.
What the Lines Have Revealed About the Cosmos
Spectroscopy did not just confirm that stars are made of the same elements as Earth, it revealed the proportions of those elements across the entire observable universe. Hydrogen dominates everywhere. Helium is the second most abundant element in the cosmos, a fact confirmed not by collecting it but by reading its lines in the spectra of thousands of stars. The heavier elements, carbon, oxygen, silicon, iron, are rarer, and their abundance patterns in stellar spectra match precisely what nuclear physics predicts should be forged inside stars and scattered by supernova explosions.
When astronomers say that the iron in your blood was made inside a star that died before the Sun existed, that claim is grounded in spectroscopic evidence. The iron lines in the spectra of old, metal-poor stars are faint. In younger stars like the Sun, they are stronger. The pattern traces a history of enrichment across cosmic time, written in the positions of dark lines on a detector.
Exoplanet atmospheres are now read the same way. When a planet passes in front of its star, a fraction of the starlight filters through the planet's atmosphere. The molecules in that atmosphere leave their own absorption signatures. Water vapour, methane, carbon dioxide, all have been detected in exoplanet atmospheres through transmission spectroscopy. The James Webb Space Telescope, operational since 2022, was designed in significant part to do exactly this at a sensitivity no previous instrument could match. The search for biosignatures, spectroscopic signs of life, is the next chapter of the same method Fraunhofer stumbled onto with a prism and a candle flame.