Astronomers have been able to study the chemical composition of the stars and how hot they are for more than a century by means of spectroscopy. A spectroscope breaks down the "white" light coming from a celestial body into extremely detailed spectrum. Working on Isaac Newton's discovery of the spectrum, a German optician, Josef Fraunhofer (1787-1826), examined the spectrum created by light coming from the Sun and noticed a number of dark lines crossing it. In 1859 another German, Gustav Kirchhoff (1824-1887), discovered the significant of Fraunhofer's lines. They are produced by chemicals in the cooler, upper layers of the Sun (or a star) absorbing light. Each chemical has its own pattern of lines, like fingerprint. By looking at the spectrum of the Sun, astronomers have found all the elements known on the Earth in the Sun's atmosphere.
In 1800 Sir William Herschel set up a number of experiment to test the relationship between heat and light. He repeated Newton's experiment of splitting white light into a spectrum and, by masking all the colours but one, was able to measure the individual temperatures of each color in the spectrum. He discovered that the red end of the spectrum was hotter than the violet end, but was surprised to note that an area where he could see no colour, next to the red end of the spectrum, was much hotter than the rest of the spectrum. He called this area infrared or "below the red".
LOOKING AT SODIUM
Viewing a sodium flame through a spectroscope can help explain how spectroscopy works in space. According to Gustav Kirchhoff's first law of spectral analysis, a hot dense gas at high pressure produces a continuous spectrum of all colours. His second law states that a hot rarefied gas at low pressure produces an emission line spectrum, characterized by bright spectral lines against a dark background. His third law states that when light from a hot dense gas passes through a cooler gas before it is viewed, it produces an absorption line spectrum - a bright spectrum riddled with a number of dark, fine lines.
WHAT IS IN THE SUN?
When a sodium flame is viewed through a spectroscope (above), the emission spectrum produces the characteristic bright yellow lines (above). The section of the Sun's spectrum (above) shows a number of tiny "gaps" or dark lines. These are the Fraunhofer lines from which the chemical composition of the Sun can be determined. The two dark lines in the yellow part of the spectrum correspond to the sodium. As there is no sodium in the Earth's atmosphere, it must be coming from the Sun.