Modern Physics

General Relativity

Gravity is the curvature of spacetime caused by mass and energy

Einstein's general relativity (1915) reframed gravity — not as a force, but as the curvature of spacetime caused by mass and energy. Massive objects warp the fabric of spacetime; objects follow "geodesics" (shortest paths) in this curved geometry. Predictions: light bending around Sun, Mercury's perihelion precession, gravitational time dilation, black holes, gravitational waves. All confirmed.

  • Einstein field equationsG_μν + Λg_μν = (8πG/c⁴)·T_μν
  • Spacetime curvatureMass-energy curves spacetime; objects follow geodesics
  • Tests passedMercury precession, light bending (1919), gravity probe B, GPS, LIGO
  • PredictionsBlack holes, gravitational waves, big bang cosmology
  • Speed of gravityc (changes propagate at light speed)
  • Reduces to NewtonFor weak fields, low velocities

Interactive visualization

Press play, or step through manually. The visualization is yours to drive — try it before reading on.

Open visualization fullscreen ↗

Watch the 60-second explainer

A condensed visual walkthrough — narrated, captioned, under a minute.

Equivalence principle

Einstein's "happiest thought" (1907) — a free-falling observer feels no gravity. Inside a free-falling elevator, objects float; if you let go of a ball, it stays put relative to you. Indistinguishable from being in deep space.

From this — accelerated frames are equivalent to gravitational fields. So gravity must be a manifestation of geometry, not a force in flat space.

Einstein field equations

G_μν + Λ·g_μν = (8πG / c⁴) · T_μν

where:

  • G_μν — Einstein tensor (geometry of spacetime curvature).
  • g_μν — metric tensor (defines distances/intervals).
  • Λ — cosmological constant (dark energy).
  • T_μν — stress-energy tensor (matter and energy distribution).
  • G — gravitational constant.
  • c — speed of light.

"Spacetime tells matter how to move; matter tells spacetime how to curve" (John Wheeler).

Confirmed predictions

PredictionObservation/TestResult
Mercury's perihelion precession43"/century beyond NewtonGR exactly matches
Light bendingEddington 1919 eclipse2× Newton; matches GR
Gravitational redshiftPound-Rebka 1959Confirmed
Gravitational time dilationAtomic clocks at altitudeMatches GR
Gravitational lensingEinstein cross, etc.Common observation
Frame draggingGravity Probe B (2011)Confirmed
Gravitational wavesLIGO (2015 BH merger)Direct detection
Black holes (M87 image)EHT 2019Image consistent with GR

JavaScript — GR calculations (mostly conceptual)

const G = 6.674e-11;
const c = 3e8;

// Schwarzschild radius
function schwarzschildRadius(mass_kg) {
  return 2 * G * mass_kg / (c * c);
}

console.log(`Sun (1.989e30 kg): r_s = ${schwarzschildRadius(1.989e30).toFixed(0)} m`);  // 2950 m
console.log(`Earth (5.972e24 kg): r_s = ${(schwarzschildRadius(5.972e24) * 1000).toFixed(2)} mm`); // 8.87 mm

// Sagittarius A*: 4.3 million solar masses
console.log(`Sgr A*: r_s = ${(schwarzschildRadius(4.3e6 * 1.989e30) / 1e9).toFixed(2)} Gm`);

// Gravitational time dilation (weak field)
function gravitationalTimeDilation(altitude_m, planet_mass = 5.972e24, planet_radius = 6.371e6) {
  // Δt/t ≈ -GM/(rc²) for low altitudes
  const r1 = planet_radius;
  const r2 = planet_radius + altitude_m;
  const phi1 = -G * planet_mass / r1 / (c * c);
  const phi2 = -G * planet_mass / r2 / (c * c);
  return phi2 - phi1;  // fractional time difference (positive = higher clock faster)
}

// GPS satellite at 20,200 km altitude
const gps_dilation = gravitationalTimeDilation(20.2e6);
console.log(`GPS satellite gains: ${(gps_dilation * 86400 * 1e6).toFixed(2)} µs/day from gravity`);
// ~45.8 µs/day FASTER

// Mercury perihelion precession
function mercuryPrecession() {
  // Δφ per orbit = 6πGM_sun/(a(1-e²)c²) where a = semi-major, e = eccentricity
  const M_sun = 1.989e30;
  const a = 5.79e10;  // semi-major axis
  const e = 0.206;
  const orbits_per_century = 100 * (1 / 0.241);
  const dphi_per_orbit = 6 * Math.PI * G * M_sun / (a * (1 - e*e) * c * c);  // radians
  const dphi_per_century = dphi_per_orbit * orbits_per_century;
  // Convert to arcseconds
  return dphi_per_century * 180 / Math.PI * 3600;
}

console.log(`Mercury precession: ${mercuryPrecession().toFixed(0)} arcsec/century`);  // ~43

