Lesson 6 of 15

CMB Temperature

CMB Temperature

After the Big Bang, the universe was a hot, dense plasma of photons, electrons, and protons. As the universe expanded and cooled, photons decoupled from matter at recombination (z ≈ 1089, T ≈ 3000 K). These photons now form the Cosmic Microwave Background (CMB) — the oldest light in the universe — at a temperature of T₀ = 2.725 K.

Temperature Scaling with Redshift

As the universe expands, the photon temperature scales inversely with the scale factor:

T(z)=T0(1+z)T(z) = T_0 \cdot (1 + z)

At recombination (z = 1089): T ≈ 2970 K.

Photon Number Density

The photon number density is given by the Bose-Einstein distribution:

nγ=2ζ(3)π2(kBTc)3n_\gamma = \frac{2\zeta(3)}{\pi^2} \left(\frac{k_B T}{\hbar c}\right)^3

where ζ(3) ≈ 1.20206 is the Apéry constant. At T₀ = 2.725 K, this gives roughly 411 photons/cm³ — outnumbering baryons by a factor of ~10⁹.

Constants: k_B = 1.381 × 10⁻²³ J/K, ℏ = 1.055 × 10⁻³⁴ J·s, c = 2.998 × 10⁸ m/s

Wien's Displacement Law

The peak wavelength of the CMB blackbody spectrum:

λmax=bT\lambda_{\max} = \frac{b}{T}

where b = 2.898 × 10⁻³ m·K. At T₀ = 2.725 K, λ_max ≈ 1.064 mm — in the microwave band.

Your Task

Implement three functions. All constants must be defined inside each function body.

  • cmb_temperature_at_z(z) — returns CMB temperature T(z) = T₀ × (1+z) in Kelvin
  • photon_number_density_m3(T_K) — returns photon number density in m⁻³
  • cmb_peak_wavelength_mm(T_K) — returns Wien peak wavelength in millimetres
Python runtime loading...
Loading...
Click "Run" to execute your code.