---
title: "Why early hydrogen glows or casts a shadow at 21 cm"
description: "Derive the 21 cm brightness temperature from spin temperature, the microwave background and optical depth, then see what sets its sign."
canonical_url: "https://sandboxphysics.com/stories/cosmic-dawn-21cm/spin-temperature-and-21cm-brightness/"
language: "en"
page_type: "story"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/stories/cosmic-dawn-21cm/spin-temperature-and-21cm-brightness/"
last_modified: "2026-11-12"
---

[Hearing the first stars in 21 cm hydrogen](https://sandboxphysics.com/stories/cosmic-dawn-21cm/)

# Why early hydrogen glows or casts a shadow at 21 cm

Sandbox Physics · 2026-11-12

Hydrogen is seen against the microwave background. Its 21 cm brightness is set by one comparison: if the spin temperature of the gas is above the background temperature the gas glows, and if it is below, the gas absorbs and casts a shadow. First starlight pulls the spin temperature towards the gas temperature; X-ray heating then decides whether that gas is warmer or colder than the background.

This chapter assumes exponentials and logarithms. The reionization chapter [Reading ionized bubbles through neutral hydrogen](https://sandboxphysics.com/stories/reionization/reading-a-neutral-hydrogen-map/) covers the special case of a very high spin temperature; here we drop that assumption. We use kelvin for temperature, megahertz for frequency and redshift $z$ for time, with larger $z$ meaning earlier.

## Frequency and the two hyperfine levels

The electron and proton spins in a hydrogen atom can be parallel or antiparallel. The parallel state sits higher by a tiny energy, and a transition between them carries a photon of rest frequency $\nu_{21}=1420.406\,\mathrm{MHz}$. Expansion lowers the frequency we receive:

$$
\nu_{\mathrm{obs}}=\frac{\nu_{21}}{1+z}.
$$

At $z=7.93$ this gives $159\,\mathrm{MHz}$; at $z=14.4$ it gives $92\,\mathrm{MHz}$. Each observed frequency selects one redshift, and so one distance along the line of sight.

Let $n_1$ and $n_0$ be the number densities in the upper and lower levels. The spin temperature $T_{\mathrm s}$ is defined by their ratio:

$$
\frac{n_1}{n_0}=3\exp\left(-\frac{T_\star}{T_{\mathrm s}}\right),\qquad T_\star=\frac{h\nu_{21}}{k_{\mathrm B}}=0.0682\,\mathrm K.
$$

The factor 3 counts the three upper states. $T_{\mathrm s}$ only describes how the atoms share the two levels. It equals the gas temperature only when something forces it to. [Furlanetto, Oh and Briggs 2006, §2.1](https://arxiv.org/abs/astro-ph/0608032v2)

## Brightness against the microwave background

The background is a blackbody of temperature $T_\gamma=2.7255\,\mathrm K\,(1+z)$. Radio astronomers express the change made by the gas as a brightness temperature. Radiative transfer through a slab of optical depth $\tau$, followed by redshifting to today, gives

$$
\delta T_{\mathrm b}=\frac{T_{\mathrm s}-T_\gamma}{1+z}\left(1-e^{-\tau}\right).
$$

The sign comes only from $T_{\mathrm s}-T_\gamma$. The factor $1-e^{-\tau}$ is the fraction of background light the gas can absorb and replace. [Furlanetto, Oh and Briggs 2006, equation 17](https://arxiv.org/abs/astro-ph/0608032v2)

For gas following the Hubble flow, with proper neutral hydrogen density $n_{\mathrm{HI}}$, Einstein coefficient $A_{10}=2.85\times10^{-15}\,\mathrm{s^{-1}}$ and Hubble rate $H(z)$,

$$
\tau=\frac{3hc^3A_{10}\,n_{\mathrm{HI}}}{32\pi k_{\mathrm B}T_{\mathrm s}\nu_{21}^2H(z)}.
$$

The optical depth falls as $1/T_{\mathrm s}$: cold gas absorbs strongly. [Furlanetto, Oh and Briggs 2006, equation 15](https://arxiv.org/abs/astro-ph/0608032v2)

When $\tau\ll1$, replace $1-e^{-\tau}$ by $\tau$. Inserting the cosmological density gives the widely used thin-gas form, with neutral fraction $x_{\mathrm{HI}}$:

$$
\delta T_{\mathrm b}\approx27\,x_{\mathrm{HI}}\left(\frac{\Omega_b h^2}{0.023}\right)\left(\frac{0.15}{\Omega_m h^2}\,\frac{1+z}{10}\right)^{1/2}\left(1-\frac{T_\gamma}{T_{\mathrm s}}\right)\,\mathrm{mK}.
$$

[Pritchard and Loeb 2012, equation 7](https://arxiv.org/abs/1109.6012v2) This form leaves out density and velocity fluctuations, which set the spatial pattern while leaving the mean unchanged.

## What sets the spin temperature

Three things try to set $T_{\mathrm s}$. Microwave photons pull it towards $T_\gamma$. Collisions and Lyman-alpha photons pull it towards the gas kinetic temperature $T_K$. Lyman-alpha photons do this by being absorbed and re-emitted, which can leave the atom in either hyperfine level; this is the Wouthuysen-Field effect. [Furlanetto, Oh and Briggs 2006, §2.3](https://arxiv.org/abs/astro-ph/0608032v2) The result is a weighted average of inverse temperatures:

$$
T_{\mathrm s}^{-1}=\frac{T_\gamma^{-1}+x_\alpha T_K^{-1}}{1+x_\alpha}.
$$

Here $x_\alpha$ is the dimensionless Lyman-alpha coupling. We neglect collisional coupling, which is weak in the low-density gas after redshift about 30, and take the Lyman-alpha colour temperature equal to $T_K$. [Furlanetto, Oh and Briggs 2006, equation 20](https://arxiv.org/abs/astro-ph/0608032v2) When $x_\alpha\gg1$ the spin temperature follows the gas; when $x_\alpha\ll1$ it returns to the background and the signal disappears.

## Example: heated gas at redshift 7.93

Take $T_K=300\,\mathrm K$ after X-ray heating, $x_\alpha=20$ and $x_{\mathrm{HI}}=0.734$. The background is $T_\gamma=24.34\,\mathrm K$.

1. Spin temperature: $T_{\mathrm s}^{-1}=(1/24.34+20/300.4)/21\,\mathrm{K^{-1}}$, so $T_{\mathrm s}=195\,\mathrm K$.
2. Optical depth from the full expression: $\tau=8.5\times10^{-4}$, so the thin approximation is excellent.
3. Brightness: $\delta T_{\mathrm b}=(195.1-24.3)\times8.47\times10^{-4}/8.93\,\mathrm K=16.2\,\mathrm{mK}$.

The thin-gas formula with $\Omega_bh^2=0.02237$ and $\Omega_mh^2=0.1424$ gives $16.4\,\mathrm{mK}$. The 1% difference comes from rounding in its coefficient. The gas glows, but only slightly, because $T_{\mathrm s}$ far above $T_\gamma$ makes the last factor close to one: heating beyond a few hundred kelvin hardly brightens it further.

## Example: unheated gas and saturated absorption

Remove the heating. A frozen CAMB calculation of the gas temperature with no astrophysical heating gives $T_K=1.72\,\mathrm K$ at $z=7.93$. With the same coupling, $T_{\mathrm s}=1.80\,\mathrm K$.

1. Optical depth: $\tau=0.0918$, about a hundred times larger than before.
2. Thin estimate: $(1.80-24.34)\times0.0918/8.93\,\mathrm K=-232\,\mathrm{mK}$.
3. Full expression: multiply by $(1-e^{-\tau})/\tau=0.956$, giving $-221\,\mathrm{mK}$.

Cold gas casts a shadow more than ten times deeper than heated gas glows. The thin approximation already errs by 5% here, and it would err more for colder or denser gas. That depth is what makes the HERA limits informative about heating.

## A history in four stages

After recombination the leftover free electrons keep the gas temperature tied to the microwave background until about $1+z\approx150\,(\Omega_bh^2/0.023)^{2/5}$. [Furlanetto, Oh and Briggs 2006, equation 66](https://arxiv.org/abs/astro-ph/0608032v2) Afterwards the gas cools adiabatically, $T_K\propto(1+z)^2$, faster than the background, $T_\gamma\propto1+z$. In the frozen CAMB table the gas is at $19.8\,\mathrm K$ at $z=30$, against $T_\gamma=84.5\,\mathrm K$, and at $2.60\,\mathrm K$ at $z=10$, against $30.0\,\mathrm K$.

Read the resulting history from early to late:

- Before stars, $x_\alpha$ is tiny, $T_{\mathrm s}\approx T_\gamma$ and the sky shows almost nothing.
- First starlight raises $x_\alpha$. $T_{\mathrm s}$ drops towards the cold gas and a deep absorption signal appears.
- X-rays heat the gas. Once $T_K$ passes $T_\gamma$ the signal changes sign and turns into emission.
- Reionization removes neutral hydrogen, and $x_{\mathrm{HI}}$ takes the signal to zero.

The timing of each stage depends on the first sources and is not known. The Lab draws coupling and heating as smooth steps with adjustable midpoints. Those steps are a teaching parameterization whose midpoints you set by hand, so that each stage can be moved on its own.

## Lab tasks

Open the [21 cm cosmic dawn Lab](https://sandboxphysics.com/labs/cosmic-dawn-21cm-foregrounds/) and use the history chart.

1. Predict the band-centre brightness when the heating handle sits at redshift 6, after the observed band, with coupling at 17. Drag it there and check that the gas is just below the background, so the signal is a faint shadow of about $-1\,\mathrm{mK}$. Then drag it to 9 and watch the brightness climb to about $16\,\mathrm{mK}$.
2. Choose the preset in which first starlight casts a shadow. Move only the coupling handle to redshift 10, below the observed band, and explain why the brightness readout approaches zero rather than turning positive.
3. Set the final coupling strength in the advanced settings to 2, then to 100. Compare the spin temperature readout with the gas curve each time and explain why the brightness changes from about $11\,\mathrm{mK}$ to about $17\,\mathrm{mK}$.

## Problems

1. At what redshift does hydrogen emit into a receiver tuned to $120\,\mathrm{MHz}$? What is $T_\gamma$ there?
2. Show from the spin temperature relation that $T_{\mathrm s}$ always lies between $T_K$ and $T_\gamma$.
3. Gas at $z=10$ has $T_K=2.60\,\mathrm K$, $x_{\mathrm{HI}}=1$ and strong coupling. Use the thin-gas formula to estimate $\delta T_{\mathrm b}$, then say whether the true value is larger or smaller in magnitude, and why.
4. A model heats the gas to $T_K=T_\gamma$ exactly at $z=9$. What is the 21 cm signal at that moment, whatever the coupling?

Explained answers

For the first problem, $1+z=1420.406/120=11.84$, so $z=10.84$ and $T_\gamma=2.7255\times11.84=32.3\,\mathrm K$.

For the second, write $T_{\mathrm s}^{-1}=w\,T_\gamma^{-1}+(1-w)\,T_K^{-1}$ with $w=1/(1+x_\alpha)$ between 0 and 1. An inverse temperature that is a weighted average of two inverse temperatures lies between them, so $T_{\mathrm s}$ lies between $T_K$ and $T_\gamma$.

For the third, $T_\gamma=29.98\,\mathrm K$ and strong coupling gives $T_{\mathrm s}\approx2.60\,\mathrm K$. The bracket is $(0.15/0.1424\times1.1)^{1/2}=1.076$ and the baryon factor is $0.973$, so $\delta T_{\mathrm b}\approx27\times0.973\times1.076\times(1-29.98/2.60)\,\mathrm{mK}\approx-298\,\mathrm{mK}$. The true magnitude is smaller, because $\tau$ is no longer small and $1-e^{-\tau}<\tau$.

For the fourth, $T_K=T_\gamma$ means $T_{\mathrm s}=T_\gamma$ for any $x_\alpha$, since both weighted temperatures are equal. The factor $T_{\mathrm s}-T_\gamma$ vanishes and so does the signal. A zero brightness can therefore come from fully neutral gas.

## Try it in the Lab

[21 cm cosmic dawn and radio foregrounds](https://sandboxphysics.com/labs/cosmic-dawn-21cm-foregrounds/): Drag the heating handle past the observed band and watch the brightness change sign.

## Sources

1. [Furlanetto, Oh and Briggs 2006, §2.1](https://arxiv.org/abs/astro-ph/0608032v2)
2. [Pritchard and Loeb 2012, equation 7](https://arxiv.org/abs/1109.6012v2)

## Keep reading

Hearing the first stars in 21 cm hydrogen · Reading path

### From hydrogen brightness to a HERA upper limit

1. [Article **Finding faint early hydrogen under a bright radio sky**](https://sandboxphysics.com/stories/cosmic-dawn-21cm/finding-hydrogen-under-radio-foregrounds/)
2. [You are here **Why early hydrogen glows or casts a shadow at 21 cm**](https://sandboxphysics.com/stories/cosmic-dawn-21cm/spin-temperature-and-21cm-brightness/)
3. [Article **How one baseline separates smooth foregrounds from hydrogen**](https://sandboxphysics.com/stories/cosmic-dawn-21cm/delay-spectrum-and-foreground-wedge/)
4. [Article **Turning delay power into a bandpower without losing the signal**](https://sandboxphysics.com/stories/cosmic-dawn-21cm/power-spectrum-window-and-signal-loss/)
5. [Article **Recompute HERA's upper limits and compare a model through its window**](https://sandboxphysics.com/stories/cosmic-dawn-21cm/recompute-hera-window-comparison/)
6. [Article **Reading how HERA kept foregrounds out of its first limits**](https://sandboxphysics.com/stories/cosmic-dawn-21cm/reading-hera-foreground-avoidance/)
