Lesson 2 of 15

Gravitational Time Dilation

Gravitational Time Dilation

One of the most striking predictions of General Relativity is that gravity slows time. A clock deep in a gravitational well ticks more slowly than a clock far away. This is not a measurement artifact — it is a real physical effect confirmed to extraordinary precision by atomic clocks, GPS satellites, and the Pound–Rebka experiment.

The Formula

For a clock at radius rr from a mass MM (outside the event horizon, r>rsr > r_s), compared to a clock at infinity, the time dilation factor is:

dτdt=1rsr=12GMc2r\frac{d\tau}{dt_\infty} = \sqrt{1 - \frac{r_s}{r}} = \sqrt{1 - \frac{2GM}{c^2 r}}

Equivalently, one local second (dτ=1d\tau = 1) corresponds to a longer interval at infinity:

dt=dτ1rs/r=dτ12GM/(c2r)dt_\infty = \frac{d\tau}{\sqrt{1 - r_s/r}} = \frac{d\tau}{\sqrt{1 - 2GM/(c^2 r)}}

The factor 1/1rs/r11/\sqrt{1 - r_s/r} \geq 1 tells you how much the remote observer's time is stretched relative to the local clock.

GPS Satellites

GPS satellites orbit at r26,560r \approx 26{,}560 km. Because they are higher in Earth's gravitational field, their clocks run faster than clocks on the surface by about 45μ45\,\mus per day due to gravitational dilation (partially offset by the special-relativistic slowdown from orbital speed). Without GR corrections, GPS would drift by kilometres per day.

Your Task

Implement these functions with all constants defined inside each function:

  • time_dilation_factor(M, r) — returns 1/12GM/(c2r)1/\sqrt{1 - 2GM/(c^2 r)}, the factor >1> 1 by which a remote observer sees the local clock run slow
  • time_at_infinity(dt_local, M, r) — returns the elapsed time at infinity for a local interval dtlocaldt_{\text{local}}
  • gravitational_time_shift(dt_local, M, r) — returns the extra time at infinity: dtdtlocaldt_\infty - dt_{\text{local}}
Python runtime loading...
Loading...
Click "Run" to execute your code.