BetaFree coursewareRewritten from MIT OpenCourseWareCC BY-NC-SA 4.0
Open CosmologyThe High School: physics from the very first step

Spectra in astronomy

A spectroscope spreads light into its wavelengths. Kirchhoff found three kinds of spectra: a hot dense body gives a continuous spectrum, a hot thin gas bright emission lines, and a cooler gas in front of a hot source dark absorption lines. The dark lines in sunlight show which elements the Sun contains (helium was found there before it was found on Earth), and the lines of a star also tell its temperature and, through their Doppler shift Δλ/λ = v/c, its motion.

You need this first

Full reading path (73 pages)
  1. Powers of ten and scientific notation (hs-0)
  2. Units and the SI system (hs-0)
  3. Solving and rearranging formulas (hs-0)
  4. Graphs, straight lines and slope (hs-0)
  5. Quadratics and power laws (hs-0)
  6. Angles, radians and trigonometry (hs-0)
  7. Vectors (hs-0)
  8. Distance and displacement (hs-1)
  9. Rates of change and area under a graph (hs-0)
  10. Speed and velocity (hs-1)
  11. Position–time graphs (hs-1)
  12. Acceleration (hs-1)
  13. Velocity–time graphs (hs-1)
  14. Equations for constant acceleration (hs-1)
  15. Free fall (hs-1)
  16. What is a force? (hs-2)
  17. Relative velocity (hs-1)
  18. Newton's first law: inertia (hs-2)
  19. Newton's second law (hs-2)
  20. Circular motion (hs-1)
  21. Newton's third law (hs-2)
  22. Weight, normal force and tension (hs-2)
  23. Friction and drag (hs-2)
  24. Density and pressure (hs-4)
  25. Springs and Hooke's law (hs-2)
  26. Inclined planes (hs-2)
  27. Centripetal force (hs-2)
  28. Work (hs-3)
  29. Kinetic energy and the work–energy theorem (hs-3)
  30. Newton's law of gravitation (hs-2)
  31. Gravitational potential energy (hs-3)
  32. Conservation of energy (hs-3)
  33. Electric charge (hs-6)
  34. Coulomb's law (hs-6)
  35. Projectile motion (hs-1)
  36. Oscillations and simple harmonic motion (hs-5)
  37. Waves: speed, frequency, wavelength (hs-5)
  38. Superposition and standing waves (hs-5)
  39. Power (hs-3)
  40. Exponentials and logarithms (hs-0)
  41. Sound and intensity (hs-5)
  42. The electric field (hs-6)
  43. Electric potential and voltage (hs-6)
  44. Current, resistance and Ohm's law (hs-6)
  45. Torque and balance (hs-2)
  46. Magnetic fields and magnetic force (hs-6)
  47. Magnetic fields from currents (hs-6)
  48. Series and parallel circuits (hs-6)
  49. Electric power and energy (hs-6)
  50. Electromagnetic induction (hs-6)
  51. Capacitors (hs-6)
  52. Light and the electromagnetic spectrum (hs-5)
  53. Electromagnetic waves (hs-6)
  54. Discovering the atom and its nucleus (hs-7)
  55. Temperature and thermal energy (hs-4)
  56. The ideal gas law (hs-4)
  57. Momentum and impulse (hs-3)
  58. Kepler's laws and orbits (hs-2)
  59. Orbital energy and escape speed (hs-3)
  60. Kinetic theory: temperature is motion (hs-4)
  61. Heat and specific heat (hs-4)
  62. Conduction and convection (hs-4)
  63. Thermal radiation and Planck's photons (hs-7)
  64. The pendulum and energy in oscillations (hs-5)
  65. Reflection and refraction (hs-5)
  66. Lenses and telescopes (hs-5)
  67. Interference and diffraction (hs-5)
  68. The Bohr atom and spectral lines (hs-7)
  69. The Doppler effect for sound (hs-5)
  70. Significant figures and estimates (hs-0)
  71. Towards the universe: from atoms to the observable universe (hs-0)
  72. Towards the universe: light-travel time and looking back in time (hs-1)
  73. Towards the universe: redshift, stretched light from moving sources (hs-5)
