Skip to content
Tutorials Center
My learning

Topics

Lesson 35 of 38 · Black Holes, Gravitational Waves and Cosmology

Cosmology and the Expanding Universe

Learn the scale factor, Hubble's law, cosmological redshift, the Friedmann equation, critical density and the age of the universe, with numerical examples in Python.

General relativity was applied to the whole universe almost immediately. The result, worked out in the 1920s by Alexander Friedmann and Georges Lemaître, was a surprise: a universe filled with matter cannot stay still; it must expand or contract. Observations by Edwin Hubble (published in 1929) showed that distant galaxies move away, and the expanding universe became the standard picture. This lesson introduces the simplest cosmological models and the numbers that go with them.

Large-scale symmetry and the metric

On scales larger than a few hundred megaparsecs, the universe looks the same everywhere (homogeneous) and in every direction (isotropic). This is the cosmological principle. A spacetime with these symmetries has the Friedmann-Lemaître-Robertson-Walker (FLRW) metric

ds² = -c²dt² + a(t)² [dr²/(1 - kr²) + r²(dθ² + sin²θ dφ²)]

Here t is cosmic time (the time measured by observers who see the universe as isotropic), r is a comoving coordinate (it labels galaxies and stays fixed as the universe expands), k is the spatial curvature (+1, 0 or -1, a closed, flat or open geometry) and a(t) is the scale factor. By convention a = 1 today. The physical distance between two comoving galaxies is a(t) times their comoving separation, so it grows as a grows.

Hubble's law and redshift

The rate of expansion is the Hubble parameter, H(t) = ȧ/a. Its value today is the Hubble constant H₀. Two nearby galaxies separated by a proper distance d recede at

v = H₀ d

This is Hubble's law. Current measurements give H₀ near 70 km/s/Mpc; two main approaches disagree by several percent (roughly 67 from the cosmic microwave background, 73 from the local distance ladder), a puzzle known as the Hubble tension. This course uses 70 for round numbers.

Light from a distant galaxy is stretched as space expands. A photon emitted when the scale factor was a and received today (a = 1) is redshifted by

1 + z = 1/a_emit

So z = 1 means the universe was half its present size when the light left. This cosmological redshift is not a Doppler shift from motion through space: the wavelength grows because space between source and observer expands. A galaxy can have z > 1 and still not be moving "faster than light through space".

Python Hubble law, Hubble time and critical density

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The last rows show the recession speed exceeding c for d > c/H₀ ≈ 4300 Mpc. This does not break relativity: Hubble's law describes how fast the distance grows because space expands, while the speed limit applies to motion through space measured locally. The linear law is also only an approximation: H changes with time, and the relation between z and distance is more complicated at large z.

The Friedmann equation

The field equations for the FLRW metric give the Friedmann equation:

H² = (8πG/3) ρ - k c²/a² + Λc²/3

where ρ is the average energy density of matter and radiation (mass density units), k the curvature and Λ the cosmological constant. Divide by H² to express the contributions as fractions of the critical density ρ_crit = 3H²/(8πG):

1 = Ω_m + Ω_r + Ω_k + Ω_Λ

Here Ω_m is the matter fraction, Ω_r the radiation fraction, Ω_Λ the dark-energy fraction and Ω_k the curvature fraction. Each component dilutes differently as space expands:

Component Density scales as Reason
Matter a⁻³ Same particles in a larger volume
Radiation a⁻⁴ Volume plus redshift of each photon
Cosmological constant constant Energy of empty space

The best present fit (the standard ΛCDM model, Planck 2018 values) has Ω_m ≈ 0.31 (including about 5 percent in ordinary atoms and about 26 percent in dark matter, relative to the total) and Ω_Λ ≈ 0.69, with the geometry flat to within about a percent (Ω_k ≈ 0). Dark energy was inferred in 1998 from the dimming of distant Type Ia supernovae; the 2011 Nobel Prize in Physics honored Saul Perlmutter, Brian Schmidt and Adam Riess for it.

The age of the universe

For a flat universe with matter and a cosmological constant, the Friedmann equation can be integrated in closed form. With a normalised to 1 today,

(ȧ/a)² = H₀² (Ω_m a⁻³ + Ω_Λ)

and the age of the universe is

t₀ = (2/(3H₀√Ω_Λ)) asinh(√(Ω_Λ/Ω_m))

This formula neglects radiation, which matters only in the first 50,000 years, hardly changing the total age.

Python Age of the universe and the scale factor

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Both calculations give an age close to 13.8 billion years for the Planck-like parameters. The curve is concave at first (the expansion decelerates when matter dominates, a ∝ t^(2/3)) and becomes convex later, when dark energy takes over and the expansion accelerates toward exponential growth.

Distances, the cosmic microwave background and the Big Bang

The "Big Bang" is not an explosion at a point in a pre-existing space. It describes a hot, dense early state from which space itself has been expanding. About 380,000 years after it (z ≈ 1090), the universe cooled enough for atoms to form and light to travel freely. That light, stretched by a factor of about 1090, is the cosmic microwave background (CMB), now at a temperature of 2.725 K, discovered in 1965 by Arno Penzias and Robert Wilson.

Python Comoving distance to a redshift

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The calculation neglects radiation, so it is only reliable for redshifts below about 100. For z ≈ 1090 radiation matters. This is a model with a few parameters; real cosmology fits many more observations (CMB, supernovae, baryon acoustic oscillations, lensing).

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. Light was emitted when the universe was one third of its present size (a = 1/3). What is the redshift?

    1 + z = 1/a = 3, so z = 2.
  2. 2. What does Hubble's law v = H₀ d say?

    Recession speed is proportional to proper distance; with H₀ ≈ 70 km/s/Mpc a galaxy 100 Mpc away recedes at about 7000 km/s.
  3. 3. As the universe expands, matter density scales as:

    The same amount of matter fills a volume that grows as a³.
  4. 4. Which statement about cosmological redshift is correct?

    The wavelength grows in proportion to the scale factor, 1 + z = a_now/a_emit.

Summary

  • The FLRW metric ds² = -c²dt² + a(t)²[...] describes a homogeneous, isotropic universe; a(t) is the scale factor.
  • Hubble's law v = H₀ d with H₀ ≈ 70 km/s/Mpc; cosmological redshift obeys 1 + z = 1/a.
  • The Friedmann equation H² = (8πG/3)ρ - kc²/a² + Λc²/3 governs expansion; the critical density for H₀ = 70 is about 9 × 10⁻²⁷ kg/m³.
  • ΛCDM: about 5 percent ordinary matter, 26 percent dark matter, 69 percent dark energy; age about 13.8 billion years.
  • The CMB (2.725 K) is the relic of light released about 380,000 years after the Big Bang.

Next: Practice Set: Special Relativity Dynamics