Mechanics
Kepler's Laws
Three rules describing planetary orbits — ellipses, equal areas, and T² ∝ a³
Johannes Kepler's three laws of planetary motion (1609-1619), distilled from Tycho Brahe's data, describe planetary orbits — (1) orbits are ellipses with the Sun at one focus; (2) a planet sweeps equal areas in equal times; (3) T² ∝ a³ (period squared is proportional to semi-major axis cubed). Newton later derived all three from his law of universal gravitation, demonstrating physics's deep mathematical underpinning.
- First lawOrbits are ellipses with Sun at one focus
- Second lawEqual areas in equal times (= angular momentum conserved)
- Third lawT² = (4π²/GM)·a³ (or T²/a³ = constant)
- Discovered1609 (laws 1 & 2), 1619 (law 3) — Kepler
- Derived from gravityNewton, 1687 — Principia Mathematica
- Applies toAny inverse-square gravitational system (planets, moons, satellites, stars)
Interactive visualization
Press play, or step through manually. The visualization is yours to drive — try it before reading on.
Watch the 60-second explainer
A condensed visual walkthrough — narrated, captioned, under a minute.
The three laws
Kepler's First Law (1609). The orbit of every planet is an ellipse with the Sun at one focus.
Kepler's Second Law (1609). A line connecting a planet to the Sun sweeps out equal areas in equal times.
Kepler's Third Law (1619). The square of a planet's orbital period is proportional to the cube of its semi-major axis:
T² = (4π² / GM) · a³
First law — ellipses
An ellipse is defined by two focal points and a constant — for any point P on the ellipse, |PF₁| + |PF₂| = constant (= 2a, where a is the semi-major axis).
The Sun sits at ONE focus (not at the center). The planet's distance from the Sun varies between perihelion (closest, a(1-e)) and aphelion (farthest, a(1+e)), where e is eccentricity.
| Object | Semi-major axis | Eccentricity | Perihelion | Aphelion |
|---|---|---|---|---|
| Mercury | 0.387 AU | 0.206 | 0.307 AU | 0.467 AU |
| Earth | 1.000 AU | 0.0167 | 0.983 AU | 1.017 AU |
| Mars | 1.524 AU | 0.0934 | 1.381 AU | 1.666 AU |
| Pluto | 39.48 AU | 0.249 | 29.66 AU | 49.31 AU |
| Halley's Comet | 17.83 AU | 0.967 | 0.587 AU | 35.08 AU |
Second law — equal areas in equal times
This is conservation of angular momentum. Mathematically: dA/dt = L/(2m), where L is angular momentum (constant for a Keplerian orbit because gravity exerts no torque about the focus).
Consequence — planets move FASTER when closer to the Sun (perihelion) and SLOWER when farther (aphelion):
- Earth at perihelion (early January): v = 30.29 km/s.
- Earth at aphelion (early July): v = 29.29 km/s.
- Difference: 1 km/s, or about 3% — small because Earth's orbit is nearly circular.
For Halley's comet (e = 0.97), the speed difference is enormous — 54 km/s at perihelion vs 0.9 km/s at aphelion.
Third law — period vs orbital size
For any orbit around the same central mass:
T² = (4π² / GM) · a³
Or, for solar system orbits with T in years and a in AU (using 4π²/GM_sun ≈ 1):
T² = a³ (in solar system units)
| Planet | a (AU) | T (years) | a³ | T² |
|---|---|---|---|---|
| Mercury | 0.387 | 0.241 | 0.058 | 0.058 |
| Earth | 1.000 | 1.000 | 1.000 | 1.000 |
| Mars | 1.524 | 1.881 | 3.54 | 3.54 |
| Jupiter | 5.203 | 11.86 | 140.85 | 140.66 |
| Saturn | 9.539 | 29.46 | 867.97 | 867.89 |
| Pluto | 39.48 | 247.94 | 61,548 | 61,475 |
The match is essentially exact (small deviations from interplanetary perturbations and relativity).
Newton's derivation
Starting from F = GMm/r² (his universal law), Newton derived all three Kepler laws:
- Bound orbits are conics — ellipses for stable bound orbits, circles in the special case of e=0, parabolas at exactly escape, hyperbolas for unbound trajectories.
- Angular momentum conserved — gravity is a central force (along the radius), so it exerts no torque about the focus. Equal areas in equal times follows.
- T² ∝ a³ — direct algebra from F = ma applied to centripetal motion (or more carefully, applying the orbital integral).
This unification — three empirical laws derived from one universal force — is one of the great achievements of physics.
JavaScript — Kepler's laws calculations
const G = 6.674e-11;
const M_SUN = 1.989e30;
const M_EARTH = 5.972e24;
const AU = 1.496e11;
const YEAR = 365.25 * 24 * 3600;
// Kepler's 3rd law: orbital period from semi-major axis
function orbitalPeriod(a_meters, M_central) {
return 2 * Math.PI * Math.sqrt(a_meters * a_meters * a_meters / (G * M_central));
}
// In solar system units (a in AU, T in years)
function keplerSimplified(a_AU) {
return Math.pow(a_AU, 1.5); // T = a^1.5 (since T² = a³)
}
console.log(`Mars (a = 1.524 AU): T = ${keplerSimplified(1.524).toFixed(3)} yr`); // 1.881
console.log(`Jupiter (a = 5.203 AU): T = ${keplerSimplified(5.203).toFixed(2)} yr`); // 11.86
// Earth around Sun
const T_earth = orbitalPeriod(AU, M_SUN);
console.log(`Earth period: ${(T_earth / YEAR).toFixed(3)} years`); // 1.000
// Speed at perihelion and aphelion (vis-viva equation)
function vAtRadius(a, r, M_central) {
// v² = GM(2/r - 1/a)
return Math.sqrt(G * M_central * (2/r - 1/a));
}
const a_earth = AU;
const e_earth = 0.0167;
const r_perihelion = a_earth * (1 - e_earth);
const r_aphelion = a_earth * (1 + e_earth);
const v_perihelion = vAtRadius(a_earth, r_perihelion, M_SUN);
const v_aphelion = vAtRadius(a_earth, r_aphelion, M_SUN);
console.log(`Earth at perihelion: ${(v_perihelion/1000).toFixed(2)} km/s`); // 30.29
console.log(`Earth at aphelion: ${(v_aphelion/1000).toFixed(2)} km/s`); // 29.29
// Halley's Comet: extreme eccentricity
const a_halley = 17.83 * AU;
const e_halley = 0.967;
const r_p_halley = a_halley * (1 - e_halley);
const v_p_halley = vAtRadius(a_halley, r_p_halley, M_SUN);
console.log(`Halley at perihelion: ${(v_p_halley/1000).toFixed(2)} km/s`); // ~54.6
// Find central mass from orbital period and semi-major axis
function centralMass(T, a) {
return 4 * Math.PI * Math.PI * a * a * a / (G * T * T);
}
// Moon orbits Earth: a = 384,400 km, T = 27.3 days
const M_e_from_moon = centralMass(27.3 * 86400, 384400e3);
console.log(`Earth's mass from Moon: ${M_e_from_moon.toExponential(3)} kg (actual: ${M_EARTH.toExponential(3)})`);
// Slight difference because Moon contributes too (M_e + M_moon ~ 6.05e24)
Where Kepler's laws show up
- Astronomy. Solar system mapping, exoplanet detection (Kepler's 3rd determines stellar mass from orbital period and radius), binary star systems.
- Spacecraft trajectory design. Hohmann transfer orbits, gravitational slingshots, orbital insertions.
- Satellite operations. GPS satellites, communications satellites, ISS — all in elliptical (often nearly circular) orbits following Kepler.
- Cosmology. Galactic rotation, dark matter inferred from rotation deviations from Keplerian predictions.
- Astrophysics. Black hole mass measurements via orbiting objects (Sagittarius A* mass measured this way).
- History of science. Kepler's laws + Newton's derivation = paradigm of mathematical physics.
- Education. Standard introductory astronomy and physics topic; demonstrates physics's predictive power.
Common mistakes
- Confusing semi-major axis with average distance. Semi-major axis is a, the longest "radius" of the ellipse. Average distance varies depending on what averaging is done (over time, over orbit, etc.).
- Putting the central body at the center of the ellipse. Sun is at a FOCUS, not the geometric center. Geometric center is offset toward the other (empty) focus.
- Treating planets as moving at constant speed. 2nd law says equal areas in equal times — meaning faster at perihelion, slower at aphelion. Speed varies along the orbit.
- Misapplying 3rd law to non-Keplerian orbits. Works only for inverse-square gravity. Galaxies don't follow Kepler (extra dark matter), and tightly-orbiting binaries near black holes need GR.
- Forgetting the central mass dependence in 3rd law. T²/a³ = 4π²/GM. Different M (Sun vs Earth vs Jupiter) gives different proportionality constants. Compare orbits around the SAME central body.
- Treating eccentric orbits like circles. Earth's e = 0.0167 — small but not zero. Aphelion-perihelion difference is ~5 million km. Other planets are more eccentric.
Frequently asked questions
Why are orbits ellipses, not circles?
Newton derived from F = GMm/r² that bound orbits are ellipses (in general); circles are a special case (e = 0). For most planetary systems, eccentricity is small but nonzero — Earth's e = 0.0167 (almost circular); Mars's e = 0.0934; Mercury's e = 0.21. Comets have very high e (Halley: e = 0.97). Hyperbolic trajectories (e > 1) are unbound (escape).
How does Kepler's 2nd law relate to angular momentum?
Equal areas in equal times means dA/dt is constant. For a planet sweeping area dA = ½r·v_perp·dt = (L/2m)·dt, where L is angular momentum. So L = 2m·dA/dt = constant. Kepler's 2nd is exactly conservation of angular momentum. The Sun exerts no torque about itself (force is along the line connecting to the planet), so L is conserved.
Why does Kepler's 3rd law have the form T² ∝ a³?
For a circular orbit at radius r, F_gravity = mv²/r → GMm/r² = m(2πr/T)²/r → T² = (4π²/GM)·r³. For an ellipse, replace r with semi-major axis a. So T² is proportional to a³ for ANY orbit around the same central mass. The proportionality constant depends only on the central mass (and G).
Can I use Kepler's 3rd law for the Earth-Moon system?
Yes — for any two-body system. T² = (4π²/G(M+m))·a³. For Earth-Moon, M and m are comparable, so we use the SUM. Moon's a = 384,400 km, T = 27.3 days. (M+m)·G = 4π²·a³/T² ≈ 4.04 × 10¹⁴, so M+m ≈ 6.05 × 10²⁴ kg (close to Earth's 5.97 × 10²⁴ kg).
What about non-Sun-centered orbits?
Kepler's laws apply to any two-body inverse-square system. Moons around planets — same laws (Galilean moons of Jupiter follow Kepler 3rd). Satellites around Earth — same. Binary stars around common center — same. Even atoms (in Bohr's classical model) — electrons in elliptical orbits around nucleus.
How did Kepler discover these without calculus?
From Tycho Brahe's incredibly precise naked-eye observations (1572-1601). Brahe measured Mars's position over 20 years to ~1 arcminute accuracy. Kepler tried to fit circular orbits — failed. After many years of work, he discovered ellipses and the equal-areas law (1605, published 1609). The third law took longer; he found it empirically (1619). Newton's later derivation showed why.
How accurate are Kepler's laws today?
Almost perfect for 2-body systems with inverse-square gravity. Solar system planets follow Kepler's laws to high precision, except — (1) Mercury's perihelion precesses 43 arcsec/century beyond Newton's prediction (general relativity correction); (2) Multi-planet perturbations cause small deviations; (3) For very compact objects (neutron stars, black holes), GR corrections are large; (4) Tidal effects matter for Earth-Moon over millennia.