On this page · 7 sections
  1. Spreading light out: the spectroscope
  2. Three kinds of spectra
  3. The dark lines in sunlight
  4. Helium: found in the Sun first
  5. What else the spectrum tells
  6. Motion: the Doppler shift of lines
  7. Summary

Nobody has ever been to a star or brought back a piece of one. Yet astronomers can tell you what the stars are made of, how hot their surfaces are and how fast they move. All of this comes from one thing: the light of the star, spread out into its wavelengths. Lesson 7.4 showed why an atom gives light only at certain wavelengths: its electrons can only jump between fixed energy levels. This lesson shows how astronomers turn that fact into a way of reading the light of the Sun and the stars.

Spreading light out: the spectroscope#

A spectrum is light sorted by wavelength: how much light there is at each wavelength. The instrument that makes it is a spectroscope. Light enters through a narrow slit, a lens makes the beam parallel, and a prism (lesson 5.9) or a diffraction grating (lesson 5.11) sends each wavelength off at its own angle. A second lens makes an image of the slit for every wavelength. Because the slit is narrow, each wavelength gives a thin line, and the images of all the wavelengths side by side form the spectrum.

When the spectrum is recorded, on a photograph in the past and with a camera or electronic detector today, the instrument is called a spectrograph. Astronomers put spectrographs behind their telescopes. The result is often drawn as a graph: brightness up, wavelength along the bottom. Bright lines become peaks, dark lines become dips.

The same idea works far outside visible light. Spectra are measured for radio waves, infrared, ultraviolet, X-rays and gamma rays (lesson 5.8), each with its own kind of instrument.

Three kinds of spectra#

In 1859 the German physicist Gustav Kirchhoff summed up, in three rules, what kind of spectrum appears where.

  1. A hot solid, liquid or dense gas gives light of all wavelengths: a continuous spectrum, a smooth rainbow. The glowing filament of an old light bulb and the hot, dense inside of a star are examples. Its shape depends on the temperature, as lesson 7.2 showed.
  2. A hot, thin gas gives light only at a few sharp wavelengths: an emission spectrum, bright lines on a dark background. A discharge tube (lesson 7.4) and a glowing cloud of gas in space are examples.
  3. A cooler, thin gas in front of a hotter source of continuous light takes out some wavelengths: an absorption spectrum, a rainbow crossed by dark lines.

Rules 2 and 3 belong together: as lesson 7.4 showed, a gas absorbs at the same wavelengths at which it emits. And each element has its own set of lines, like a fingerprint.

Which kind you see also depends on where you stand. Look at a cool cloud of gas against a bright star behind it, and you see dark lines. Look at the same cloud from the side, with no star behind it, and you see the light the atoms send out again after absorbing: bright lines on a dark sky.

The graph shows the two kinds of line spectrum of one gas, here a mixture of hydrogen and helium. The slider moves the source; ignore it for now and leave it at 00.

A sketch computed from the laboratory wavelengths of four hydrogen lines (410.2, 434.0, 486.1 and 656.3 nm) and two helium lines (447.1 and 587.6 nm), each drawn as a narrow bump of the same shape; the continuous light behind the absorbing gas is drawn flat. At v=0v = 0 every dip of the absorption spectrum lies exactly under a peak of the emission spectrum. The slider gives the source a speed vv along the line of sight and moves the dips to λem(1+v/c)\lambda_\text{em}(1 + v/c): to the right (longer wavelengths) for a source moving away.

The dark lines in sunlight#

In 1802 the English scientist William Wollaston passed sunlight through a prism and noticed a few dark lines in the rainbow. In 1817 the German optician Joseph von Fraunhofer found them again with much better instruments, measured hundreds of them and labelled the strongest with letters. They are still called the Fraunhofer lines.

Kirchhoff's rules explain them. The deep, dense layers of the Sun are very hot and give a continuous spectrum. Above them lies thinner, cooler gas. Its atoms absorb the wavelengths of their own lines, so those wavelengths are missing from the light that reaches us: the Sun shows an absorption spectrum.

