When an ambulance passes you on Avenida Boyacá in Bogotá, the siren sounds higher-pitched as it approaches and lower as it moves away. The sound does not change: what reaches you changes, because the source is moving. The same happens with light, and thanks to that we know how fast a star hundreds of trillions of kilometers away is moving, how fast the Sun spins and that galaxies are moving away from one another. The tool is the spectrum: light broken into its colors, with fine lines that are the fingerprint of each element.
1. Three kinds of spectrum: Kirchhoff’s laws
If you pass light through a prism or a grating, it opens up into a fan of colors: a spectrum. In 1814 Joseph von Fraunhofer noticed that the Sun’s spectrum was crossed by hundreds of dark lines, and named them with letters (A, B, C, D…). In 1859–1860 Gustav Kirchhoff and Robert Bunsen discovered where they came from, and summarized it in three rules:
- A hot, dense solid, liquid or gas emits a continuous spectrum: all colors without gaps (it is the blackbody curve of the previous lesson).
- A hot, tenuous gas emits only certain wavelengths: an emission spectrum, bright lines on a dark background. Each element has its own set of lines, like a barcode.
- If continuous light passes through a tenuous, cooler gas, the gas absorbs exactly the wavelengths it would emit if it were hot: an absorption spectrum appears, dark lines on the continuum.
The Sun is case 3: the dense photosphere emits the continuum and the atmosphere, cooler and more tenuous, imprints the dark lines. Fraunhofer’s “D” line, for example, is actually a pair of sodium lines at 589.0 and 589.6 nm; the “C” line, at 656.3 nm, belongs to hydrogen. That is how, without traveling, we learned what the Sun is made of, and how helium was discovered in 1868 in the solar spectrum before it was found on Earth.
2. The barcode of hydrogen: the Balmer series

Hydrogen is the simplest and most abundant element in the universe, and its visible lines follow a formula that the Swiss schoolteacher Johann Balmer found in 1885 by pure numerical trial. In the form Rydberg gave it:
where:
- is the wavelength of the line (in meters);
- is the Rydberg constant for hydrogen;
- is an integer greater than 2 (today we know it is the energy level from which the electron jumps down to level 2).
Worked example 1: the Hα line. With :
It is Hα (H-alpha), the red line of hydrogen. The tables give 656.28 nm: the 0.03 % difference is because in air light travels a little more slowly than in vacuum and wavelengths are measured slightly shorter. In this lesson we will use for Hα.
Repeat the calculation with and you will get the complete series:
| Line | Computed (vacuum) | Measured in air (NIST) | Color | ||
|---|---|---|---|---|---|
| Hα | 3 | 5/36 = 0.1389 | 656.5 nm | 656.28 nm | red |
| Hβ | 4 | 3/16 = 0.1875 | 486.3 nm | 486.13 nm | blue-green |
| Hγ | 5 | 21/100 = 0.21 | 434.2 nm | 434.05 nm | violet |
| Hδ | 6 | 2/9 = 0.2222 | 410.3 nm | 410.17 nm | violet |
As grows, becomes tiny and the lines crowd together toward the Balmer limit, nm, already in the ultraviolet. That sequence of lines, closer and closer together, is unmistakable: seeing it in the spectrum of a star is enough to know that there is hydrogen there.
3. The Doppler effect: the lines move

Christian Doppler proposed in 1842 that the color of light should change if the source moves, just like the pitch of a sound. For light, when the velocity is much smaller than , the rule is a proportion:
where:
- is the wavelength of the line at rest (the laboratory one, e.g. 656.28 nm for Hα);
- is the wavelength observed in the spectrum of the object;
- is the radial velocity: the component of the velocity along the line of sight. Positive if the object is receding (, the lines shift toward the red), negative if it is approaching (blueshift);
- km/s is the speed of light.
Notice what the formula says: the relative shift is the same fraction for all the lines of the spectrum. That is why astronomers do not measure one line but compare the whole pattern: if the entire barcode appears stretched by 0.1 %, the source is receding at km/s. And the formula only reports the radial component: a star moving “sideways” across the sky shows no Doppler shift.
Worked example 2: Barnard’s Star. It is the star with the largest proper motion in the sky and it is also coming toward us: its radial velocity is km/s. Where does its Hα appear?
so nm. A shift of a quarter of a nanometer: invisible to the eye (the star does not “look blue”), but easy to measure with a spectrograph.
Worked example 3: the other way around, from the line to the velocity. In the spectrum of a star the Hβ line appears at 486.42 nm instead of 486.13 nm. Then nm and
the star is receding at about 180 km/s. This is how, in 1868, William Huggins measured for the first time the velocity of a star (Sirius), and it has been the standard method ever since.
4. Three real cases

