Introduction
Why General Relativity?
In 1915, Einstein replaced Newton's theory of gravity with a geometric one: mass and energy curve spacetime, and that curvature tells matter how to move. The results are stranger and richer than anything Newton imagined — black holes, gravitational waves, and a universe that expands.
General relativity has been confirmed to extraordinary precision: gravitational time dilation is corrected for in every GPS receiver you carry. The first gravitational wave detection in 2015 matched GR predictions to within measurement error. The black hole image from M87 matched GR within 10%.
How This Course Works
You will implement the equations of general relativity in pure Python. Each lesson introduces one concept — a formula from GR — explains the physics, and asks you to write the equation as a function. Two constants underpin almost everything: m³ kg⁻¹ s⁻² and m/s. Both are defined inside each function.
What You Will Learn
This course contains 15 lessons organized into 4 chapters:
- Schwarzschild Geometry — The Schwarzschild radius, gravitational time dilation, gravitational redshift, relativistic escape velocity, and the photon sphere and ISCO.
- Black Holes — Hawking temperature and black hole entropy.
- GR Predictions — Gravitational lensing, the Shapiro delay, and perihelion precession — the three classic tests of GR (beyond light deflection).
- Gravitational Waves — Chirp mass, GW frequency and ISCO, strain amplitude, radiated power, and the Peters inspiral time.
Let's start with the Schwarzschild radius.