That makes the dark lines a list of ingredients. Kirchhoff compared them with the bright lines of elements heated in a flame in the laboratory. A flame with a little table salt in it, for example, glows yellow at two wavelengths close together, 589.0589.0 and 589.6 nm589.6\ \text{nm}: the lines of sodium. The Sun's spectrum has two dark lines at exactly those wavelengths (Fraunhofer's "D" lines), so the Sun contains sodium. In the same way iron and many other elements were found in the Sun.

Helium: found in the Sun first#

During a total eclipse of the Sun in 1868, the French astronomer Pierre Janssen pointed a spectroscope at the glowing gas at the edge of the hidden Sun. He saw bright lines, among them a yellow one at about 587.6 nm587.6\ \text{nm}. At first sight it looked like the sodium lines, but it was not at their wavelengths: it lay about 1.4 nm1.4\ \text{nm} away from the nearer of the two. No element known on Earth gave a line there.

The British astronomer Norman Lockyer, who studied the same line, concluded that it came from an element not yet known on Earth, and it was named helium, after helios, the Greek word for the Sun. For years helium was known only from the Sun's spectrum. In 1895 the Scottish chemist William Ramsay found it on Earth, in gas given off by a uranium mineral, and its lines matched the yellow line of 1868. Block 8 shows where most of the helium in the universe was made: in its first few minutes.

Worked example

What is the glowing cloud made of?

A spectrograph is pointed at a glowing cloud of gas in space, with no star behind it. It records bright lines at 410.2410.2, 434.0434.0, 447.1447.1, 486.1486.1, 587.6587.6, 656.3656.3 and 667.8 nm667.8\ \text{nm}, on a dark background. Use the laboratory wavelengths in the table to find which elements the cloud contains, and say what kind of gas it is.

ElementLaboratory wavelengths of strong visible lines
hydrogen410.2410.2, 434.0434.0, 486.1486.1, 656.3 nm656.3\ \text{nm}
helium447.1447.1, 501.6501.6, 587.6587.6, 667.8 nm667.8\ \text{nm}
sodium589.0589.0, 589.6 nm589.6\ \text{nm}

Kind of spectrum

Bright lines on a dark background form an emission spectrum, so by Kirchhoff's second rule the cloud is a hot, thin gas.

Hydrogen

410.2410.2, 434.0434.0, 486.1486.1 and 656.3 nm656.3\ \text{nm} are all four hydrogen lines of the table. The cloud contains hydrogen.

The other two lines

447.1447.1, 587.6587.6 and 667.8 nm667.8\ \text{nm} are helium lines, so the cloud contains helium too. The fourth helium line of the table, at 501.6 nm501.6\ \text{nm}, is the faintest of the four, so it is no surprise if it is weak or missing in one measurement.

Sodium?

The yellow line at 587.6 nm587.6\ \text{nm} is close to the sodium lines but 589.0−587.6=1.4 nm589.0 - 587.6 = 1.4\ \text{nm} away from the nearer one, far more than a good spectrograph can mistake, and there is no line at 589.0589.0 or 589.6 nm589.6\ \text{nm}. The cloud shows no sign of sodium. This is the very comparison that showed in 1868 that the yellow solar line was not sodium.

What else the spectrum tells#

The lines tell which elements a star contains. The spectrum tells much more.

  • Temperature. The continuous light of a star has the black-body shape of lesson 7.2, so where its peak lies gives the temperature of the star's surface (lesson 7.6 does this for the colours of stars). The lines tell it too: how strong each line is depends on how many atoms are in the right energy level to absorb it, and that depends on the temperature. In a very hot star much of the hydrogen is ionised, in a cool one most of its electrons sit in the ground state, and in both cases its visible lines are weak, because they are absorbed only by atoms whose electron is in the second level (lesson 7.4).
  • How much of each element. A stronger line usually means more atoms of that element, once the temperature is taken into account.
  • Motion. If the star moves towards us or away from us, all its lines shift (lesson 5.13). Lines that are broadened tell that the gas moves in different directions at once, as in a spinning star or a wind of gas blowing off it.
  • Other conditions. The detailed shape of the lines also tells the density of the gas and the strength of magnetic fields, and lines that change over time show that the star itself is changing.

Motion: the Doppler shift of lines#