The Sun spins
The Sun rotates with a sidereal period of 25.38 days (609.12 h, value adopted by NASA at 16° latitude) and its radius is km. A point on its surface near the equator moves at
The east limb of the Sun comes toward us at 2 km/s and the west limb recedes at 2 km/s. In Hα:
Between one limb and the other the line shifts by picometers. It is tiny, but measurable, and this is how it was discovered that the Sun spins faster at the equator than at the poles (differential rotation). With the same technique the rotation of other stars, which we cannot see as disks, is measured: a star that spins fast shows broadened lines, because one limb shifts them to the blue and the other to the red at the same time.
Andromeda is approaching
The Andromeda Galaxy (M31) has heliocentric radial velocity km/s: its light arrives blueshifted. Its Hα appears at
Part of that velocity is the motion of the Sun within the Milky Way; once subtracted, the two galaxies approach each other at about 110 km/s. We will come back to this in the Milky Way lesson.
A cluster of galaxies recedes: the redshift
The Coma cluster, at 85.6 Mpc, recedes at km/s (Hubble telescope Key Project). The ratio
is called the redshift . Hα comes out at nm, 15.6 nm further to the red. This is what Hubble compared with distances to discover the expansion of the universe (lesson The universe is expanding). A warning: only holds for . For very distant galaxies, with close to or greater than 1, the correct formula is relativistic and the “shift” is due to the expansion of space, not to motion through it. What is always measured directly is .
What about a planet?
A planet cannot be seen, but it makes its star wobble. 51 Pegasi, the first Sun-like star with a known planet (Mayor and Queloz, 1995), moves toward and away from us with a semi-amplitude of only m/s and a period of 4.23 days. In Hα that is
one part in five million. No school spectroscope detects it, but with stabilized spectrographs and thousands of lines measured at once, precisions of 1 m/s are reached today. All of “exoplanet hunting by radial velocity” is this same proportion taken to the extreme.
Simulator: the continuum on which the lines are drawn
The blackbody simulator shows the continuous spectrum of a star: it is the “background” on which the stellar atmosphere imprints its absorption lines.
- Set the temperature of the Sun (5772 K). Locate on the horizontal axis where Hα (656 nm) and Hβ (486 nm) would fall: in which region of the curve are they? Does the Sun emit a lot or a little continuum there?
- Go down to 3000 K (a red dwarf). By how much does the continuum drop at 410 nm (Hδ) relative to 656 nm? Explain why in cool stars the violet Balmer lines are hard to see.
- Go up to 25 000 K. The continuum is extremely intense in the blue and the ultraviolet, but in these stars the Balmer lines are weak: almost all the hydrogen is ionized and cannot absorb. The Balmer lines are strongest near 10 000 K (type A stars, like Sirius and Vega).
- T
- 5,772 K
- λmax
- 502 nm
- B−V
- 0.65
- σT⁴
- 6.29 × 10⁷ W/m²
- L/L☉
- 1.00
- Mbol
- 4.74
Activity: a spectroscope with a CD
A CD has its data recorded on a spiral track whose turns are 1.6 μm apart (IEC 60908 standard). Those 625 grooves per millimeter act as a diffraction grating: each wavelength is deflected by a different angle according to
where is the spacing between grooves, the deflection angle, the order of the spectrum and the wavelength.
You need:
- a CD (or a DVD: its spacing is 0.74 μm and it disperses more);
- a small cardboard box (a shoebox or cereal box), black tape, a utility knife and a ruler;
- a protractor and a sheet of white paper;
- light sources: an incandescent bulb or a candle flame (continuum), a fluorescent tube or compact fluorescent bulb (mercury lines), a sodium street lamp if there is one nearby, and daylight reflected off a wall (never look at the Sun directly, not even with the spectroscope).
- Cut at one end of the box a slit 1 mm wide and 2 cm tall (two pieces of black tape almost touching give a clean edge). At the opposite end make a window and glue the CD inside, tilted about 60° with respect to the slit, with the shiny side facing it. Close the box: the light enters through the slit, reflects off the CD and comes out through the window broken into colors.
- Point the slit at the incandescent bulb. You will see a continuous rainbow (Kirchhoff’s law 1). Draw what you see.
- Point at the fluorescent tube: on a faint background, separate bright lines appear, blue-violet, green and yellow-orange: they are mercury lines at 436, 546 and 577–579 nm (law 2). Draw their relative positions.
- Point at a white wall lit by the Sun. With a fine slit and patience, some dark Fraunhofer lines can be seen on the continuum (law 3); the easiest is the sodium D line, in the yellow.
- Measuring the grating. Take the CD out of the box. Point a red laser pointer (λ ≈ 650 nm) perpendicular to the CD toward a wall 1 m away; measure with the ruler the distance between the central reflection and the first side spot (), compute and then and . With obtain . With m and nm you expect , . (If there is no laser, compute at what angle the 656 nm red and the 410 nm violet should come out and compare it with the width of the rainbow you see.)
Final question: the red of Hα comes out at 24° and the violet of Hδ at 15°. If a star were receding at 3000 km/s, Hα would shift by 6.6 nm. By how many degrees would its exit angle change on your CD? Could you notice it with a protractor? What would you need to measure the shift of Barnard’s Star (0.24 nm)?
Exercises
Basic level
- Compute with Balmer’s formula the wavelength of the line with (Hε). Is it visible?
Show solution
; ; nm (in air, 397.0 nm). It is at the violet limit: for most eyes it is no longer visible.
- A star recedes at 30 km/s. At what wavelength does its Hα appear?
Show solution
nm; nm.
- In the spectrum of Arcturus the Hα line is at 656.27 nm. Is it approaching or receding, and at what velocity?
Show solution
nm, so it is approaching: km/s. With only two decimal places in the result has a single significant figure: the rounding error of nm is equivalent to km/s.
Intermediate level
- Earth orbits the Sun at 29.8 km/s. If you observe a star located in the direction of Earth’s motion, by how much does its Hα shift compared with what you would see six months later? Why do catalogs give “heliocentric” velocities?
Show solution
Today Earth moves toward the star ( km/s) and in six months it moves away (): the difference is 59.6 km/s, that is nm. For the velocity of a star to be a fixed datum you have to subtract Earth’s motion and refer it to the Sun: heliocentric velocity.
- To see the rotation of the Sun in Hα you have to distinguish a shift of 8.8 pm between the two limbs. The resolving power of a spectrograph is . What is needed? A CD spectroscope has : what is the minimum velocity it can measure?
Show solution
. With , nm and km/s: it would only be useful for distant galaxies, not for stars.
- A galaxy has . Compute its recession velocity and, with Hubble’s law and km/s/Mpc, its distance in Mpc and in millions of light-years (1 Mpc = 3.26 million light-years).
Show solution
km/s; Mpc million light-years.
Challenge level
- In a binary star, the Hα line of one of the components oscillates between 656.13 and 656.43 nm with a period of 10.0 days. Assuming a circular orbit seen edge-on, compute the orbital velocity and the radius of the orbit in km and in au (1 au = km).
Show solution
The semi-amplitude is nm: km/s. In a circular orbit, , so km au: closer to its companion than Mercury is to the Sun.
- The ELODIE spectrograph with which 51 Pegasi b was discovered had , that is, nm at Hα. The shift produced by the planet is nm. How many times smaller is the shift than the minimum resolvable separation? How is it possible to measure it, then?
Show solution
times. One does not try to “see” the displacement of a line: the position of the center of each line is measured with a precision much better than its width (like locating the center of a mountain more precisely than its width) and thousands of lines are averaged. That way the error drops to a few m/s.
- A classmate applies to a quasar with and concludes that it is receding at twice the speed of light. Explain what is wrong and what can indeed be stated.
Show solution
The proportion is only valid for (and ). For large the relativistic formula is needed, which never gives ; besides, in cosmology the shift is due to the expansion of space and the “velocity” loses its usual meaning. What is exact: each wavelength of the quasar arrives multiplied by (Hα, for example, at 1969 nm, in the infrared), and the universe was three times more compact when that light left.
✦ Mini-quiz
Key takeaways
- Kirchhoff: hot dense solid or gas → continuum; hot tenuous gas → emission lines; continuum through cool tenuous gas → absorption lines. The Sun and the stars are the third case.
- Balmer: ; Hα = 656.28 nm, Hβ = 486.13 nm, Hγ = 434.05 nm, Hδ = 410.17 nm; limit 364.7 nm.
- Doppler: (for ). Red = receding, blue = approaching. It is the same fraction for all the lines.
- Barnard: −110.5 km/s → −0.24 nm. Sun: ±2 km/s → ±4.4 pm. Andromeda: −301 km/s. Coma: . 51 Peg: 56 m/s → nm.
- A CD is a grating of 625 lines/mm: .
🍎 Teacher guide
- Time
- 3 sessions of 55 min
- Colombian national standard (MEN)
- Natural Sciences, Grades 8 to 9: “I recognize and differentiate models to explain the nature and behavior of light”; “I use mathematics as a tool to model, analyze and present data”; “I take measurements with instruments suited to the characteristics and magnitudes of the objects of study and express them in the corresponding units”; “I inquire about technological advances in communications and explain their implications for society”. Mathematics, Grades 8 to 9: “I use scientific notation to represent measurements of quantities of different magnitudes”; “I identify relations between properties of graphs and properties of algebraic equations”; “I select and use techniques and instruments to measure lengths, surface areas, volumes and angles with appropriate levels of precision”.
- Evidence of learning
- Classifies spectra observed with the CD according to Kirchhoff's laws, computes the Balmer lines with the Rydberg formula, converts line shifts into radial velocities (and vice versa) with the proportion Δλ/λ = v/c in real cases, and measures the pitch of the CD grating with the equation d·sin θ = λ.
Materials
- CD or DVD, cardboard box, black tape, utility knife, ruler and protractor (per group)
- Incandescent bulb or candle, fluorescent tube, red laser pointer (with supervision)
- Scientific calculator
- Computer or tablet with the blackbody simulator
Suggested sequence
Session 1. Spectra and Balmer (55 min). Opening with the ambulance siren and the question “how do we know what the Sun is made of?” (10 min). Kirchhoff’s laws with a fluorescent tube and a candle seen through a loose CD (15 min). Balmer’s formula: example 1 on the calculator and the complete table shared out among groups () (20 min). Closing: exercise 1 and reading of the NIST table (10 min).
Session 2. Doppler with real data (55 min). Proportion and sign (10 min). Examples 2 and 3 (15 min); rotation of the Sun, Andromeda and Coma in groups, each one presents its case (20 min). Exercises 2, 3 and 6 (10 min).
Session 3. Building the spectroscope (55 min). Assembly of the box (20 min), observation of the three sources and drawing of the spectra (15 min), measurement of with the laser (10 min), final question and mini-quiz (10 min). Challenges 7–9 as homework; number 8 connects with the exoplanets lesson.
Common mistakes
- Believing that a receding star “looks red”. The shift is fractions of a nanometer; the color of a star is set by its temperature (previous lesson), not its velocity.
- Thinking that the Doppler effect measures the total velocity. It only measures the radial component; the transverse motion is measured with the proper motion across the sky.
- Confusing λ₀ with λ_obs when computing Δλ and getting the sign backwards. Fix the convention: Δλ = λ_obs − λ₀; positive = receding.
- Looking at the Sun with the spectroscope. Forbid it explicitly; use a lit wall.
- Applying v = cz to large z (exercise 9). Emphasize the condition v ≪ c.