Skip to content
Knowledge Syndicate
Universe

How do we know what stars are made of?

By
How do we know what stars are made of: calcium, hydrogen, magnesium and sodium lines in the Sun’s spectrum

In 1835, a French philosopher announced that we would never know what stars are made of. He put it in writing, in a serious book, and twenty-five years later two Germans with a laboratory flame proved him wrong. So how do we know what stars are made of, when nobody has ever scooped up a sample? As of 2026, astronomers can work out the makeup of a star whose light takes thousands of years to reach us, without sending a probe anywhere. Everything you need is in the light itself, packed into a set of black lines that nobody could read for a long time.

The worst prediction in astronomy

The philosopher was Auguste Comte, and the line sits in the second volume of his Course of Positive Philosophy, in the lesson on astronomy. Comte explains that all we can ever know about the heavenly bodies is what can be seen. We can conceive, he says, of determining their shapes, distances, sizes and motions, “whereas we would never know how to study by any means their chemical composition, or their mineralogical structure.” And he adds that, all the more so, we’d never learn anything about whatever beings might live on their surface.

It wasn’t a dumb thing to say. In 1835 it sounded like plain common sense: to find out what something is made of, you grab a piece, put it in a test tube and torture it. You can’t do any of that to a star. What Comte didn’t know was that light carries the ingredient list with it. Somebody just had to learn to read it.

Black lines in the Sun’s rainbow

Pass sunlight through a prism and it fans out into a rainbow, violet to red, all the colors in a row. What Joseph von Fraunhofer found, using much finer instruments, was that this rainbow isn’t continuous. It’s crossed by a whole bunch of dark lines, thin as hairs, always in the same place. Very specific colors are missing.

Those lines, which still carry his name, stayed a mystery for a long time. They were there, they could be measured precisely, but nobody knew what they meant. A barcode with no scanner.

How do we know what stars are made of? A flame in Heidelberg

The scanner showed up in the mid-19th century at the University of Heidelberg in Germany. A chemist, Robert Bunsen, and a physicist, Gustav Kirchhoff, worked there together. According to the university, between 1859 and 1861 Bunsen was studying the colors flames take on when different salts burn in them, and out of that work the two of them discovered spectral analysis. The German Patent and Trade Mark Office, which features them among its great inventors, dates the joint publication that laid its scientific foundations to 1860.

The idea is simple to explain. Every chemical element, heated in a flame, gives off light only in certain specific colors, always the same ones. And when light passes through a gas of that element, the gas soaks up exactly those same colors. With that, Kirchhoff and Bunsen were able to explain the Fraunhofer lines, the University of Heidelberg says. The Sun’s dark lines are the colors swallowed by the elements in its atmosphere as the light passes through. Compare the Sun’s lines with the lines from your lab flames, and you know what’s up there.

Why every element has its own fingerprint

Why does each element grab some colors and not others? For the same reason glass lets visible light through. The electrons in an atom can only sit at certain energy levels, and to jump from one to another they need a push of exactly the right size. If the light brings exactly that energy, the electron takes it. If not, it lets the light go by.

Each color of light corresponds to a different energy, and each element has its own staircase of levels, with steps at heights that no other element repeats. That’s why every element grabs its own set of colors. Sodium has its set and iron has its own. It’s a fingerprint written in light, and it works the same in a lab flame as in a star thousands of light-years away.

Ten new elements and gold from the Sun

The method was so powerful that it started turning up things nobody had ever seen. According to the German Patent and Trade Mark Office, Bunsen and Kirchhoff identified two new elements in mineral water from the Maxquelle spring in Bad Dürkheim: cesium in 1860 and rubidium in 1861. In very short order, other chemists discovered ten more elements by applying spectral analysis.

The same page tells a story of the kind physicists love to repeat. Kirchhoff’s banker apparently doubted there was any point in looking for gold on the Sun, since you could never bring it back. When Kirchhoff received the Rumford Medal, he showed it to the banker and said, “Look, I’ve managed to get gold from the Sun.” Like every good anecdote, it comes with an “is said to,” and that’s how the patent office tells it.

The element found on the Sun before Earth

Spectral analysis had its finest hour during an eclipse. On August 18, 1868, the French astronomer Jules Janssen watched a total solar eclipse from India through a spectroscope. According to historians at the Paris Observatory and a NASA eclipse newsletter, he saw in the light of the Sun’s atmosphere a bright yellow line that didn’t match any known element. A few days later, the British astronomer Norman Lockyer made the same observation.

Lockyer concluded the line belonged to an element nobody had found on Earth yet. It was named helium, from the Greek helios, the Sun. Britain’s Royal Society of Chemistry spells it out on its page for the element: the name comes from the fact that helium was first detected in the Sun’s corona.

On Earth, it wasn’t isolated until 1895. That year William Ramsay managed it in London and, independently, Per Teodor Cleve and Nils Abraham Langlet did it in Uppsala, Sweden. Twenty-seven years after it was spotted on the Sun. Given what Comte had announced, the irony is hard to miss.

The thesis that didn’t dare say it

Knowing which elements are in a star is one thing. Knowing how much of each is a much harder problem, because the strength of the lines also depends on temperature. That part was cracked by a young astronomer at Harvard who had grown up in England: Cecilia Payne.

In her PhD thesis, Stellar Atmospheres, finished on January 1, 1925, Payne worked out, taking the stars’ temperatures into account, how much of each element it would take to produce the lines astronomers were seeing. The trick was hiding in an unassuming number. According to the American Physical Society, her calculation showed that at 5,700 kelvin only about one in 200 million hydrogen atoms is in the excited state that produces the visible lines. So hydrogen’s lines looked weak even though there was a colossal amount of it. Anyone judging by line strength alone was badly underestimating it. According to the American Physical Society, her conclusion was that, unlike on Earth, hydrogen and helium are the dominant elements of the Sun and stars.

That clashed with what almost everyone assumed, that stars were made of roughly the same stuff as our planet. Henry Norris Russell, one of the leading authorities of the day, strongly opposed the conclusion and convinced her to leave it out of the thesis. Payne turned out to be right. The astronomer Otto Struve went on to call her work “the most brilliant Ph.D. thesis ever written in astronomy.” In 1956, Payne became the first woman to hold a full professorship at Harvard and the first woman to chair a department there.

A Jesuit and four thousand stars

Meanwhile, others set about sorting stars by their spectra. One of the pioneers was the Italian Jesuit Angelo Secchi. According to Italy’s National Institute for Astrophysics, he began a systematic program of stellar spectroscopy in 1862 and kept refining his classification: two types in 1863, three in 1867. The Vatican Observatory notes that his catalog covered more than four thousand stars. He was among the first to sort stars by what their lines looked like.

What stars are made of, in numbers

With all that in hand, the question can be answered with figures. According to NASA, the Sun is made up by mass of 71% hydrogen, 27% helium and 2% heavier elements, with small variations depending on the estimate. Counted by number of atoms, the gap is even bigger: 91% hydrogen, 9% helium and barely 0.1% everything else.

That “everything else” is the bin where elements like oxygen, carbon and iron end up, the stars of the show on Earth and a rounding error on the Sun. And we know it this precisely thanks to the same black lines nobody could read in 1835.