Lesson 5.13 showed that the light of a source moving away arrives with longer wavelengths (a redshift), and the light of one moving towards us with shorter wavelengths (a blueshift). Spectral lines make this measurable: you know where a line of hydrogen or helium should be from the laboratory, so you can see how far it has moved. Write λem\lambda_\text{em} for the laboratory wavelength, λobs\lambda_\text{obs} for the wavelength we observe and Δλ=λobs−λem\Delta\lambda = \lambda_\text{obs} - \lambda_\text{em} for the shift. For a speed vv along the line of sight much smaller than the speed of light cc,

Doppler shift of a spectral line, for v much smaller than c
Δλλem=vc\frac{\Delta\lambda}{\lambda_\text{em}} = \frac{v}{c}
In words

capital delta lambda over lambda emitted equals v over c

Source: MIT 8.286 The Early Universe (Fall 2013), Lecture 3: The Doppler effect and special relativity (A. Guth), transcript, pp. 2–3: the redshift z = (λ_O − λ_S)/λ_S; pp. 3–5: z = v/u for a moving observer (p. 3) and nearly the same for a moving source when v/u is small (pp. 4–5); p. 19: the relativistic Doppler formula for light, z = √((1 + β)/(1 − β)) − 1 (that this is close to β = v/c for small β is our own step), pp. 3–5 (slow motion, z ≈ v/u) and p. 19 (the small-β approximation is our own step)

This is z≈v/cz \approx v/c of lesson 5.13, since z=Δλ/λemz = \Delta\lambda/\lambda_\text{em}. Here vv is positive for a source moving away (the line moves to longer wavelengths) and negative for one moving towards us. Turned round, it gives the speed:

Speed from the shift of a line
v=c Δλλemv = c\,\frac{\Delta\lambda}{\lambda_\text{em}}
In words

v equals c capital delta lambda over lambda emitted

Source: MIT 8.286 The Early Universe (Fall 2013), Lecture 3: The Doppler effect and special relativity (A. Guth), transcript, pp. 2–3: the redshift z = (λ_O − λ_S)/λ_S; pp. 3–5: z = v/u for a moving observer (p. 3) and nearly the same for a moving source when v/u is small (pp. 4–5); p. 19: the relativistic Doppler formula for light, z = √((1 + β)/(1 − β)) − 1 (that this is close to β = v/c for small β is our own step), pp. 3–5 and p. 19 (the small-β approximation is our own step)

Every line of the star shifts by the same fraction, so astronomers check the result with several lines at once. Only motion along the line of sight counts: a star moving sideways across the sky shows no shift. Move the slider of the graph above to see the whole pattern of dips slide; even at 9000 km/s9000\ \text{km/s}, 33 % of the speed of light, the red hydrogen line moves only about 20 nm20\ \text{nm}.

Worked example

A star with an invisible partner

In the laboratory the stronger sodium line lies at 589.0 nm589.0\ \text{nm}. In the spectrum of a star it is measured at 589.12 nm589.12\ \text{nm} one night and at 588.88 nm588.88\ \text{nm} a few nights later. Some nights after that it is back at 589.12 nm589.12\ \text{nm}, and the pattern repeats. What is happening?

First night

Δλ=589.12−589.0=+0.12 nm\Delta\lambda = 589.12 - 589.0 = +0.12\ \text{nm}, so v=c Δλ/λem=3.00×105 km/s×0.12/589.0=+61 km/sv = c\,\Delta\lambda/\lambda_\text{em} = 3.00 \times 10^{5}\ \text{km/s} \times 0.12/589.0 = +61\ \text{km/s}. The star moves away from us at 61 km/s61\ \text{km/s}.

A few nights later

Δλ=588.88−589.0=−0.12 nm\Delta\lambda = 588.88 - 589.0 = -0.12\ \text{nm}, so v=−61 km/sv = -61\ \text{km/s}: now it moves towards us at the same speed.

Check with the other sodium line

The line at 589.6 nm589.6\ \text{nm} must shift by the same fraction: 589.6×0.12/589.0=0.12 nm589.6 \times 0.12/589.0 = 0.12\ \text{nm}, so it should be found at 589.72 nm589.72\ \text{nm} on the first night. Finding the same speed from both lines shows that the shift is real.

