Geometry
Non-Euclidean Geometry
Drop the parallel postulate — get spherical (positive curvature) or hyperbolic (negative)
Non-Euclidean geometry is what you get when you drop or modify Euclid's parallel postulate. There are two main flavors — spherical (positive curvature, where lines eventually meet, like on Earth's surface) and hyperbolic (negative curvature, where parallel lines diverge). Discovered independently by Lobachevsky, Bolyai, and Gauss in the 1820s-30s. Critical to general relativity (spacetime curves under mass) and modern geometry.
- Two main flavorsSpherical (positive curvature) and hyperbolic (negative)
- Parallel postulate"Through a point not on a line, exactly one parallel exists" — false in non-Euclidean
- SphericalThrough a point — zero parallels (all "lines" meet)
- HyperbolicThrough a point — infinitely many parallels
- Triangle angle sumEuclidean=180°, Spherical>180°, Hyperbolic<180°
- DiscoveredLobachevsky 1829, Bolyai 1832, Gauss (privately, earlier)
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 parallel postulate problem
Euclid's Elements (~300 BCE) listed five postulates. The first four were brief and self-evident:
- A straight line can be drawn between any two points.
- A line segment can be extended infinitely.
- A circle can be drawn with any center and radius.
- All right angles are equal.
The fifth postulate, the parallel postulate, was awkward and verbose, equivalent to:
Given a line ℓ and a point P not on ℓ, there exists exactly one line through P that doesn't intersect ℓ.
For 2000 years, mathematicians tried to prove the fifth postulate from the other four — assuming it must be a consequence. They all failed.
In the 1820s-30s, Lobachevsky, Bolyai, and Gauss independently realized: the fifth postulate is independent. Denying it produces consistent, perfectly valid geometries — non-Euclidean.
The three flat-curvature geometries
| Geometry | Curvature K | Parallels through P | Triangle angle sum | Model surface |
|---|---|---|---|---|
| Euclidean | K = 0 (flat) | Exactly 1 | = 180° | Plane |
| Spherical (elliptic) | K > 0 | 0 (none) | > 180° | Sphere |
| Hyperbolic | K < 0 | Infinitely many | < 180° | Saddle, pseudosphere |
Spherical geometry — Earth's surface
On a sphere, the analog of "straight line" is a great circle — the intersection of the sphere with a plane through its center. Examples — equator, longitude lines, the path between two cities (NYC to Tokyo).
Properties:
- No parallel lines. Any two great circles intersect (at two antipodal points).
- Triangle angles sum to more than 180°. A triangle with vertices at the north pole and two points on the equator 90° apart has all angles = 90°, summing to 270°.
- Distance — great-circle (geodesic). The haversine formula gives shortest distance on a sphere. NYC to Tokyo is ~10,800 km via great circle, much shorter than via the equator.
- Area of triangle — proportional to angle excess. Area = R² · (α + β + γ − π), where R is the sphere's radius. Angle excess = (sum of angles − π) is positive.
Hyperbolic geometry — saddle surfaces
Hyperbolic geometry models surfaces with negative curvature — locally like a saddle or Pringles chip.
Properties:
- Infinitely many parallels. Through a point not on a line, infinitely many "ultra-parallel" lines exist that don't intersect the given line.
- Triangle angles sum to less than 180°. Always strictly less. As triangles grow, their angle sum approaches 0°.
- Area of triangle — proportional to angle deficit. Area = R² · (π − α − β − γ). The angle deficit (π − sum) is positive in hyperbolic.
- Exponential growth. A circle of "radius" r in hyperbolic geometry has circumference 2πR sinh(r/R), growing exponentially with r — much faster than Euclidean 2πr.
The Poincaré disk model
To "see" hyperbolic geometry, the Poincaré disk maps it inside a Euclidean disk — the inside of a unit circle. In this model:
- Points are points inside the disk (not on the boundary).
- "Lines" are arcs of circles perpendicular to the boundary, plus diameters.
- Distance grows to infinity as you approach the boundary.
- The boundary represents "infinity"; you can never reach it.
M.C. Escher's Circle Limit prints (1958-1960) visualize hyperbolic tilings using the Poincaré disk — fish, angels, devils tile the disk with shapes that look smaller near the boundary but are actually all the same hyperbolic size.
General relativity and curved spacetime
Einstein's general relativity (1915) revolutionized physics by saying:
Gravity is not a force. Mass and energy curve the geometry of spacetime, and free-falling objects follow the "straight lines" (geodesics) of that curved spacetime.
The geometry of spacetime near Earth or a black hole is non-Euclidean. Specifically, it's Lorentzian (a generalization including time as one of the dimensions, with negative signature) and curved.
Consequences:
- Light bends near massive objects. Eddington's 1919 expedition confirmed it during a solar eclipse — starlight bent around the Sun.
- Time dilation in gravity. Clocks run slower in stronger gravity. GPS satellites correct for this — without correction, GPS would be off by ~10 km/day.
- Black holes. Extreme spacetime curvature; not even light escapes inside the event horizon.
- Gravitational waves. Ripples in spacetime curvature, detected by LIGO in 2015.
JavaScript — spherical distance (haversine)
// Great-circle distance on Earth (km)
const EARTH_RADIUS_KM = 6371;
function toRad(deg) { return deg * Math.PI / 180; }
function haversineDistance(lat1, lon1, lat2, lon2) {
const dLat = toRad(lat2 - lat1);
const dLon = toRad(lon2 - lon1);
const a = Math.sin(dLat / 2) ** 2 +
Math.cos(toRad(lat1)) * Math.cos(toRad(lat2)) *
Math.sin(dLon / 2) ** 2;
const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
return EARTH_RADIUS_KM * c;
}
// NYC: 40.7128°N, 74.0060°W
// Tokyo: 35.6762°N, 139.6503°E
const dist = haversineDistance(40.7128, -74.0060, 35.6762, 139.6503);
console.log(`NYC to Tokyo: ${dist.toFixed(0)} km`); // ~10,840 km
// Spherical triangle excess — angles α, β, γ in radians
function sphericalTriangleArea(alpha, beta, gamma, R = 1) {
const excess = alpha + beta + gamma - Math.PI;
return R * R * excess;
}
// Triangle with all 90° angles on unit sphere
console.log(sphericalTriangleArea(Math.PI/2, Math.PI/2, Math.PI/2)); // π/2
// Hyperbolic triangle area — angle deficit
function hyperbolicTriangleArea(alpha, beta, gamma, R = 1) {
return R * R * (Math.PI - alpha - beta - gamma);
}
// "Ideal triangle" in hyperbolic — vertices at infinity, all angles 0
console.log(hyperbolicTriangleArea(0, 0, 0)); // π
Where non-Euclidean geometry shows up
- Astronomy and cosmology. The geometry of the universe — flat, spherical, or hyperbolic? Observation suggests flat or very close to flat. Inflation theory predicts flatness.
- General relativity. Spacetime is curved by mass-energy. GPS, gravitational lensing, black hole mergers — all require non-Euclidean math.
- Cartography. Mapping the (spherical) Earth to flat paper inevitably distorts. Mercator preserves angles but distorts area; equal-area maps preserve area but distort shape.
- Navigation and GPS. Great-circle distances on the spherical Earth. Long-distance flights follow great-circle routes, not straight lines on flat maps.
- Network theory. Hyperbolic geometry models complex networks (internet, social) better than Euclidean — exponential growth matches power-law degree distributions.
- Computer graphics — VR and visualization. Rendering curved surfaces, hyperbolic walkthroughs (HyperRogue game), spherical panoramas.
- Architecture. Domes (spherical), saddle roofs (hyperbolic) — non-Euclidean shapes are structurally efficient.
Common mistakes
- Thinking non-Euclidean means "wrong" geometry. Both spherical and hyperbolic geometry are perfectly consistent. They model real physical surfaces (Earth, saddles, spacetime).
- Confusing curved space with curved embedding. A cylinder's surface is intrinsically Euclidean (you can roll a flat sheet onto it without stretching). Sphere is not (intrinsic curvature). Gaussian curvature is intrinsic; embedding curvature is extrinsic.
- Assuming triangles always have angle sum 180°. Only in Euclidean. On Earth's surface, large triangles have noticeably more than 180°.
- Thinking "great circle" means equator only. Any circle on the sphere passing through the center has the maximum radius — equator, longitude lines, but also tilted circles.
- Treating the Poincaré disk as a real shrinking disk. The disk's boundary represents infinity; objects near the boundary look small in Euclidean view but are infinite-distance in hyperbolic.
- Confusing curvature with topology. A flat torus has zero curvature but non-trivial topology. A sphere has positive curvature and trivial topology (genus 0). They're independent properties.
Frequently asked questions
What did Euclid's parallel postulate say?
Euclid's fifth postulate (parallel postulate) — given a line and a point not on it, there is exactly one line through the point parallel to the given line. This was Euclid's awkward fifth axiom; mathematicians for 2000 years tried to derive it from the other four, suspecting it was unnecessary. It turned out to be independent — denying it gives consistent geometries (non-Euclidean).
How does spherical geometry work?
On a sphere's surface, "lines" are great circles (like the equator or longitude lines). Two great circles always intersect (at two antipodal points), so there are no parallel lines. Triangle angles sum to more than 180°. Earth is the canonical example — flying from NYC to Tokyo, you go over the Arctic, not straight east, because great circles are the shortest path.
How does hyperbolic geometry work?
Hyperbolic geometry models surfaces with negative curvature — like a saddle. Through a point not on a line, there are infinitely many lines parallel to the given line. Triangle angles sum to less than 180°. Visualized via the Poincaré disk model — the "interior of a circle" with hyperbolic distance going to infinity at the boundary. M.C. Escher's "Circle Limit" prints visualize hyperbolic tilings.
What's the connection to general relativity?
Einstein's general relativity (1915) describes gravity as the curvature of spacetime. Mass and energy curve spacetime — light bends near massive objects, time slows in strong gravity, etc. The geometry of spacetime is non-Euclidean (Riemannian, more general than just spherical or hyperbolic). Black holes have extreme curvature; flat spacetime is the Euclidean limit (no gravity).
What's the curvature K?
K is a number describing how a surface deviates from flat at each point. K = 0 — Euclidean (plane, cylinder). K > 0 — spherical (sphere, ellipsoid). K < 0 — hyperbolic (saddle, pseudosphere). Gaussian curvature is intrinsic — measurable on the surface itself without reference to ambient space (Theorema Egregium, Gauss 1827). Curvature determines the geometry's local properties.
Who discovered non-Euclidean geometry?
Independently — Nikolai Lobachevsky (Russia, 1829, hyperbolic), János Bolyai (Hungary, 1832, hyperbolic), and Carl Friedrich Gauss (Germany, privately earlier). Gauss didn't publish his work, fearing controversy. Bernhard Riemann (1854) generalized to arbitrary dimensions and curvatures, founding modern Riemannian geometry. Eugenio Beltrami (1868) proved consistency by constructing models of hyperbolic geometry inside Euclidean geometry.
What are some practical applications?
GPS — the Earth is roughly spherical, so GPS calculations use spherical trig (haversine formula for great-circle distances). General relativity — orbits, time dilation in GPS satellites (must correct for gravitational + special relativistic effects, ~38 µs/day). Cartography — projecting a sphere to a flat map necessarily distorts (Mercator distorts area; equal-area projections distort shape). Computer graphics — rendering curved surfaces, hyperbolic visualization in VR.