 So back in the 19th century when scientists actually did this, using extremely powerful instruments to separate out the wavelengths, that's what they saw, sort of. This picture here is in fact one very long thin spectrum that has been chopped up and the strips have been rearranged into a rectangle. So you read it from left to right and from top to bottom like reading a book. And as you can see it's like going through the rainbow from red to blue. The black bit to the top are in fact the invisible infrared light. What astounded the scientists was that in the expected rainbow-like spectrum from the sun were a whole lot of these little black lines, gaps where light of that particular color seemed to have gone missing or to have been removed. Why this should be was for quite a long time a mystery. But as scientists began to examine gases of pure elements, they found something that gave them a clue. First, they took white light from a lamp and split it into its spectrum. And this is what it looks like, the familiar rainbow. Then they took hydrogen gas and they put it between the source of the white light and the detector. To the naked eye, the white light still looked white. But when it was separated into a spectrum they could see that some wavelengths were missing. Black lines appeared where light of particular wavelengths hadn't made it through the hydrogen gas to the detector. And this was called an absorption spectrum, since the hydrogen must have been absorbing some light. And then they discovered that if you again took hydrogen and heated it up near a detector, then as it cooled, the detector showed a spooky reversal of the absorption spectrum. Although you are not shining light on it, the hot hydrogen atoms were emitting their own light and they emitted it at exactly the wavelengths that it had absorbed when the white light was shining through it. This spectrum, the reverse of the absorption spectrum, is called the emission spectrum because the hydrogen atoms are emitting the light. Further research showed that not only did every element show this behaviour, but more interestingly, each element seemed to have a different pattern of wavelengths that it emitted or absorbed. These three emission spectra are from hydrogen, mercury and neon. And you can see that each spectrum is quite different and unique to that element, just like a fingerprint that identifies the element. So somehow, atoms of different elements interact with light in different ways, such that they only take in and spit out very particular wavelengths. It's as though each atom is a super-picky eater at a smorgasbord of the electromagnetic spectrum. So what was going on with the sun's spectrum? Scientists realised that the black lines in the sun's spectrum were telling them about all the different kinds of atoms that were at or near the surface of the sun. As the sunlight radiated outwards, some wavelengths were being absorbed as they passed through the various elements that make up the sun. So the black lines were in fact a kind of secret code, almost like a Morse code, by which the sun was letting us know what it was made of. This discovery, vital information in chemistry and physics, also made a huge difference to the field of astronomy, since for the first time, scientists had a way of remotely working out what other stars were made of. And it turns out that different stars have very different fingerprints. They're made up of different combinations of elements. This lithograph here from 1870 shows stars that were classified into four groups according to the lines in their spectrum. However, the problem was that no one knew why it was that atoms were such picky absorbers and emitters. And it wasn't until collective scientific knowledge got to the point that scientists began to debate what electrons were really doing around the nucleus of the atom, some 40-odd years after this particular lithograph, that this long-standing puzzle began to be solved. And that's the subject of our next video.