Interpretation

A star that swings back and forth, 61 km/s61\ \text{km/s} away and then 61 km/s61\ \text{km/s} towards us, in a regular rhythm, is moving in an orbit. It must orbit a companion, even if the companion is too faint to see. The middle of the swing is (589.12+588.88)/2=589.00 nm(589.12 + 588.88)/2 = 589.00\ \text{nm}, exactly the laboratory value: the pair as a whole neither comes closer nor moves away. From the speed and the time of one swing, astronomers can work out the size of the orbit and the masses of the stars, with the laws of orbits of Block 2.

Shifts like these, a tenth of a nanometre or less, are measured routinely. The same method has found many planets around other stars: a planet pulls its star in a small orbit too, and the star's lines swing back and forth by a tiny amount.

Summary#

  • A spectroscope spreads light into its wavelengths with a slit and a prism or grating; a spectrograph records the spectrum, behind a telescope.
  • Kirchhoff's rules: a hot solid, liquid or dense gas gives a continuous spectrum; a hot thin gas gives bright emission lines; a cooler gas in front of a hotter source gives dark absorption lines, at the same wavelengths as that gas's emission lines.
  • The dark Fraunhofer lines in sunlight come from cooler gas above the Sun's hot surface; matching them with laboratory lines (such as sodium's at 589.0589.0 and 589.6 nm589.6\ \text{nm}) shows which elements the Sun contains.
  • Helium was found in the Sun's spectrum in 1868, as a yellow line at 587.6 nm587.6\ \text{nm} that matched no known element, and on Earth only in 1895.
  • A star's spectrum tells its composition, its temperature and its motion: the lines shift by Δλ/λem=v/c\Delta\lambda/\lambda_\text{em} = v/c for v≪cv \ll c, to longer wavelengths for a source moving away. A regular swing of the lines shows a star orbiting a companion.

Symbols on this page

Show the 10 symbols used here
Δ\Delta capital delta.
A change or difference in a quantity, e.g. Δx = x₂ − x₁. Say it: “capital delta”.
λ\lambda lambda.
Wavelength: the distance between two neighbouring points of a wave that are in phase. Unit: m. Say it: “lambda”.
≈\approx approximately equal.
Is approximately equal to. Say it: “is approximately”.
≪\ll much less than.
Is much less than. Say it: “is much less than”.
×\times times.
Times (multiplication). Between two vectors: the cross product. Say it: “times”.
zz z.
Redshift: the fraction by which a wavelength is stretched, z = (λ_obs − λ_em)/λ_em, so 1 + z = λ_obs/λ_em. Positive for a redshift, negative for a blueshift; no unit. Say it: “z”.
cc c.
The speed of light in a vacuum, c ≈ 3.00 × 10⁸ m/s, the same for every electromagnetic wave. Unit: m/s. Say it: “c”.
vv v.
Speed of the source along the line of sight: positive when it moves away from us, negative towards us. Unit: m/s (km/s). Say it: “v”.
λobs\lambda_{\text{obs}} observed wavelength.
The wavelength we observe, as the light reaches us. Unit: m. Say it: “lambda sub observed”.
λem\lambda_{\text{em}} emitted wavelength.
The wavelength the source sent out, as measured by someone moving with it (for a spectral line: its laboratory wavelength). Unit: m. Say it: “lambda emitted”.

Tap or click a symbol in a formula to see the same explanation. All symbols: symbols and notation.

Words on this page

Show the 18 words used here

Also used