// Schwarzschild solution: time dilation at radius r outside black hole
function timeDilationFactorBH(r, M) {
  // dτ/dt = √(1 - 2GM/rc²)
  const r_s = 2 * G * M / (c * c);
  if (r <= r_s) return 0;
  return Math.sqrt(1 - r_s / r);
}

// Just outside event horizon vs far away
const M_BH = 10 * 1.989e30;  // 10 solar mass
const r_s_BH = schwarzschildRadius(M_BH);
console.log(`At 1.001 × r_s: time runs ${timeDilationFactorBH(r_s_BH * 1.001, M_BH).toFixed(4)}× normal`);
console.log(`At 1.1 × r_s: ${timeDilationFactorBH(r_s_BH * 1.1, M_BH).toFixed(3)}×`);
console.log(`At 10 × r_s: ${timeDilationFactorBH(r_s_BH * 10, M_BH).toFixed(3)}×`);
// At infinity, factor approaches 1

Where GR matters

  • GPS and satellite navigation. Without GR corrections, GPS would be off by km/day.
  • Cosmology. Big Bang, expansion, dark energy, dark matter — all framed in GR.
  • Black holes. Predicted by GR; observed (Cygnus X-1, Sgr A*, M87).
  • Gravitational waves. LIGO, Virgo, KAGRA detect ripples in spacetime from cosmic mergers.
  • Astrophysics. Neutron stars, pulsars, gravitational lensing.
  • Tests of fundamental physics. Extreme-precision tests at solar system scale and gravitational wave observations.
  • Future technology. Gravitational wave-based timing, cosmology probes.

Common mistakes

  • Treating gravity as a force. In GR, gravity is not a force — it's spacetime geometry. Newton works for everyday cases but conceptually wrong.
  • Confusing special and general relativity. SR — flat spacetime, no gravity. GR — curved spacetime, includes gravity.
  • Thinking GR contradicts Newton. They agree at low gravity, low speeds. GR is a refinement that handles strong gravity, fast motion.
  • Believing GR predicts wormholes/time travel. Some solutions allow these mathematically; physically realizable is debated. No experimental evidence.
  • Confusing cosmological constant with dark matter. Λ accounts for dark energy (acceleration). Dark matter is a separate phenomenon (extra matter not seen via electromagnetism).
  • Treating GR as complete theory of gravity. Breaks down at quantum scales (singularity, Planck scale). Quantum gravity is incomplete.

Frequently asked questions

How does gravity become geometry?

Einstein's equivalence principle (1907) — locally, gravity feels exactly like acceleration. So if gravity is "real," accelerated frames have similar effects. Generalized — mass and energy curve spacetime; objects move along straightest paths (geodesics) in this curved geometry. Not a force, but motion in curved spacetime.

What's the equivalence principle?

Two key statements — (1) Inertial mass = gravitational mass (everything falls at same rate). (2) Locally, gravity is indistinguishable from acceleration. Free-falling observer feels no gravity. Imagine a sealed elevator — you can't tell if you're in space (inertial) or free-falling. This led Einstein to the idea that gravity = geometry.

What's a geodesic?

The "straightest" path in curved spacetime. In flat (Minkowski) spacetime, geodesics are straight lines (= constant velocity, Newton's first law). In curved spacetime, geodesics curve — what we observe as "gravity." A planet orbiting the Sun is following a geodesic in spacetime curved by Sun's mass.

How do we know GR is right?

Many precise tests — (1) Mercury's perihelion precesses 43 arcsec/century beyond Newton; matches GR exactly. (2) Light bending around Sun (Eddington 1919) — twice Newton's prediction; matches GR. (3) Gravitational time dilation — clocks at lower altitude run slower; confirmed by atomic clocks. (4) GPS — needs both SR and GR corrections. (5) Gravitational waves (LIGO 2015) — direct detection of spacetime ripples.

What are gravitational waves?

Ripples in spacetime curvature, caused by accelerating masses (especially binary black holes/neutron stars merging). Travel at c. Detected by LIGO (2015 — black hole merger). Tiny effect — distortions ~10⁻²¹ × baseline. Confirms direct prediction of GR; opens "gravitational wave astronomy."

What's a black hole?

Region of spacetime where curvature is so extreme that not even light can escape. Defined by event horizon at Schwarzschild radius r_s = 2GM/c². For Sun's mass, r_s = 3 km; for Earth, 9 mm. Inside event horizon, all paths lead to singularity. Many observed astrophysically — Cygnus X-1 (stellar mass), Sagittarius A* (4 million solar masses, Milky Way center).

How does GR explain cosmology?

Universe = expanding spacetime. Friedmann equations from GR describe evolution: matter, dark matter, dark energy, radiation determine geometry. Big Bang theory naturally arises. Universe currently accelerating (dark energy = cosmological constant Λ in field equations). GR is foundation of modern cosmology.