Lesson 1 of 15

Hubble's Law

Hubble's Law

In 1929, Edwin Hubble discovered that galaxies are receding from us at velocities proportional to their distance — the observational cornerstone of the expanding universe.

The Law

v=H0dv = H_0 \cdot d

where H070H_0 \approx 70 km/s/Mpc is the Hubble constant today, dd is the distance in megaparsecs (Mpc), and vv is the recession velocity in km/s.

One parsec is 3.0857 × 10¹⁶ m (about 3.26 light-years). A megaparsec is 10⁶ pc.

The Hubble Time

A rough estimate of the age of the universe is the Hubble time — the time it would take for a galaxy to reach its current distance if it had always moved at today's velocity:

tH=1H0t_H = \frac{1}{H_0}

To convert H0H_0 from km/s/Mpc to SI units (s⁻¹):

H0SI=H0×10003.0857×1022H_0^{\text{SI}} = H_0 \times \frac{1000}{3.0857 \times 10^{22}}

Then tH=1/H0SIt_H = 1/H_0^{\text{SI}} in seconds. Dividing by 3.156×10163.156 \times 10^{16} s/Gyr gives gigayears.

The Hubble Distance

The Hubble distance DH=c/H0D_H = c / H_0 sets the characteristic length scale of the observable universe:

DH=cH04283 MpcD_H = \frac{c}{H_0} \approx 4283 \text{ Mpc}

using c=299792.458c = 299792.458 km/s and H0=70H_0 = 70 km/s/Mpc.

QuantityFormulaValue (H0=70H_0 = 70)
Recession velocityv=H0dv = H_0 d7000 km/s at 100 Mpc
Hubble timetH=1/H0t_H = 1/H_0≈ 13.97 Gyr
Hubble distanceDH=c/H0D_H = c/H_0≈ 4282.75 Mpc

Your Task

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

  • hubble_velocity(H0_km_s_Mpc, d_Mpc) — returns recession velocity in km/s
  • hubble_time_Gyr(H0_km_s_Mpc) — returns Hubble time in Gyr
  • hubble_distance_Mpc(H0_km_s_Mpc) — returns Hubble distance in Mpc using c=299792.458c = 299792.458 km/s
Python runtime loading...
Loading...
Click "Run" to execute your code.