wavelength.
The distance from one crest of a wave to the next. Explained in Waves: speed, frequency, wavelength.
energy.
A quantity, measured in joules, that a body or field has because of its motion, position or state; a closed system keeps its total. Explained in Conservation of energy.
spectrum.
The spread of light or other radiation over its wavelengths, or the full set of values a quantity such as energy can take. Explained in Light and the electromagnetic spectrum.
diffraction grating.
A plate with many evenly spaced slits or lines, which sends each colour of light off in its own sharp directions. Explained in Interference and diffraction.
graph.
The picture of a function: the curve y = f(x) for one variable, or the surface z = f(x, y) for two. Explained in Graphs, straight lines and slope.
ultraviolet.
Light with wavelengths shorter than violet, from about 10 to 400 nanometres, invisible to the eye. Explained in Light and the electromagnetic spectrum.
X-ray.
Light of very short wavelength, from about 0.01 to 10 nanometres, between ultraviolet light and gamma rays. Explained in Light and the electromagnetic spectrum.
continuous.
Without breaks, gaps or jumps: a continuous graph can be drawn without lifting the pen; a continuous quantity can take every value in a range. Explained in The rocket equation.
black body.
An ideal object that absorbs all light falling on it; when hot, it gives off radiation whose spectrum depends only on its temperature. Explained in Thermal radiation and Planck's photons.
ionization.
Removing one or more electrons from an atom or molecule, leaving it electrically charged. Explained in The Bohr atom and spectral lines.
ground state.
The state of a system with the lowest possible energy. Explained in The Bohr atom and spectral lines.
spin.
The built-in angular momentum of a particle such as an electron, which it has even at rest: a whole or half-whole multiple of ħ. Explained in Central potentials and angular momentum.
density.
How much of something (mass, charge, energy, particles or probability) there is in each unit of volume, area, length or other variable. Explained in Density and pressure.
magnetic field.
The field made by magnets and moving charges, which pushes sideways on other moving charges and turns compass needles. Explained in Magnetic fields and magnetic force.
redshift.
A stretching of light to longer wavelengths, so lines in a spectrum appear shifted towards the red. Explained in Towards the universe: an expanding gas cools.
spectral line.
A narrow bright or dark line in a spectrum, at a wavelength set by a particular kind of atom or molecule. Explained in Towards the universe: redshift, stretched light from moving sources.
galaxy.
A huge system of stars, gas and dust, from thousands to over a trillion stars, held together by gravity inside a dark matter halo. Explained in Towards the universe: weighing the Sun and the Galaxy with orbits.

Academic

ingredient.
One of the parts or assumptions that go into a theory, model or calculation.

Tap or click a word, here or in the text, for its meaning in this lesson. All words: the glossary. How many words are marked in the text: Reading options (the “Aa” button).

Where this leads

In cosmology

Pages that build on this

Practise

Check your understanding

  1. Light from a hot star passes through a cool, thin cloud of gas on its way to us. What kind of spectrum do we see?
  2. Where do most of the dark Fraunhofer lines in the Sun's spectrum come from?
  3. Why is helium named after the Sun?
  4. A helium line that lies at 501.6 nm501.6\ \text{nm} in the laboratory is measured at 502.1 nm502.1\ \text{nm} in the spectrum of a star. How fast does the star move along our line of sight?
  5. Night after night, the lines in the spectrum of a star move a little to longer wavelengths, then back to shorter ones, then to longer ones again, always with the same rhythm. What is the most likely explanation?
0 of 5 answered

Flashcards

1 / 5

Credits and license

This High School lesson is written in our own words from: Siyavula, Everything Science: Physical Sciences Grade 12, 12.3 Emission and absorption spectra; NASA Imagine the Universe, Spectra - Introduction (read 2026-11-20) (a spectrum as brightness against energy or wavelength; a simple spectrometer with a slit and a prism; continuous, emission and absorption spectra; each element has its own lines; what spectra reveal: composition, temperature and density, motion (line widths, lines shifting back and forth in an orbiting star), changes over time); NASA Science, Basics of Space Flight, Chapter 6: Electromagnetics (read 2026-11-20) (section Spectroscopy: Kirchhoff's three laws (1859) for continuous, bright-line and dark-line spectra; the dark Fraunhofer lines in the spectra of the Sun and other stars, observed by Fraunhofer in 1817; spectrometers and spectrographs).

  • Material from siyavula.com, by Siyavula Education, licensed under CC BY 3.0; we rewrote and adapted it in our own words.
  • Material from MIT OpenCourseWare, licensed under CC BY-NC-SA 4.0; rewritten and adapted.
  • NASA material is in the public domain in the United States; NASA does not endorse this site.

The authors of these sources do not endorse this site. All diagrams and plots on this page are generated by this site. This page is licensed CC BY-NC-SA 4.0: you may share and adapt it for non-commercial use with attribution, under the same license.