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
where km/s/Mpc is the Hubble constant today, is the distance in megaparsecs (Mpc), and 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:
To convert from km/s/Mpc to SI units (s⁻¹):
Then in seconds. Dividing by s/Gyr gives gigayears.
The Hubble Distance
The Hubble distance sets the characteristic length scale of the observable universe:
using km/s and km/s/Mpc.
| Quantity | Formula | Value () |
|---|---|---|
| Recession velocity | 7000 km/s at 100 Mpc | |
| Hubble time | ≈ 13.97 Gyr | |
| Hubble distance | ≈ 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/shubble_time_Gyr(H0_km_s_Mpc)— returns Hubble time in Gyrhubble_distance_Mpc(H0_km_s_Mpc)— returns Hubble distance in Mpc using km/s