In Bright-Line Spectra you saw that each element gives off its own set of colors, because its electrons can only drop between certain energy levels. Astronomers use those fingerprints to read what stars, nebulae and galaxies are made of, across trillions of kilometers. The key is that there are three kinds of spectra, and each comes from a different situation.
Continuous spectrum: a hot, dense object (a solid, a liquid, or a dense gas like a star's interior) gives off every wavelength, a smooth rainbow.
Emission (bright-line) spectrum: a hot, thin gas gives off light only at its own wavelengths.
Absorption (dark-line) spectrum: a cooler, thin gas in front of a hotter continuous source removes light at those same wavelengths, leaving dark lines.
💡 Why it works
These are Kirchhoff's laws, and energy levels explain them. An electron dropping from a higher level to a lower one emits a photon with exactly the energy difference, $E = hc/\lambda$. Going the other way, an electron can absorb a photon only if it has exactly the energy to lift it between two levels. Same levels, same energies, same wavelengths: a gas absorbs precisely the wavelengths it would emit. In a star, the hot, dense interior makes the continuous light, and the cooler gas in its outer layers absorbs its own wavelengths, so starlight shows dark lines.
🔑 Key idea
Hot and dense: continuous. Hot, thin gas: bright lines. Cool gas in front of a hotter source: dark lines at the very same wavelengths. Either way, the lines identify the element.
Kirchhoff's three setups: looking straight at a hot, dense source; through a cooler gas; and at the gas from the side.Emission lines of hydrogen, helium, sodium and mercury, each a different fingerprint.
Worked examples
✏️ Worked example: Photon energy
Hydrogen's red line is at $656.3$ nm. What energy does each of its photons carry? Use $hc = 1240$ eV·nm.
$E = \frac{1240}{656.3} = 1.89$ eV.
That matches the gap between hydrogen's levels 3 and 2: $-1.51 - (-3.40) = 1.89$ eV.
Answer: $1.89$ eV.
✏️ Worked example: Read the spectrum
Light from a star passes through a cool cloud of sodium gas before reaching us. What do we see near $589$ nm?
The star gives a continuous spectrum.
The cooler sodium in front absorbs its own wavelengths, $589.0$ and $589.6$ nm.
So we see a rainbow with two dark lines there: an absorption spectrum.
Answer: Two dark lines at sodium's wavelengths.
⚠️ Common mistake
A natural guess is that dark lines mean the star lacks that element. It is the opposite: dark lines at sodium's wavelengths show that sodium atoms are there, in the cooler gas between us and the hot layers below, absorbing those colors. Check: the same element's bright lines in the lab fall at exactly the same wavelengths as its dark lines in the star. Helium was discovered this way, in the Sun's spectrum in 1868, before anyone found it on Earth.
Build atoms from protons, neutrons and electrons in the Build an Atom lab.