---
title: "How far sound travelled before the drag epoch"
description: "Derive the sound speed of the photon-baryon fluid, integrate it to the drag epoch, and see why more baryons make the cosmic ruler shorter."
canonical_url: "https://sandboxphysics.com/stories/baryon-acoustic-oscillations/how-far-sound-travelled-before-the-drag-epoch/"
language: "en"
page_type: "story"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/stories/baryon-acoustic-oscillations/how-far-sound-travelled-before-the-drag-epoch/"
last_modified: "2026-11-14"
---

[Baryon acoustic oscillations](https://sandboxphysics.com/stories/baryon-acoustic-oscillations/)

# How far sound travelled before the drag epoch

Sandbox Physics · 2026-11-14

The length of the cosmic ruler is the comoving distance a sound wave could cover in the photon-baryon fluid before the baryons were released, at the drag epoch near redshift 1060. Sound in that fluid moves at $c/\sqrt{3(1+R)}$, where $R$ measures how much the baryons weigh down the photons. Integrating that speed over the expansion gives $r_d \approx 147\,\mathrm{Mpc}$ for the parameters preferred by Planck. More baryons slow the sound and shorten the ruler. This chapter derives the speed, sets up the integral and checks it against a full Boltzmann code.

It assumes you know that the universe expands with a scale factor $a$, equal to 1 today and $1/(1+z)$ at redshift $z$, and that the [concept article](https://sandboxphysics.com/stories/baryon-acoustic-oscillations/how-galaxy-pairs-measure-the-universe/) has introduced the acoustic shell.

## The speed of sound in a photon-baryon fluid

Before recombination, photons scatter so often off free electrons that photons, electrons and nuclei move together. For sound, this is a single fluid. Its pressure comes almost entirely from the photons, $p = \rho_\gamma c^2/3$. Its inertia comes from the photons and the baryons together.

For a fluid the sound speed squared is the change of pressure with energy density, $c_s^2 = \delta p / \delta\rho$. A compression that keeps the photon-to-baryon ratio fixed changes the photon energy density by $\delta\rho_\gamma$ and the baryon density by $\delta\rho_b = \tfrac{3}{4}(\rho_b/\rho_\gamma)\,\delta\rho_\gamma$, because photon energy density scales as the fourth power of temperature and baryon density as the third. Then

$$
c_s^2 = \frac{c^2}{3}\,\frac{\delta\rho_\gamma}{\delta\rho_\gamma + \delta\rho_b} = \frac{c^2}{3\,(1+R)}, \qquad R \equiv \frac{3\rho_b}{4\rho_\gamma} .
$$

With no baryons, $R = 0$ and sound moves at $c/\sqrt{3}$, the speed for pure radiation. Baryons add inertia without adding pressure, so they slow it.

Baryon density falls as $a^{-3}$ and photon density as $a^{-4}$, so $R$ grows in proportion to $a$. In terms of the physical densities $\omega_b = \Omega_b h^2$ and $\omega_\gamma = \Omega_\gamma h^2$,

$$
R(a) = \frac{3\,\omega_b}{4\,\omega_\gamma}\,a .
$$

For a microwave background at $2.7255\,\mathrm{K}$, $\omega_\gamma = 2.473\times10^{-5}$.

Worked example. Take $\omega_b = 0.02236$ and the drag epoch at $z_d = 1058.3$. Then $3\omega_b/4\omega_\gamma = 678.1$ and $a_d = 1/1059.3$, so $R = 0.640$. The sound speed there is $c/\sqrt{3 \times 1.640} = 0.451\,c$, already well below the radiation value $0.577\,c$.

## Adding up the distance

A wave moving at $c_s$ covers a comoving distance $c_s\,dt/a$ in a time $dt$. Comoving means measured on a grid that expands with the universe, so it is the length the shell still has today in today's units. Since $dt = -dz/[(1+z)H]$ and $1/a = 1+z$, the total is

$$
r_d = \int_{z_d}^{\infty} \frac{c_s(z)}{H(z)}\,dz .
$$

This is equation 1 of the DESI DR2 cosmology paper. Before the drag epoch the universe holds radiation and matter, and dark energy is negligible. With $\omega_r = \omega_\gamma\,(1 + 0.2271\,N_{\mathrm{eff}})$ for photons plus three light neutrino species, and $\omega_m$ for baryons plus cold dark matter,

$$
H(a) = 100\,\mathrm{km\,s^{-1}\,Mpc^{-1}}\,\sqrt{\omega_r\,a^{-4} + \omega_m\,a^{-3}} .
$$

Change the variable to $a$, using $dz/H = da/(a^2 H)$:

$$
r_d = \frac{c}{100\,\mathrm{km\,s^{-1}\,Mpc^{-1}}}\int_0^{a_d} \frac{da}{\sqrt{3\,\bigl(1 + R(a)\bigr)\,\bigl(\omega_r + \omega_m a\bigr)}} .
$$

The prefactor is $2997.9\,\mathrm{Mpc}$. The integrand is smooth at $a = 0$, so a few points of Gaussian quadrature are enough. Notice that $h$ has dropped out. Given the physical densities $\omega_b$, $\omega_m$ and $\omega_r$, the ruler has a fixed length in megaparsecs.

Worked example. Without baryons, $R = 0$ and the integral can be done by hand:

$$
r_d\big|_{R=0} = \frac{2\times 2997.9\,\mathrm{Mpc}}{\sqrt{3}\,\omega_m}\left(\sqrt{\omega_r + \omega_m a_d} - \sqrt{\omega_r}\right) .
$$

With $\omega_m = 0.1432$, $N_{\mathrm{eff}} = 3.044$ so that $\omega_r = 4.183\times10^{-5}$, and $a_d = 1/1059.3$, this gives $165.3\,\mathrm{Mpc}$. Doing the integral numerically with $\omega_b = 0.02236$ in $R$ gives $147.05\,\mathrm{Mpc}$. The baryons shorten the ruler by about 11 percent.

## When does the drag epoch happen?

The upper limit $a_d$ is not set by the fluid equations. It depends on recombination: how fast electrons join nuclei, and when the remaining photons can no longer push the far more numerous baryons. That needs atomic physics and is done by codes such as CLASS. The DR2 paper quotes $z_d \approx 1060$.

For hand work, DESI gives a fit to such codes, equation 2 of the same paper:

$$
r_d = 147.05\,\mathrm{Mpc}\left(\frac{\omega_b}{0.02236}\right)^{-0.13}\left(\frac{\omega_{bc}}{0.1432}\right)^{-0.23}\left(\frac{N_{\mathrm{eff}}}{3.04}\right)^{-0.1} ,
$$

with $\omega_{bc} = \omega_b + \omega_c$. We ran CLASS v3.4.2 with $\omega_c = 0.12084$, a $0.06\,\mathrm{eV}$ neutrino and $N_{\mathrm{eff}} = 3.044$. At $\omega_b = 0.02236$ it gives $146.89\,\mathrm{Mpc}$ and $z_d = 1059.9$, which is 0.11 percent below equation 2.

**Table 2.1** Equation 2 against our CLASS run, cold dark matter held at $\omega_c = 0.12084$.

| $\omega_b$ | Equation 2 | CLASS v3.4.2 | CLASS $z_d$ |
| --- | --- | --- | --- |
| $0.019$ | $151.02\,\mathrm{Mpc}$ | $150.76\,\mathrm{Mpc}$ | $1051.9$ |
| $0.02236$ | $147.05\,\mathrm{Mpc}$ | $146.89\,\mathrm{Mpc}$ | $1059.9$ |
| $0.026$ | $143.36\,\mathrm{Mpc}$ | $143.04\,\mathrm{Mpc}$ | $1067.7$ |

The Lab takes $r_d$ from equation 2 and then solves for the drag redshift at which the integral above reaches it. That gives $z_d = 1058.3$ at the default baryon density, 1.6 below the CLASS value. The difference is the price of skipping recombination physics. It affects only the animation clock, because the ruler length comes from equation 2.

## Why more baryons give a shorter ruler

Raising $\omega_b$ does two things. It raises $R$ at every time, which slows the sound. It also moves the drag epoch slightly earlier, to larger $z_d$: with more baryons for each photon, the photons lose their grip on them sooner. Both shorten the ruler. Raising the dark matter density makes the universe expand faster at a given $a$, leaving less time for the wave, so $r_d$ falls with $\omega_{bc}$ too.

Worked example. Raise $\omega_b$ from $0.02236$ to $0.026$ with $\omega_c$ fixed. Equation 2 gives $143.36\,\mathrm{Mpc}$, 2.5 percent shorter. A survey analysed with the old ruler as its template would find the bump at a separation 2.5 percent smaller than the template predicts, and would fit a dilation of $147.05/143.36 = 1.026$ in every direction.

There is a catch for real data. A BAO survey measures distances divided by $r_d$. On its own it fixes the product of the Hubble constant and the ruler. DESI DR2 quotes $h\,r_d = 101.54 \pm 0.73\,\mathrm{Mpc}$. To separate the two, analyses add the baryon density from the abundances of light elements made in the first minutes, or from the microwave background.

## Lab tasks

1. Open the More baryons, shorter ruler preset. Read the sound horizon and both fitted stretches, and compare them with the worked example.
2. Press play and watch the clock. Note the redshift at which the shells stop growing.
3. Move the baryon density across its full range and read the sound horizon at each end. Compare both values with the CLASS column of the table.

## Exercises

1. Evaluate the sound speed at $z = 3000$ for $\omega_b = 0.02236$.
2. Show that $R = 1$ would need $a = 1.47\times10^{-3}$, and say whether that happens before or after the drag epoch.
3. Use equation 2 to find $r_d$ for $\omega_b = 0.019$ with $\omega_c = 0.12084$. Compare with CLASS.
4. A paper quotes $r_d = 99.05\,h^{-1}\,\mathrm{Mpc}$ for $h = 0.6736$. Convert it to Mpc.
5. Explain in one sentence why the comoving shell radius does not keep growing after the drag epoch, even though the universe keeps expanding.

Answers

1. At $z = 3000$, $a = 1/3001$ and $R = 678.1/3001 = 0.226$. Then $c_s = c/\sqrt{3\times1.226} = 0.521\,c$.
2. $R = 678.1\,a = 1$ gives $a = 1/678.1 = 1.47\times10^{-3}$, that is $z = 677$. That is after the drag epoch at $z \approx 1060$, so before the drag epoch $R$ is always below 1 and the photons still dominate the inertia.
3. $\omega_{bc} = 0.13984$. Then $r_d = 147.05 \times (0.019/0.02236)^{-0.13} \times (0.13984/0.1432)^{-0.23} = 151.02\,\mathrm{Mpc}$. CLASS gives $150.76\,\mathrm{Mpc}$, 0.17 percent lower.
4. $99.05/0.6736 = 147.05\,\mathrm{Mpc}$.
5. After the drag epoch the baryons no longer feel the photon pressure, so the wave stops moving relative to the expanding grid. Comoving coordinates already take out the expansion, so the shell keeps a fixed comoving radius, while its physical size grows with $a$.

For Lab task 3: the slider runs from $0.019$ to $0.026$, and the Lab follows equation 2, so it shows about $151.0$ and $143.4\,\mathrm{Mpc}$. Both sit 0.2 percent above CLASS, well inside the 2.5 percent shift the preset demonstrates.

Sources: [DESI DR2 Results II, equations 1 and 2 for the sound horizon](https://arxiv.org/abs/2503.14738v3), [Eisenstein, Seo and White 2007, the photon-baryon sound wave and the drag epoch](https://arxiv.org/abs/astro-ph/0604361v1), [DESI 2024 III, fiducial cosmology](https://arxiv.org/abs/2404.03000v1).

[Raise the baryon density to 0.026 and predict how far the bump moves before you look.](https://sandboxphysics.com/labs/baryon-acoustic-ruler/)

## Sources

1. [DESI DR2 Results II, equations 1 and 2 for the sound horizon](https://arxiv.org/abs/2503.14738v3)
2. [Eisenstein, Seo and White 2007, the photon-baryon sound wave and the drag epoch](https://arxiv.org/abs/astro-ph/0604361v1)
3. [DESI 2024 III, fiducial cosmology](https://arxiv.org/abs/2404.03000v1)

## Keep reading

Baryon acoustic oscillations · Reading path

### From a sound wave to galaxy pair counts and DESI distances

1. [Article **How can pairs of galaxies measure the universe?**](https://sandboxphysics.com/stories/baryon-acoustic-oscillations/how-galaxy-pairs-measure-the-universe/)
2. [You are here **How far sound travelled before the drag epoch**](https://sandboxphysics.com/stories/baryon-acoustic-oscillations/how-far-sound-travelled-before-the-drag-epoch/)
3. [Article **Counting galaxy pairs against a random catalogue**](https://sandboxphysics.com/stories/baryon-acoustic-oscillations/counting-galaxy-pairs-with-randoms/)
4. [Article **Reading the ruler along and across the line of sight**](https://sandboxphysics.com/stories/baryon-acoustic-oscillations/along-and-across-the-line-of-sight/)
5. [Article **Measure a correlation function from a DESI data patch**](https://sandboxphysics.com/stories/baryon-acoustic-oscillations/measure-a-desi-patch-correlation-function/)
6. [Article **How to read the DESI BAO results**](https://sandboxphysics.com/stories/baryon-acoustic-oscillations/reading-desi-bao-results/)
