Skip to content
The Lumenary
Advanced undergraduateUndergraduate 120 min

Differential geometry of curves and surfaces

How sharply does a road bend, or an eggshell? Gauss discovered that the curvature of a surface can be measured by an ant that never leaves it — and that its total is fixed by topology.

Formally verified · 21 LeanComputationally tested · 2 PythonAI-drafted · awaiting human reviewMathematically reviewed: Awaiting human review
MotivationH

Why every flat map lies

Every flat map of the Earth distorts something. Gerardus Mercator's projection (1569) keeps angles right, which is why sailors loved it, but it makes Greenland look as large as Africa, which is about fourteen times bigger. Other projections keep areas right and bend shapes instead. No cartographer has ever made a flat map of a region of the globe on which all distances are to scale, and none ever will. In 1827 Carl Friedrich Gauss, who was directing the geodetic survey of the Kingdom of Hanover, proved why. The sphere has a kind of curvature that cannot be changed by bending without stretching, and the plane has none.

You can feel the same theorem in your hands. Pick up a slice of pizza and it droops. Fold the crust into a slight U and the slice becomes stiff: bending it one way stops it from bending the other way. A sheet of paper rolls into a cylinder or a cone without stretching, but no amount of care will wrap it smoothly onto a ball.

Engineers meet curvature too. Highways and railway lines from Mumbai to Madrid do not join a straight stretch directly to a circular arc. A car or a train would feel a sudden jolt of sideways force, because the curvature would jump from 00 to 1/r1/r. Instead, designers insert transition curves (clothoids, also called Euler spirals) along which the curvature grows steadily. This lesson makes "curvature" precise: first for curves, then for surfaces, where Gauss's two great theorems — the Theorema Egregium and the Gauss–Bonnet theorem — connect it to intrinsic measurement and to topology.

IntuitionH

How fast does the direction turn?

Walk along a curve at unit speed. Your direction of travel is a unit vector TT. On a straight road it never changes. On a curve it turns, and the curvature κ\kappa is the rate at which it turns per unit distance. On a circle of radius rr, going once around (2πr2\pi r of distance) turns your direction through 2π2\pi, so κ=1/r\kappa = 1/r: small circles bend sharply. At each point of a curve, the circle that fits it best — the osculating circle — has radius 1/κ1/\kappa. In space a curve can also twist out of its plane of bending, and the rate of that twisting is the torsion τ\tau. A helix, like the thread of a screw or the backbone of DNA, has constant curvature and constant torsion.

For a surface, stand at a point with the unit normal nn pointing "up", and slice the surface with planes containing nn. Each slice is a curve, curving up or down with some curvature. As the slicing plane turns, this normal curvature varies between a maximum k1k_1 and a minimum k2k_2, the principal curvatures. Their product is the Gaussian curvature K=k1k2K = k_1 k_2:

  • a sphere of radius RR bends the same way in every direction: k1=k2=1/Rk_1 = k_2 = 1/R, so K=1/R2>0K = 1/R^2 > 0;
  • a cylinder of radius rr bends around (1/r1/r) but not along (0): K=0K = 0;
  • a saddle or a mountain pass bends up in one direction and down in the other: K<0K \lt 0.

Gauss's surprise was that KK, defined through bending in space, can be measured from inside the surface. An ant on the surface can draw a circle of radius ρ\rho (all points at distance ρ\rho along the surface) and measure its circumference. It finds

C(ρ)=2πρ−π3Kρ3+O(ρ4),C(\rho) = 2\pi\rho - \frac{\pi}{3} K \rho^3 + O(\rho^4),

shorter than 2πρ2\pi\rho on a sphere and longer on a saddle. Or it can draw a triangle of shortest paths and add up the angles: the excess over π\pi is approximately KK times the area. Curvature is not only how the surface sits in space; it is in the surface's own geometry.

DefinitionsH

Curves, surfaces and their curvatures

Definition— regular curve, arc length

A regular curve is a smooth map γ:I→R3\gamma : I \to \R^3 with γ′(t)≠0\gamma'(t) \ne 0 for all tt. Its arc length from t0t_0 is s(t)=∫t0t∣γ′(u)∣ dus(t) = \int_{t_0}^t |\gamma'(u)|\,du. Since s′(t)=∣γ′(t)∣>0s'(t) = |\gamma'(t)| > 0, the function ss can be inverted, and every regular curve can be reparametrised by arc length, after which ∣γ′(s)∣=1|\gamma'(s)| = 1 (unit speed).

Definition— curvature, Frenet frame, torsion

For a unit-speed curve, T=γ′T = \gamma' is the unit tangent and the curvature is κ=∣T′∣=∣γ′′∣\kappa = |T'| = |\gamma''|. Where κ>0\kappa > 0, the principal normal is N=T′/κN = T'/\kappa, the binormal is B=T×NB = T \times N, and (T,N,B)(T, N, B) is the Frenet frame, an orthonormal basis at each point. The torsion τ\tau is defined by B′=−τNB' = -\tau N (Theorem 1 shows B′B' is a multiple of NN). For a regular curve at arbitrary speed,

κ=∣γ′×γ′′∣∣γ′∣3,τ=det⁡(γ′,γ′′,γ′′′)∣γ′×γ′′∣2.\kappa = \frac{|\gamma' \times \gamma''|}{|\gamma'|^3}, \qquad \tau = \frac{\det(\gamma', \gamma'', \gamma''')}{|\gamma' \times \gamma''|^2}.

For a plane curve (x(t),y(t))(x(t), y(t)) the signed curvature is κ=(x′y′′−y′x′′)/(x′2+y′2)3/2\kappa = (x'y'' - y'x'')/(x'^2 + y'^2)^{3/2}, positive when the curve turns left.

Definition— regular surface, first fundamental form

A parametrised surface is a smooth map X:U→R3X : U \to \R^3, U⊆R2U \subseteq \R^2 open, with Xu×Xv≠0X_u \times X_v \ne 0 (so XuX_u, XvX_v span the tangent plane). The first fundamental form is the inner product restricted to the tangent plane, with coefficients

E=Xu⋅Xu,F=Xu⋅Xv,G=Xv⋅Xv.E = X_u \cdot X_u, \qquad F = X_u \cdot X_v, \qquad G = X_v \cdot X_v .

The length of a curve X(u(t),v(t))X(u(t), v(t)) is ∫Eu′2+2Fu′v′+Gv′2 dt\int \sqrt{E u'^2 + 2F u' v' + G v'^2}\, dt, and the area element is dA=∣Xu×Xv∣ du dv=EG−F2 du dvdA = |X_u \times X_v|\,du\,dv = \sqrt{EG - F^2}\, du\, dv. A quantity is intrinsic if it can be computed from E,F,GE, F, G alone.

Definition— second fundamental form, shape operator

Let n=Xu×Xv/∣Xu×Xv∣n = X_u \times X_v / |X_u \times X_v| be the unit normal. The second fundamental form has coefficients

L=Xuu⋅n,M=Xuv⋅n,N=Xvv⋅n.L = X_{uu} \cdot n, \qquad M = X_{uv} \cdot n, \qquad N = X_{vv} \cdot n .

(Some books write e,f,ge, f, g.) The shape operator (Weingarten map) S=−dnS = -dn is the linear map of the tangent plane sending a tangent vector vv to minus the derivative of nn in the direction vv. In the basis Xu,XvX_u, X_v its matrix is (EFFG)−1(LMMN)\begin{pmatrix} E & F \\ F & G \end{pmatrix}^{-1} \begin{pmatrix} L & M \\ M & N \end{pmatrix}.

Definition— principal, Gaussian and mean curvature

The principal curvatures k1,k2k_1, k_2 are the eigenvalues of SS. The Gaussian curvature and mean curvature are

K=k1k2=det⁡S=LN−M2EG−F2,H=k1+k22=EN−2FM+GL2(EG−F2).K = k_1 k_2 = \det S = \frac{LN - M^2}{EG - F^2}, \qquad H = \frac{k_1 + k_2}{2} = \frac{EN - 2FM + GL}{2(EG - F^2)} .

Reversing nn changes the signs of L,M,N,k1,k2L, M, N, k_1, k_2 and HH, but not KK.

Definition— geodesic

A curve on a surface is a geodesic if its acceleration is everywhere normal to the surface: an ant walking along it never turns left or right. Shortest paths on a surface are geodesics. On a sphere the geodesics are the great circles; on a cylinder they are the helices, circles and straight lines that become straight lines when the cylinder is unrolled.

Worked examplesH

Worked examples

Example— The circle and the helix

The circle γ(s)=(rcos⁡(s/r),rsin⁡(s/r))\gamma(s) = (r\cos(s/r), r\sin(s/r)) has γ′(s)=(−sin⁡(s/r),cos⁡(s/r))\gamma'(s) = (-\sin(s/r), \cos(s/r)), a unit vector, so ss is arc length; and γ′′(s)=−1r(cos⁡(s/r),sin⁡(s/r))\gamma''(s) = -\tfrac1r(\cos(s/r), \sin(s/r)), so κ=1/r\kappa = 1/r.

For the helix γ(s)=(acos⁡(s/c),asin⁡(s/c),bs/c)\gamma(s) = (a\cos(s/c), a\sin(s/c), bs/c) with a>0a > 0 and c=a2+b2c = \sqrt{a^2 + b^2}:

T=(−acsin⁡sc, accos⁡sc, bc),T′=ac2(−cos⁡sc,−sin⁡sc,0),B=(bcsin⁡sc,−bccos⁡sc,ac).T = \Big(-\tfrac{a}{c}\sin\tfrac{s}{c},\ \tfrac{a}{c}\cos\tfrac{s}{c},\ \tfrac{b}{c}\Big), \quad T' = \tfrac{a}{c^2} \Big(-\cos\tfrac{s}{c}, -\sin\tfrac{s}{c}, 0\Big), \quad B = \Big(\tfrac{b}{c}\sin\tfrac{s}{c}, -\tfrac{b}{c}\cos\tfrac{s}{c}, \tfrac{a}{c}\Big).

So ∣T∣=1|T| = 1 (since a2+b2=c2a^2 + b^2 = c^2), κ=a/c2\kappa = a/c^2, N=(−cos⁡,−sin⁡,0)N = (-\cos, -\sin, 0) points to the axis, and B′=bc2(cos⁡,sin⁡,0)=−bc2NB' = \tfrac{b}{c^2}(\cos, \sin, 0) = -\tfrac{b}{c^2} N, so τ=b/c2\tau = b/c^2. A right-handed helix (b>0b > 0) has positive torsion. All of this is checked in Lean below.

Example— The sphere

With longitude θ\theta and latitude φ\varphi, X(θ,φ)=(Rcos⁡φcos⁡θ,Rcos⁡φsin⁡θ,Rsin⁡φ)X(\theta, \varphi) = (R\cos\varphi\cos\theta, R\cos\varphi\sin\theta, R\sin\varphi):

Xθ=(−Rcos⁡φsin⁡θ,Rcos⁡φcos⁡θ,0),Xφ=(−Rsin⁡φcos⁡θ,−Rsin⁡φsin⁡θ,Rcos⁡φ),X_\theta = (-R\cos\varphi\sin\theta, R\cos\varphi\cos\theta, 0), \qquad X_\varphi = (-R\sin\varphi\cos\theta, -R\sin\varphi\sin\theta, R\cos\varphi),

so E=R2cos⁡2φE = R^2\cos^2\varphi, F=0F = 0, G=R2G = R^2. With the outward normal n=X/Rn = X/R, the second derivatives give L=−Rcos⁡2φL = -R\cos^2\varphi, M=0M = 0, N=−RN = -R. Hence

K=(−Rcos⁡2φ)(−R)−0R2cos⁡2φ⋅R2−0=1R2,H=−1R.K = \frac{(-R\cos^2\varphi)(-R) - 0}{R^2\cos^2\varphi \cdot R^2 - 0} = \frac{1}{R^2}, \qquad H = -\frac{1}{R}.

(The sign of HH reflects the choice of the outward normal.) The parametrisation fails to be regular at the poles, where cos⁡φ=0\cos\varphi = 0; a different chart shows that K=1/R2K = 1/R^2 there too.

Example— Cylinder, torus, saddle, catenoid and helicoid

  • Cylinder X=(rcos⁡θ,rsin⁡θ,z)X = (r\cos\theta, r\sin\theta, z): E=r2E = r^2, F=0F = 0, G=1G = 1, L=−rL = -r, M=N=0M = N = 0. So K=0K = 0 and ∣H∣=1/(2r)|H| = 1/(2r); the principal curvatures are 1/r1/r and 00.
  • Torus X=((R+rcos⁡φ)cos⁡θ,(R+rcos⁡φ)sin⁡θ,rsin⁡φ)X = ((R + r\cos\varphi)\cos\theta, (R + r\cos\varphi)\sin\theta, r\sin\varphi), 0<r<R0 \lt r \lt R: E=(R+rcos⁡φ)2E = (R + r\cos\varphi)^2, F=0F = 0, G=r2G = r^2, L=−(R+rcos⁡φ)cos⁡φL = -(R + r\cos\varphi)\cos\varphi, M=0M = 0, N=−rN = -r, so K=cos⁡φr(R+rcos⁡φ)K = \dfrac{\cos\varphi}{r(R + r\cos\varphi)}. This is positive on the outer half, negative on the inner half, and zero on the top and bottom circles.
  • Saddle z=xyz = xy, i.e. X=(u,v,uv)X = (u, v, uv): K=−1/(1+u2+v2)2K = -1/(1 + u^2 + v^2)^2, which is −1-1 at the origin.
  • Catenoid X=(cosh⁡ucos⁡v,cosh⁡usin⁡v,u)X = (\cosh u\cos v, \cosh u \sin v, u) and helicoid X=(sinh⁡ucos⁡v,sinh⁡usin⁡v,v)X = (\sinh u \cos v, \sinh u \sin v, v): both have E=G=cosh⁡2uE = G = \cosh^2 u, F=0F = 0, and K=−1/cosh⁡4uK = -1/\cosh^4 u. They look nothing alike — one is a surface of revolution, the other a spiral ramp — yet one can be bent onto the other without stretching. Both are minimal surfaces (H=0H = 0), shapes of soap films.
ProofH

The Frenet–Serret equations

Theorem— Theorem 1 (Frenet–Serret)

For a unit-speed curve with κ>0\kappa > 0,

T′=κN,N′=−κT+τB,B′=−τN.T' = \kappa N, \qquad N' = -\kappa T + \tau B, \qquad B' = -\tau N .

Proof

The first equation is the definition of NN. Since (T,N,B)(T, N, B) is orthonormal, B=T×NB = T \times N and N=B×TN = B \times T.

Differentiate B=T×NB = T \times N: B′=T′×N+T×N′=κN×N+T×N′=T×N′B' = T' \times N + T \times N' = \kappa N \times N + T \times N' = T \times N', which is perpendicular to TT. Differentiating B⋅B=1B \cdot B = 1 gives B′⋅B=0B' \cdot B = 0. So B′B' is perpendicular to TT and BB, hence a multiple of NN; this justifies the definition B′=−τNB' = -\tau N.

Differentiate N=B×TN = B \times T: N′=B′×T+B×T′=−τN×T+κB×N=τB−κTN' = B' \times T + B \times T' = -\tau N \times T + \kappa B \times N = \tau B - \kappa T, using N×T=−BN \times T = -B and B×N=−TB \times N = -T.

∎

In matrix form, (T,N,B)′=(T,N,B) Ω(T, N, B)' = (T, N, B)\, \Omega with Ω\Omega antisymmetric: an infinitesimal rotation. The fundamental theorem of curves (stated here, not proved) says that for any smooth functions κ>0\kappa > 0 and τ\tau on an interval there is a unit-speed curve with these curvature and torsion, unique up to a rigid motion. The proof applies the existence and uniqueness theorem for linear ODEs to the Frenet–Serret system. In particular, a curve with constant κ>0\kappa > 0 and τ=0\tau = 0 is a circle, and one with both constant (and τ≠0\tau \ne 0) is a helix.

ProofH

Curvature of surfaces, and Gauss's remarkable theorem

Theorem— Proposition 2 (normal curvature and Euler's formula)

Let γ\gamma be a unit-speed curve on the surface with γ′(0)=v\gamma'(0) = v. Then γ′′(0)⋅n=⟨Sv,v⟩\gamma''(0) \cdot n = \langle S v, v\rangle, the normal curvature kn(v)k_n(v); it depends only on vv. The operator SS is self-adjoint, so it has an orthonormal eigenbasis e1,e2e_1, e_2 with eigenvalues k1≥k2k_1 \ge k_2. For v=cos⁡θ e1+sin⁡θ e2v = \cos\theta\, e_1 + \sin\theta\, e_2,

kn(v)=k1cos⁡2θ+k2sin⁡2θ,k_n(v) = k_1 \cos^2\theta + k_2 \sin^2\theta ,

so k1k_1 and k2k_2 are the largest and smallest normal curvatures.

Proof

Along γ\gamma, γ′⋅n=0\gamma' \cdot n = 0. Differentiating, γ′′⋅n=−γ′⋅(n∘γ)′=−v⋅dn(v)=⟨Sv,v⟩\gamma'' \cdot n = -\gamma' \cdot (n \circ \gamma)' = -v \cdot dn(v) = \langle Sv, v\rangle at t=0t = 0. Self-adjointness: ⟨SXu,Xv⟩=−nu⋅Xv=n⋅Xuv\langle S X_u, X_v \rangle = -n_u \cdot X_v = n \cdot X_{uv} (differentiate n⋅Xv=0n \cdot X_v = 0 in uu), which is symmetric in uu and vv. The spectral theorem for self-adjoint operators on a 2-dimensional inner product space gives the eigenbasis, and ⟨Sv,v⟩=k1cos⁡2θ+k2sin⁡2θ\langle Sv, v\rangle = k_1\cos^2\theta + k_2\sin^2\theta by expanding.

∎

The same computation, with v=Xuv = X_u or XvX_v, shows ⟨SXu,Xu⟩=L\langle S X_u, X_u\rangle = L, ⟨SXu,Xv⟩=M\langle S X_u, X_v \rangle = M and ⟨SXv,Xv⟩=N\langle S X_v, X_v\rangle = N. That is why SS has the matrix I−1III^{-1} II given in the definitions, and why K=det⁡S=(LN−M2)/(EG−F2)K = \det S = (LN - M^2)/(EG - F^2).

Theorem— Theorem 3 (Gauss's Theorema Egregium, 1827 — proof sketched)

The Gaussian curvature KK can be computed from E,F,GE, F, G and their first and second derivatives alone. In particular, if F=0F = 0,

K=−12EG[∂∂u ⁣(GuEG)+∂∂v ⁣(EvEG)].K = -\frac{1}{2\sqrt{EG}} \left[ \frac{\partial}{\partial u}\!\left( \frac{G_u}{\sqrt{EG}} \right) + \frac{\partial}{\partial v}\!\left( \frac{E_v}{\sqrt{EG}} \right) \right].

So KK is preserved by local isometries — maps that preserve the lengths of curves.

Proof sketch. Write the second derivatives of XX in the moving frame (Xu,Xv,n)(X_u, X_v, n):

Xuu=Γ111Xu+Γ112Xv+L n,Xuv=Γ121Xu+Γ122Xv+M n,Xvv=Γ221Xu+Γ222Xv+N n.X_{uu} = \Gamma^1_{11} X_u + \Gamma^2_{11} X_v + L\, n, \quad X_{uv} = \Gamma^1_{12} X_u + \Gamma^2_{12} X_v + M\, n, \quad X_{vv} = \Gamma^1_{22} X_u + \Gamma^2_{22} X_v + N\, n .

Taking inner products with XuX_u and XvX_v shows that the Christoffel symbols Γijk\Gamma^k_{ij} are determined by E,F,GE, F, G and their first derivatives. For instance, Xuu⋅Xu=12EuX_{uu} \cdot X_u = \tfrac12 E_u and Xuu⋅Xv=Fu−12EvX_{uu} \cdot X_v = F_u - \tfrac12 E_v. Now use the symmetry of third derivatives, (Xuu)v=(Xuv)u(X_{uu})_v = (X_{uv})_u. Expand both sides in the frame, using the Weingarten equations for nu,nvn_u, n_v (whose coefficients are those of SS), and compare the coefficients of XvX_v. The result is the Gauss equation

E K=(Γ112)v−(Γ122)u+Γ111Γ122+Γ112Γ222−Γ121Γ112−(Γ122)2.E\,K = (\Gamma^2_{11})_v - (\Gamma^2_{12})_u + \Gamma^1_{11}\Gamma^2_{12} + \Gamma^2_{11}\Gamma^2_{22} - \Gamma^1_{12}\Gamma^2_{11} - (\Gamma^2_{12})^2 .

Its right-hand side involves only E,F,GE, F, G and their derivatives. Carried out in full (do Carmo 1976, §4-3), this gives Brioschi's formula for KK in terms of E,F,GE, F, G, and the displayed formula when F=0F = 0. For the sphere, EG=R2cos⁡φ\sqrt{EG} = R^2\cos\varphi, Gθ=0G_\theta = 0 and Eφ/EG=−2sin⁡φE_\varphi/\sqrt{EG} = -2\sin\varphi. So K=−12R2cos⁡φ(−2cos⁡φ)=1/R2K = -\frac{1}{2R^2\cos\varphi}(-2\cos\varphi) = 1/R^2, agreeing with the extrinsic computation. The second experiment below checks Brioschi's formula symbolically on five surfaces.

Theorem— Corollary 4 (no perfect map)

No region of a sphere can be mapped onto a region of the plane so that all distances along the surfaces are preserved.

Proof

Such a map would be a local isometry. Parametrising the region of the sphere by XX and its image by the composite with the map, the two parametrisations have the same E,F,GE, F, G, because lengths of curves determine E,F,GE, F, G (differentiate the length of t↦X(u0+t,v0)t \mapsto X(u_0 + t, v_0) to get E\sqrt E, and similarly for GG and FF). By the Theorema Egregium they have the same KK. But K=1/R2K = 1/R^2 on the sphere and K=0K = 0 on the plane.

∎

The converse direction explains the pizza. A slice is (nearly) flat, K=0K = 0, and bending does not change KK. If you curve the crust into a U, one principal curvature becomes non-zero, so the other must stay 00 — the slice cannot droop along its length. The cylinder and the cone are flat in Gauss's sense (K=0K = 0), which is why paper rolls onto them.

ProofH

The Gauss–Bonnet theorem

On a sphere, triangles made of great-circle arcs have angle sums greater than π\pi. The excess measures the area.

Theorem— Theorem 5 (Girard's theorem, 1629)

A triangle on a sphere of radius RR whose sides are great-circle arcs, with angles α,β,γ\alpha, \beta, \gamma, has area R2(α+β+γ−π)R^2(\alpha + \beta + \gamma - \pi). Equivalently, α+β+γ−π=∬ΔK dA\alpha + \beta + \gamma - \pi = \iint_\Delta K\, dA.

Proof

Two great circles through a vertex with angle α\alpha cut the sphere into four lunes: two opposite ones with angle α\alpha and two with angle π−α\pi - \alpha. A lune's area is proportional to its angle, and the whole sphere (4πR24\pi R^2) corresponds to angle 2π2\pi, so a lune of angle α\alpha has area 2αR22\alpha R^2, and the pair of opposite lunes of angle α\alpha has area 4αR24\alpha R^2.

The three great circles through the sides of the triangle Δ\Delta give three such pairs of lunes, one for each vertex. Together they cover the sphere: every point lies in exactly one of them, except the points of Δ\Delta and of the antipodal triangle −Δ-\Delta, which lie in all three. Adding up areas,

4R2(α+β+γ)=4πR2+2 Area(Δ)+2 Area(−Δ)=4πR2+4 Area(Δ).4R^2(\alpha + \beta + \gamma) = 4\pi R^2 + 2\,\mathrm{Area}(\Delta) + 2\,\mathrm{Area}(-\Delta) = 4\pi R^2 + 4\,\mathrm{Area}(\Delta).

Hence Area(Δ)=R2(α+β+γ−π)\mathrm{Area}(\Delta) = R^2(\alpha + \beta + \gamma - \pi). Since K=1/R2K = 1/R^2 is constant, ∬ΔK dA=Area(Δ)/R2\iint_\Delta K\,dA = \mathrm{Area}(\Delta)/R^2.

∎

The triangle with vertices at the North Pole and two points on the equator a quarter-turn apart has three right angles. Its area is R2(3π/2−π)=πR2/2R^2(3\pi/2 - \pi) = \pi R^2/2, one eighth of the sphere, as it should be. Gauss proved the same formula for geodesic triangles on any surface. With a boundary term for curves that are not geodesics, this is the local Gauss–Bonnet theorem (Bonnet, 1848): for a region DD homeomorphic to a disc, with piecewise smooth boundary of geodesic curvature kgk_g and exterior angles θi\theta_i at the corners,

∬DK dA+∫∂Dkg ds+∑iθi=2π.\iint_D K\, dA + \int_{\partial D} k_g\, ds + \sum_i \theta_i = 2\pi .

For a proof see do Carmo (1976), §4-5.

Theorem— Theorem 6 (global Gauss–Bonnet)

For a compact oriented surface SS without boundary,

∬SK dA=2πχ(S),\iint_S K\, dA = 2\pi \chi(S),

where χ(S)=V−E+F\chi(S) = V - E + F is the Euler characteristic of any triangulation (for the surface of genus gg, χ=2−2g\chi = 2 - 2g).

Proof, from the local theorem. Triangulate SS into small triangles with VV vertices, EE edges and FF faces, and apply the local theorem to each triangle. Each edge lies in two triangles, traversed in opposite directions, so the boundary integrals ∫kg ds\int k_g\,ds cancel in pairs. For each triangle, ∑iθi=3π−(sum of interior angles)\sum_i \theta_i = 3\pi - (\text{sum of interior angles}). Summing over all triangles gives

∬SK dA=2πF−3πF+(sum of all interior angles)=−πF+2πV,\iint_S K\, dA = 2\pi F - 3\pi F + (\text{sum of all interior angles}) = -\pi F + 2\pi V ,

because the angles around each vertex add up to 2π2\pi. Every face has three edges and every edge lies on two faces, so 3F=2E3F = 2E, and −πF+2πV=2πV−2πE+2πF=2πχ(S)-\pi F + 2\pi V = 2\pi V - 2\pi E + 2\pi F = 2\pi \chi(S). (That χ\chi does not depend on the triangulation is a theorem of topology; here it even follows, since the left side does not depend on it.)

Checks. Sphere: K=1/R2K = 1/R^2, area 4πR24\pi R^2, total 4π=2π⋅24\pi = 2\pi \cdot 2. Torus: K dA=cos⁡φ dθ dφK\,dA = \cos\varphi\, d\theta\, d\varphi, and ∫02π ⁣ ⁣∫02πcos⁡φ dφ dθ=0=2π⋅0\int_0^{2\pi}\!\!\int_0^{2\pi} \cos\varphi\, d\varphi\, d\theta = 0 = 2\pi \cdot 0. Both computations are formalised in Lean below. An ellipsoid, or any sphere-shaped surface however bumpy, also has total curvature exactly 4π4\pi. The first experiment integrates it numerically.

Theorem— Corollary 7

(a) A compact surface in R3\R^3 has a point where K>0K > 0. (b) Every torus in R3\R^3 has points where K<0K \lt 0. (c) A compact orientable surface with K>0K > 0 everywhere is homeomorphic to a sphere.

Proof

(a) Let pp be a point of the surface farthest from the origin, at distance ρ\rho. The surface lies inside the sphere of radius ρ\rho through pp and touches it at pp, so every normal section at pp curves at least as much as that sphere: k1,k2≥1/ρk_1, k_2 \ge 1/\rho in absolute value, with the same sign. So K(p)≥1/ρ2>0K(p) \ge 1/\rho^2 > 0. (b) A torus has χ=0\chi = 0, so ∬K dA=0\iint K\, dA = 0; by (a) K>0K > 0 somewhere, so K<0K \lt 0 somewhere else. (c) 2πχ=∬K dA>02\pi\chi = \iint K\, dA > 0 forces χ=2−2g>0\chi = 2 - 2g > 0, so g=0g = 0; by the classification of surfaces, SS is a sphere.

∎

Formal mathematicsF

Curvature in Lean

Mathlib's calculus is extensive, but at this version it has no differential geometry of curves and surfaces in R3\R^3: no Frenet frame, no fundamental forms, no Gaussian curvature. The Lean module therefore works with explicit parametrisations and writes vectors of R3\R^3 as triples. It computes derivatives with Mathlib's rules (HasDerivAt.comp, HasDerivAt.prodMk) and verifies the lesson's formulas. This formalises the examples of the lesson, not the general theorems.

The circle: a chain-rule lemma, the velocity and unit speed, the acceleration, and κ=1/r\kappa = 1/r:

hasDerivAt_cos_divLean 4Proved here from basic factsFormally verified
/-- `d/ds [c · cos(s / r)] = -(c / r) · sin(s / r)`, by the chain rule. -/
theorem hasDerivAt_cos_div (c r s : ℝ) :
    HasDerivAt (fun s => c * cos (s / r)) (-(c / r) * sin (s / r)) s := by
  have h := ((hasDerivAt_id' s).div_const r).cos.const_mul c
  convert h using 1
  ring
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/CurvesSurfaces.leanTry it in the Lean web editor
circle_velocityLean 4Proved here from basic factsFormally verified
/-- The circle of radius `r ≠ 0` parametrised by arc length, `γ(s) = (r cos(s/r), r sin(s/r))`, has
velocity `γ'(s) = (-sin(s/r), cos(s/r))`. -/
theorem circle_velocity (r s : ℝ) (hr : r ≠ 0) :
    HasDerivAt (fun s => (r * cos (s / r), r * sin (s / r))) (-sin (s / r), cos (s / r)) s := by
  have h1 := hasDerivAt_cos_div r r s
  have h2 := hasDerivAt_sin_div r r s
  rw [div_self hr] at h1 h2
  simpa using h1.prodMk h2
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/CurvesSurfaces.leanTry it in the Lean web editor
circle_unit_speedLean 4Proved here from basic factsFormally verified
/-- The velocity `(-sin(s/r), cos(s/r))` has length `1`: the parametrisation has **unit speed**, so
`s` measures arc length. -/
theorem circle_unit_speed (r s : ℝ) : (-sin (s / r)) ^ 2 + (cos (s / r)) ^ 2 = 1 := by
  rw [neg_sq, sin_sq_add_cos_sq]
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/CurvesSurfaces.leanTry it in the Lean web editor
circle_accelerationLean 4Proved here from basic factsFormally verified
/-- Differentiating again, the acceleration of the unit-speed circle is
`γ''(s) = (-(1/r) cos(s/r), -(1/r) sin(s/r))`, pointing to the centre. -/
theorem circle_acceleration (r s : ℝ) :
    HasDerivAt (fun s => (-sin (s / r), cos (s / r)))
      (-(1 / r) * cos (s / r), -(1 / r) * sin (s / r)) s := by
  have h1 := (hasDerivAt_sin_div 1 r s).neg
  have h2 := hasDerivAt_cos_div 1 r s
  simp only [one_mul] at h1 h2
  convert h1.prodMk h2 using 1
  simp only [Prod.mk.injEq, and_true]
  ring
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/CurvesSurfaces.leanTry it in the Lean web editor
circle_curvatureLean 4Proved here from basic factsFormally verified
/-- **The curvature of a circle of radius `r > 0` is `1/r`.** The curvature of a unit-speed curve
is `κ = |γ''|`, and here `|γ''|² = (1/r)² (cos² + sin²) = 1/r²`. -/
theorem circle_curvature (r s : ℝ) (hr : 0 < r) :
    √((-(1 / r) * cos (s / r)) ^ 2 + (-(1 / r) * sin (s / r)) ^ 2) = 1 / r := by
  have h : (-(1 / r) * cos (s / r)) ^ 2 + (-(1 / r) * sin (s / r)) ^ 2 = (1 / r) ^ 2 := by
    have := cos_sq_add_sin_sq (s / r)
    linear_combination (1 / r) ^ 2 * this
  rw [h, sqrt_sq (by positivity)]
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/CurvesSurfaces.leanTry it in the Lean web editor

The helix: its velocity, the derivatives of TT and BB, and the Frenet data ∣T∣=1|T| = 1, T′=κNT' = \kappa N with κ=a/c2\kappa = a/c^2, B=T×NB = T \times N and B′=−τNB' = -\tau N with τ=b/c2\tau = b/c^2:

helix_velocityLean 4Proved here from basic factsFormally verified
/-- The helix `γ(s) = (a cos(s/c), a sin(s/c), b s / c)` has velocity
`T = ((-a/c) sin(s/c), (a/c) cos(s/c), b/c)`. -/
theorem helix_velocity (a b c s : ℝ) :
    HasDerivAt (fun s => (a * cos (s / c), a * sin (s / c), b * s / c))
      (-(a / c) * sin (s / c), (a / c) * cos (s / c), b / c) s := by
  have h3 : HasDerivAt (fun s => b * s / c) (b / c) s := by
    simpa using ((hasDerivAt_id s).const_mul b).div_const c
  exact (hasDerivAt_cos_div a c s).prodMk ((hasDerivAt_sin_div a c s).prodMk h3)
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/CurvesSurfaces.leanTry it in the Lean web editor
helix_tangent_derivLean 4Proved here from basic factsFormally verified
/-- Differentiating the unit tangent `T(s) = ((-a/c) sin(s/c), (a/c) cos(s/c), b/c)` of the helix:
`T'(s) = ((-a/c²) cos(s/c), (-a/c²) sin(s/c), 0)`. -/
theorem helix_tangent_deriv (a b c s : ℝ) :
    HasDerivAt (fun s => (-(a / c) * sin (s / c), (a / c) * cos (s / c), b / c))
      (-(a / c ^ 2) * cos (s / c), -(a / c ^ 2) * sin (s / c), 0) s := by
  have h1 := hasDerivAt_sin_div (-(a / c)) c s
  have h2 := hasDerivAt_cos_div (a / c) c s
  have h3 := hasDerivAt_const s (b / c)
  convert h1.prodMk (h2.prodMk h3) using 1
  exact Prod.ext (by ring) (Prod.ext (by ring) rfl)
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/CurvesSurfaces.leanTry it in the Lean web editor
helix_binormal_derivLean 4Proved here from basic factsFormally verified
/-- Differentiating the binormal `B(s) = ((b/c) sin(s/c), (-b/c) cos(s/c), a/c)` of the helix:
`B'(s) = ((b/c²) cos(s/c), (b/c²) sin(s/c), 0)`. -/
theorem helix_binormal_deriv (a b c s : ℝ) :
    HasDerivAt (fun s => ((b / c) * sin (s / c), -(b / c) * cos (s / c), a / c))
      ((b / c ^ 2) * cos (s / c), (b / c ^ 2) * sin (s / c), 0) s := by
  have h1 := hasDerivAt_sin_div (b / c) c s
  have h2 := hasDerivAt_cos_div (-(b / c)) c s
  have h3 := hasDerivAt_const s (a / c)
  convert h1.prodMk (h2.prodMk h3) using 1
  exact Prod.ext (by ring) (Prod.ext (by ring) rfl)
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/CurvesSurfaces.leanTry it in the Lean web editor
helix_frenetLean 4Proved here from basic factsFormally verified
/-- **Curvature and torsion of a helix.** Let `c = √(a² + b²) > 0` and `T` be the velocity above.
Then (1) `|T| = 1`, so `s` is arc length; (2) `T' = (a/c²)·N` with `N = (-cos, -sin, 0)` a unit
vector, so the curvature is `κ = a/c²`; (3) the binormal `B = T × N` satisfies `B' = -(b/c²)·N`,
so the torsion is `τ = b/c²`. Here `θ = s/c`, and `T'`, `B'` are the derivatives computed in
`helix_tangent_deriv` and `helix_binormal_deriv`. -/
theorem helix_frenet (a b c θ : ℝ) (hc : c ^ 2 = a ^ 2 + b ^ 2) (hc0 : c ≠ 0) :
    let T : ℝ × ℝ × ℝ := (-(a / c) * sin θ, (a / c) * cos θ, b / c)
    let N : ℝ × ℝ × ℝ := (-cos θ, -sin θ, 0)
    let B := cross T N
    dot T T = 1 ∧ dot N N = 1 ∧
      B = ((b / c) * sin θ, -(b / c) * cos θ, a / c) ∧
      ((-(a / c ^ 2)) * cos θ, (-(a / c ^ 2)) * sin θ, (0 : ℝ)) = (a / c ^ 2) • N ∧
      (((b / c ^ 2)) * cos θ, (b / c ^ 2) * sin θ, (0 : ℝ)) = (-(b / c ^ 2)) • N := by
  intro T N B
  have hs := sin_sq_add_cos_sq θ
  refine ⟨?_, ?_, ?_, ?_, ?_⟩
  · simp only [T, dot]
    field_simp
    linear_combination (a ^ 2) * hs - hc
  · simp only [N, dot]
    linear_combination hs
  · simp only [B, T, N, cross, Prod.mk.injEq]
    refine ⟨by ring, by ring, ?_⟩
    field_simp
    linear_combination a * hs
  · simp only [N, Prod.smul_mk, smul_eq_mul, Prod.mk.injEq]
    refine ⟨by ring, by ring, by ring⟩
  · simp only [N, Prod.smul_mk, smul_eq_mul, Prod.mk.injEq]
    refine ⟨by ring, by ring, by ring⟩
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/CurvesSurfaces.leanTry it in the Lean web editor

Surfaces: the formula K=(LN−M2)/(EG−F2)K = (LN - M^2)/(EG - F^2) as a definition, the sphere's partial derivatives and fundamental forms, and the curvatures of the sphere, the torus and the cylinder:

gaussCurvatureLean 4Formally verified
/-- The **Gaussian curvature** from the coefficients of the first fundamental form `E, F, G` and
the second fundamental form `L, M, N`: `K = (LN - M²) / (EG - F²)`. -/
noncomputable def gaussCurvature (E F G L M N : ℝ) : ℝ := (L * N - M ^ 2) / (E * G - F ^ 2)
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/CurvesSurfaces.leanTry it in the Lean web editor
sphereLean 4Formally verified
/-- The sphere of radius `R` in longitude `θ` and latitude `φ`:
`X(θ, φ) = (R cos φ cos θ, R cos φ sin θ, R sin φ)`. -/
noncomputable def sphere (R θ φ : ℝ) : ℝ × ℝ × ℝ :=
  (R * cos φ * cos θ, R * cos φ * sin θ, R * sin φ)
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/CurvesSurfaces.leanTry it in the Lean web editor
sphere_dThetaLean 4Proved here from basic factsFormally verified
/-- The partial derivative in the longitude: `X_θ = (-R cos φ sin θ, R cos φ cos θ, 0)`. -/
theorem sphere_dTheta (R θ φ : ℝ) :
    HasDerivAt (fun θ => sphere R θ φ) (-(R * cos φ) * sin θ, R * cos φ * cos θ, 0) θ := by
  have h1 := (hasDerivAt_cos θ).const_mul (R * cos φ)
  have h2 := (hasDerivAt_sin θ).const_mul (R * cos φ)
  have h3 := hasDerivAt_const θ (R * sin φ)
  convert h1.prodMk (h2.prodMk h3) using 1
  · rfl
  · exact Prod.ext (by ring) rfl
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/CurvesSurfaces.leanTry it in the Lean web editor
sphere_dPhiLean 4Proved here from basic factsFormally verified
/-- The partial derivative in the latitude: `X_φ = (-R sin φ cos θ, -R sin φ sin θ, R cos φ)`. -/
theorem sphere_dPhi (R θ φ : ℝ) :
    HasDerivAt (fun φ => sphere R θ φ)
      (-(R * sin φ) * cos θ, -(R * sin φ) * sin θ, R * cos φ) φ := by
  have h1 := ((hasDerivAt_cos φ).const_mul R).mul_const (cos θ)
  have h2 := ((hasDerivAt_cos φ).const_mul R).mul_const (sin θ)
  have h3 := (hasDerivAt_sin φ).const_mul R
  convert h1.prodMk (h2.prodMk h3) using 1
  · rfl
  · exact Prod.ext (by ring) (Prod.ext (by ring) rfl)
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/CurvesSurfaces.leanTry it in the Lean web editor
sphere_first_formLean 4Proved here from basic factsFormally verified
/-- **First fundamental form of the sphere**: `E = X_θ · X_θ = R² cos² φ`, `F = X_θ · X_φ = 0`,
`G = X_φ · X_φ = R²`. -/
theorem sphere_first_form (R θ φ : ℝ) :
    let Xθ : ℝ × ℝ × ℝ := (-(R * cos φ) * sin θ, R * cos φ * cos θ, 0)
    let Xφ : ℝ × ℝ × ℝ := (-(R * sin φ) * cos θ, -(R * sin φ) * sin θ, R * cos φ)
    dot Xθ Xθ = R ^ 2 * cos φ ^ 2 ∧ dot Xθ Xφ = 0 ∧ dot Xφ Xφ = R ^ 2 := by
  intro Xθ Xφ
  have hθ := sin_sq_add_cos_sq θ
  have hφ := sin_sq_add_cos_sq φ
  refine ⟨?_, ?_, ?_⟩ <;> simp only [Xθ, Xφ, dot]
  · linear_combination (R ^ 2 * cos φ ^ 2) * hθ
  · ring
  · linear_combination (R ^ 2 * sin φ ^ 2) * hθ + R ^ 2 * hφ
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/CurvesSurfaces.leanTry it in the Lean web editor
sphere_second_formLean 4Proved here from basic factsFormally verified
/-- **Second fundamental form of the sphere**, with the outward unit normal
`n = (cos φ cos θ, cos φ sin θ, sin φ)` and the second derivatives
`X_θθ = (-R cos φ cos θ, -R cos φ sin θ, 0)`, `X_θφ = (R sin φ sin θ, -R sin φ cos θ, 0)` and
`X_φφ = (-R cos φ cos θ, -R cos φ sin θ, -R sin φ)`: `L = -R cos² φ`, `M = 0`, `N = -R`, and `n` is
a unit vector. -/
theorem sphere_second_form (R θ φ : ℝ) :
    let n : ℝ × ℝ × ℝ := (cos φ * cos θ, cos φ * sin θ, sin φ)
    let Xθθ : ℝ × ℝ × ℝ := (-(R * cos φ) * cos θ, -(R * cos φ) * sin θ, 0)
    let Xθφ : ℝ × ℝ × ℝ := (R * sin φ * sin θ, -(R * sin φ) * cos θ, 0)
    let Xφφ : ℝ × ℝ × ℝ := (-(R * cos φ) * cos θ, -(R * cos φ) * sin θ, -(R * sin φ))
    dot n n = 1 ∧ dot Xθθ n = -R * cos φ ^ 2 ∧ dot Xθφ n = 0 ∧ dot Xφφ n = -R := by
  intro n Xθθ Xθφ Xφφ
  have hθ := sin_sq_add_cos_sq θ
  have hφ := sin_sq_add_cos_sq φ
  refine ⟨?_, ?_, ?_, ?_⟩ <;> simp only [n, Xθθ, Xθφ, Xφφ, dot]
  · linear_combination (cos φ ^ 2) * hθ + hφ
  · linear_combination (-R * cos φ ^ 2) * hθ
  · ring
  · linear_combination (-R * cos φ ^ 2) * hθ - R * hφ
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/CurvesSurfaces.leanTry it in the Lean web editor
sphere_gauss_curvatureLean 4Proved here from basic factsFormally verified
/-- **The sphere of radius `R` has constant Gaussian curvature `1/R²`** (away from the poles,
where `cos φ ≠ 0` and the coordinates are regular):
`K = (LN - M²)/(EG - F²) = (R² cos² φ)/(R⁴ cos² φ) = 1/R²`. -/
theorem sphere_gauss_curvature (R φ : ℝ) (hR : R ≠ 0) (hφ : cos φ ≠ 0) :
    gaussCurvature (R ^ 2 * cos φ ^ 2) 0 (R ^ 2) (-R * cos φ ^ 2) 0 (-R) = 1 / R ^ 2 := by
  unfold gaussCurvature
  field_simp
  ring
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/CurvesSurfaces.leanTry it in the Lean web editor
torus_gauss_curvatureLean 4Proved here from basic factsFormally verified
/-- **The torus.** For `X(θ, φ) = ((R + r cos φ) cos θ, (R + r cos φ) sin θ, r sin φ)` with
`0 < r < R`, the fundamental forms are `E = (R + r cos φ)²`, `F = 0`, `G = r²`,
`L = -(R + r cos φ) cos φ`, `M = 0`, `N = -r`, so `K = cos φ / (r (R + r cos φ))`: positive on the
outside (`cos φ > 0`), negative on the inside, zero on the top and bottom circles. -/
theorem torus_gauss_curvature (R r φ : ℝ) (hr : 0 < r) (hRr : r < R) :
    gaussCurvature ((R + r * cos φ) ^ 2) 0 (r ^ 2) (-(R + r * cos φ) * cos φ) 0 (-r) =
      cos φ / (r * (R + r * cos φ)) := by
  have hpos : 0 < R + r * cos φ := by
    nlinarith [neg_one_le_cos φ, cos_le_one φ]
  unfold gaussCurvature
  field_simp
  ring
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/CurvesSurfaces.leanTry it in the Lean web editor
cylinder_gauss_curvatureLean 4Proved here from basic factsFormally verified
/-- **The cylinder is flat.** For `X(θ, z) = (r cos θ, r sin θ, z)`: `E = r²`, `F = 0`, `G = 1`,
`L = -r`, `M = 0`, `N = 0`, so `K = 0`. One principal curvature is `1/r`, the other `0`; their
product vanishes — although the cylinder looks curved. -/
theorem cylinder_gauss_curvature (r : ℝ) : gaussCurvature (r ^ 2) 0 1 (-r) 0 0 = 0 := by
  simp [gaussCurvature]
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/CurvesSurfaces.leanTry it in the Lean web editor

Gauss–Bonnet on the sphere and the torus, as iterated integrals of K dAK\,dA, using Mathlib's ∫abcos⁡=sin⁡b−sin⁡a\int_a^b \cos = \sin b - \sin a:

integral_cos_libraryLean 4Applies a library theoremFormally verified
/-- `∫ₐᵇ cos x dx = sin b - sin a`. This applies Mathlib's `integral_cos` (the fundamental
theorem of calculus for `sin' = cos`). -/
theorem integral_cos_library (a b : ℝ) : ∫ x in a..b, cos x = sin b - sin a :=
  integral_cos
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/CurvesSurfaces.leanTry it in the Lean web editor
gauss_bonnet_sphereLean 4Proved here from basic factsFormally verified
/-- **Gauss–Bonnet for the sphere.** The area element is `dA = √(EG - F²) dθ dφ = R² cos φ dθ dφ`
(for `|φ| ≤ π/2`) and `K = 1/R²`, so `K dA = cos φ dθ dφ`. Integrating over longitude `[0, 2π]`
and latitude `[-π/2, π/2]` gives `2π · 2 = 4π = 2π χ(S²)`, for every radius `R`. -/
theorem gauss_bonnet_sphere (R : ℝ) (hR : R ≠ 0) :
    ∫ _θ in (0 : ℝ)..2 * π, ∫ φ in (-(π / 2))..(π / 2), (1 / R ^ 2) * (R ^ 2 * cos φ) =
      2 * π * 2 := by
  have hK : ∀ φ : ℝ, (1 / R ^ 2) * (R ^ 2 * cos φ) = cos φ := by
    intro φ
    field_simp
  simp only [hK, integral_cos, sin_neg, sin_pi_div_two, intervalIntegral.integral_const,
    smul_eq_mul]
  ring
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/CurvesSurfaces.leanTry it in the Lean web editor
gauss_bonnet_torusLean 4Proved here from basic factsFormally verified
/-- **Gauss–Bonnet for the torus.** Here `dA = r (R + r cos φ) dθ dφ`, so
`K dA = cos φ dθ dφ`, and `∫₀^{2π} ∫₀^{2π} cos φ dφ dθ = 0 = 2π χ(T²)`. The positive curvature
on the outside exactly cancels the negative curvature on the inside. -/
theorem gauss_bonnet_torus (R r : ℝ) (hr : 0 < r) (hRr : r < R) :
    ∫ _θ in (0 : ℝ)..2 * π, ∫ φ in (0 : ℝ)..2 * π,
      cos φ / (r * (R + r * cos φ)) * (r * (R + r * cos φ)) = 0 := by
  have hK : ∀ φ : ℝ, cos φ / (r * (R + r * cos φ)) * (r * (R + r * cos φ)) = cos φ := by
    intro φ
    have hpos : 0 < R + r * cos φ := by
      nlinarith [neg_one_le_cos φ, cos_le_one φ]
    exact div_mul_cancel₀ (cos φ) (mul_ne_zero hr.ne' hpos.ne')
  simp only [hK, integral_cos, sin_two_pi, sin_zero, sub_zero, intervalIntegral.integral_const,
    smul_eq_mul, mul_zero]
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/CurvesSurfaces.leanTry it in the Lean web editor

What is and is not formalised. Formalised (independently): all the derivative computations for the circle, the helix and the sphere; the fundamental forms of the sphere; the Gaussian curvature formulas for the sphere, torus and cylinder, given their fundamental forms (for the torus and cylinder the forms are stated, not derived); the Frenet data of the helix; and the two Gauss–Bonnet integrals. Cited from Mathlib: ∫cos⁡\int \cos. Not formalised: regular surfaces in general, the shape operator, Theorem 1 in general, the Theorema Egregium, Girard's theorem, and the Gauss–Bonnet theorem in general.

ComputationC

Total curvature and the Theorema Egregium by computer

The first program integrates curvature around closed curves. For plane curves, ∫κ ds\int \kappa\, ds is 2π2\pi times the turning number: Hopf's Umlaufsatz (1935) says it is ±1\pm 1 for simple closed curves. For space curves, the total curvature ∫∣κ∣ ds\int |\kappa|\, ds is at least 2π2\pi (Fenchel, 1929), with equality only for convex plane curves. It exceeds 4π4\pi for every knotted curve (Fáry 1949, Milnor 1950) — a bridge to knot theory.

Total curvature of closed curves: Hopf, Fenchel, Fary-MilnorPythonNumerical approximationComputationally tested
"""Total curvature of closed curves: Hopf, Fenchel and Fary-Milnor.

For a closed plane curve, the signed curvature integrated along the curve,
the integral of kappa ds, is 2 pi times the turning number (Hopf's
Umlaufsatz: +-1 for a simple closed curve). For a closed space curve the
total curvature, the integral of |kappa| ds, is at least 2 pi (Fenchel), and
more than 4 pi if the curve is knotted (Fary-Milnor). We compute these
integrals numerically: derivatives by central differences, integrals by the
midpoint rule. We also check the curvature of a helix against the exact value
a / (a^2 + b^2). Evidence: numerical, for these curves only.
"""

import math

H = 1e-4
N = 4000

def derivatives(curve, t):
    """First and second derivatives of a curve R -> R^n by central differences."""
    p_minus, p, p_plus = curve(t - H), curve(t), curve(t + H)
    d1 = [(b - a) / (2 * H) for a, b in zip(p_minus, p_plus)]
    d2 = [(a - 2 * c + b) / H ** 2 for a, c, b in zip(p_minus, p, p_plus)]
    return d1, d2

def cross(u, v):
    """Cross product in R^3."""
    return (u[1] * v[2] - u[2] * v[1], u[2] * v[0] - u[0] * v[2],
            u[0] * v[1] - u[1] * v[0])

def norm(u):
    """Euclidean length."""
    return math.sqrt(sum(x * x for x in u))

def signed_curvature(curve, t):
    """kappa = (x'y'' - y'x'') / |gamma'|^3 for a plane curve."""
    (x1, y1), (x2, y2) = derivatives(curve, t)
    return (x1 * y2 - y1 * x2) / (x1 * x1 + y1 * y1) ** 1.5

def curvature(curve, t):
    """kappa = |gamma' x gamma''| / |gamma'|^3 for a space curve."""
    d1, d2 = derivatives(curve, t)
    return norm(cross(d1, d2)) / norm(d1) ** 3

def integrate_over_period(f, curve, period=2 * math.pi, n=N):
    """Midpoint rule for the integral of f(curve, t) |gamma'(t)| dt."""
    dt = period / n
    total = 0.0
    for k in range(n):
        t = (k + 0.5) * dt
        speed = norm(derivatives(curve, t)[0])
        total += f(curve, t) * speed * dt
    return total

PLANE = {
    "circle": lambda t: (math.cos(t), math.sin(t)),
    "ellipse 3 x 1": lambda t: (3 * math.cos(t), math.sin(t)),
    "limacon r=1+2cos": lambda t: ((1 + 2 * math.cos(t)) * math.cos(t),
                                   (1 + 2 * math.cos(t)) * math.sin(t)),
    "figure eight": lambda t: (math.sin(t), math.sin(t) * math.cos(t)),
}

SPACE = {
    "circle in a plane": lambda t: (math.cos(t), math.sin(t), 0.0),
    "tilted ellipse": lambda t: (2 * math.cos(t), math.sin(t),
                                 math.sin(t)),
    "bent loop (unknot)": lambda t: (math.cos(t), math.sin(t),
                                     0.8 * math.cos(2 * t)),
    "trefoil knot": lambda t: (math.sin(t) + 2 * math.sin(2 * t),
                               math.cos(t) - 2 * math.cos(2 * t),
                               -math.sin(3 * t)),
}

def helix(a, b):
    """The helix t -> (a cos t, a sin t, b t)."""
    return lambda t: (a * math.cos(t), a * math.sin(t), b * t)

def main():
    print("Plane curves: integral of signed curvature / 2 pi = turning number")
    for name, c in PLANE.items():
        total = integrate_over_period(signed_curvature, c)
        print(f"  {name:<18} {round(total / (2 * math.pi), 5) + 0.0:9.5f}")
    print()
    print("Space curves: total curvature / pi (Fenchel: >= 2; knotted: > 4)")
    for name, c in SPACE.items():
        total = integrate_over_period(curvature, c)
        print(f"  {name:<18} {total / math.pi:9.5f}")
    print()
    a, b = 2.0, 1.0
    k = curvature(helix(a, b), 0.7)
    print(f"Helix a = {a}, b = {b}: kappa = {k:.6f}, exact a/(a^2+b^2) = "
          f"{a / (a * a + b * b):.6f}")
    print()
    print("The figure eight turns 0 times (it is not simple); the limacon with")
    print("its inner loop turns twice. Only the planar convex curves reach")
    print("Fenchel's bound 2 pi exactly, and the knotted curve exceeds 4 pi.")
    print()
    print("Epistemic status: numerical (central differences with h = 1e-4 and")
    print("a 4000-point midpoint rule), for these particular curves. The")
    print("theorems of Hopf, Fenchel and Fary-Milnor are proved in the")
    print("literature cited in the lesson, not here.")

if __name__ == "__main__":
    main()
Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

The second program computes KK twice for five surfaces: from the shape in space, (LN−M2)/(EG−F2)(LN - M^2)/(EG - F^2), and from E,F,GE, F, G alone by Brioschi's formula. It checks that the two agree, and that the catenoid and the helicoid share their first fundamental form. Then it integrates K dAK\,dA numerically over an ellipsoid.

Theorema Egregium on examples, and Gauss-Bonnet for an ellipsoidPythonSymbolic computationNumerical approximationComputationally tested
"""Gauss's Theorema Egregium checked symbolically, and Gauss-Bonnet numerically.

For a parametrised surface X(u, v) we compute, with SymPy, the first
fundamental form E, F, G and the (unnormalised) second fundamental form, and
from them the Gaussian curvature K = (LN - M^2) / (EG - F^2), which uses the
surface's shape in space. Separately we compute K from E, F, G alone by the
Brioschi formula, which only uses lengths measured on the surface. The
Theorema Egregium says the two always agree; here SymPy confirms it for five
surfaces. The catenoid and the helicoid have the same E, F, G, hence the same
K, although they look completely different in space. Finally we integrate
K dA numerically over an ellipsoid and compare with 2 pi chi = 4 pi.
Evidence: symbolic verification on examples, and a numerical integral.
"""

import math

import sympy

U, V = sympy.symbols("u v", real=True)
R = sympy.symbols("R", positive=True)

def surfaces():
    """Name -> parametrisation X(u, v) as a SymPy column vector."""
    cos, sin, cosh, sinh = sympy.cos, sympy.sin, sympy.cosh, sympy.sinh
    return {
        "sphere (radius R)": sympy.Matrix([R * cos(V) * cos(U),
                                           R * cos(V) * sin(U), R * sin(V)]),
        "catenoid": sympy.Matrix([cosh(U) * cos(V), cosh(U) * sin(V), U]),
        "helicoid": sympy.Matrix([sinh(U) * cos(V), sinh(U) * sin(V), V]),
        "saddle z = uv": sympy.Matrix([U, V, U * V]),
        "cylinder": sympy.Matrix([cos(U), sin(U), V]),
    }

def first_form(X):
    """(E, F, G), simplified."""
    xu, xv = X.diff(U), X.diff(V)
    return tuple(sympy.simplify(e) for e in (xu.dot(xu), xu.dot(xv), xv.dot(xv)))

def extrinsic_curvature(X):
    """K = (LN - M^2) / (EG - F^2), using the normal vector Xu x Xv."""
    xu, xv = X.diff(U), X.diff(V)
    n = xu.cross(xv)
    l2, m2, n2 = (X.diff(U, 2).dot(n), xu.diff(V).dot(n), X.diff(V, 2).dot(n))
    w2 = n.dot(n)          # |Xu x Xv|^2 = EG - F^2
    return (l2 * n2 - m2 ** 2) / w2 ** 2

def brioschi(E, F, G):
    """Gaussian curvature from E, F, G and their derivatives only."""
    d = sympy.diff
    a = sympy.Matrix([
        [-d(E, V, 2) / 2 + d(F, U, V) - d(G, U, 2) / 2, d(E, U) / 2,
         d(F, U) - d(E, V) / 2],
        [d(F, V) - d(G, U) / 2, E, F],
        [d(G, V) / 2, F, G]])
    b = sympy.Matrix([
        [0, d(E, V) / 2, d(G, U) / 2],
        [d(E, V) / 2, E, F],
        [d(G, U) / 2, F, G]])
    return (a.det() - b.det()) / (E * G - F ** 2) ** 2

def ellipsoid_total_curvature(a, b, c, n=150):
    """Midpoint-rule integral of K dA over the ellipsoid with semi-axes a, b, c."""
    X = sympy.Matrix([a * sympy.cos(V) * sympy.cos(U),
                      b * sympy.cos(V) * sympy.sin(U), c * sympy.sin(V)])
    xu, xv = X.diff(U), X.diff(V)
    nrm = xu.cross(xv)
    num = (X.diff(U, 2).dot(nrm) * X.diff(V, 2).dot(nrm)
           - xu.diff(V).dot(nrm) ** 2)
    k_da = sympy.lambdify((U, V), num / nrm.dot(nrm) ** sympy.Rational(3, 2),
                          "math")
    du, dv = 2 * math.pi / n, math.pi / n
    return sum(k_da((i + 0.5) * du, -math.pi / 2 + (j + 0.5) * dv)
               for i in range(n) for j in range(n)) * du * dv

def main():
    print(f"Gaussian curvature two ways (SymPy {sympy.__version__})")
    rows = {}
    for name, X in surfaces().items():
        E, F, G = first_form(X)
        k_in = sympy.simplify(brioschi(E, F, G))
        agree = sympy.simplify(extrinsic_curvature(X) - k_in) == 0
        rows[name] = (E, F, G)
        print(f"  {name}:")
        print(f"    E = {E}, F = {F}, G = {G}")
        print(f"    K = {k_in}; from the shape in space too: {agree}")
    same = rows["catenoid"] == rows["helicoid"]
    print(f"  catenoid and helicoid have the same E, F, G: {same}")
    print()
    total = ellipsoid_total_curvature(2.0, 1.5, 1.0)
    print("Gauss-Bonnet for the ellipsoid with semi-axes 2, 1.5, 1:")
    print(f"  integral of K dA = {total / math.pi:.6f} pi  (2 pi chi = 4 pi)")
    print()
    print("Epistemic status: the agreements are symbolic verifications for")
    print("these five surfaces (as trustworthy as SymPy's simplifier); the")
    print("ellipsoid integral is numerical (150 x 150 midpoint rule). The")
    print("Theorema Egregium and the Gauss-Bonnet theorem are theorems (see the")
    print("lesson and do Carmo 1976), not consequences of this computation.")

if __name__ == "__main__":
    main()
Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

Symbolic agreement on five examples is strong evidence that the formulas are right, but it is not the Theorema Egregium. The theorem is a statement about all surfaces, proved by the computation sketched above.

Explore

Explore: curvature you can see

Move the point along each curve and watch the osculating circle: large where the curve is nearly straight, small at sharp bends, and switching sides where the curvature changes sign. The total ∫κ ds\int \kappa\, ds is shown as a multiple of 2π2\pi. Compare the circle and the ellipse (turning number 11), the limaçon with an inner loop (22) and the figure eight (00). Slide the limaçon's parameter through c=1c = 1 and watch the turning number jump as the curve passes through a cusp, where it stops being regular.

Curvature, osculating circles and the turning number

A point travels along the curve. The osculating circle is the circle that fits the curve best at that point; its radius is 1/κ.

TN
Signed curvature
κ = 0.447
Radius of curvature
1/|κ| = 2.239

κ is positive where the curve bends to the left as you travel along it, and negative where it bends to the right. N is the tangent T turned 90° to the left; the centre of the osculating circle lies 1/|κ| away, on the side the curve bends towards.

∫ κ ds = 6.283 = 1.000 × 2π

Turning number 1: going once around, the tangent turns through 1 × 360° in total.

Hopf's Umlaufsatz: for a smooth closed curve, ∫ κ ds = 2π × (turning number). A simple closed curve — one that never crosses itself — traversed counter-clockwise always has turning number 1. The limaçon with an inner loop has 2; the figure eight has 0.

Arc length and ∫ κ ds are computed numerically from exact derivatives at thousands of points, so the last digit may wobble.

Signed curvature κ against arc length s

1.80−1.8κs = 9.95s = 0

The signed area under this graph is ∫ κ ds (teal above the axis counts as positive, terracotta below as negative). Very large values near a cusp are cut off.

Next, triangles on curved surfaces. On the sphere, drag the vertices of a geodesic triangle and compare the angle excess with the area: their ratio is K=1/R2K = 1/R^2 (Girard's theorem). In the hyperbolic plane, curvature −1-1, the angle sum falls short of π\pi by exactly the area. This is the local Gauss–Bonnet theorem.

Angle sum − π = K × area

Drag the corners. On a flat plane the angles add up to 180°; on a sphere they add up to more, and in the hyperbolic plane to less.

90.0°90.0°90.0°ABC

Drag a corner to move it; drag anywhere else to turn the sphere. The sides are arcs of great circles — the shortest paths on a sphere.

  • ∠A90.0°
  • ∠B90.0°
  • ∠C90.0°

∠A + ∠B + ∠C = 270.0°

Angle excess (sum − 180°)
90.0° = 1.571 rad
Area, measured numerically
1.571 R²
Share of the whole sphere (area ÷ 4πR²)
12.50 %

∠A + ∠B + ∠C − π = Area / R²On a sphere of radius R, the excess in radians equals the area divided by R². The area is computed separately, by numerical integration, so the match is a check rather than an assumption.

∠A + ∠B + ∠C − π = K · Area

Flat planeK = 0∠A+∠B+∠C = 180°
SphereK = 1/R²∠A+∠B+∠C > 180°
Hyperbolic planeK = −1∠A+∠B+∠C < 180°

This is a first glimpse of the Gauss–Bonnet theorem: for a triangle whose sides are geodesics (shortest paths), the angle sum minus π equals the total curvature inside it. Here the curvature K is the same everywhere; on other surfaces you add up (integrate) K over the area.

Exercises

Exercises

1. Differential geometry of curves and surfaces

Warm-upHuman

A running track has semicircular ends of radius 36.536.5 m. Along the straight parts the curvature is 00. What is the curvature on the bends?

Choose one

2. Differential geometry of curves and surfaces

Warm-upHuman

Which of these surfaces have Gaussian curvature K=0K = 0 at every point? (Choose all that apply.)

Choose all that apply

3. Differential geometry of curves and surfaces

CoreHuman

For the cylinder of radius 22, X(θ,z)=(2cos⁡θ,2sin⁡θ,z)X(\theta, z) = (2\cos\theta, 2\sin\theta, z), one finds E=4E = 4, F=0F = 0, G=1G = 1, L=−2L = -2, M=0M = 0, N=0N = 0. What are KK and HH?

Choose one

4. Differential geometry of curves and surfaces

CoreHuman

The helix γ(s)=(3cos⁡(s/5),3sin⁡(s/5),4s/5)\gamma(s) = (3\cos(s/5), 3\sin(s/5), 4s/5) has unit speed (check: 32+42=523^2 + 4^2 = 5^2), curvature κ=a/c2\kappa = a/c^2 and torsion τ=b/c2\tau = b/c^2 with a=3a = 3, b=4b = 4, c=5c = 5. Compute 1κ2+τ2\dfrac{1}{\kappa^2 + \tau^2}.

5. Differential geometry of curves and surfaces

CoreHuman

A triangle on a sphere of radius RR is bounded by three great-circle arcs and has angles 100∘100^\circ, 80∘80^\circ and 90∘90^\circ. By Girard's theorem its area is R2R^2 times its angle excess (in radians). What is the angle excess, in degrees?

6. Differential geometry of curves and surfaces

CoreHuman

A closed orientable surface of genus 33 (a pretzel with three holes) sits in R3\mathbb{R}^3. Its total curvature ∬K dA\iint K\, dA equals mπm\pi for which integer mm?

7. Differential geometry of curves and surfaces

CoreHuman

Why can a flat sheet of paper be rolled into a cylinder without stretching or tearing, but not wrapped smoothly around a ball?

Choose one

8. Differential geometry of curves and surfaces

CoreFormal

The Lean theorem sphere_gauss_curvature has the hypothesis hφ : cos φ ≠ 0. Why is it needed?

Choose one

9. Differential geometry of curves and surfaces

CoreComputational

Write signed_curvature(dx, dy, ddx, ddy) returning the signed curvature κ=(x′y′′−y′x′′)/(x′2+y′2)3/2\kappa = (x'y'' - y'x'')/(x'^2 + y'^2)^{3/2} of a plane curve at a point, given the values of x′,y′,x′′,y′′x', y', x'', y'' there. Then use it to find the curvature of the ellipse (3cos⁡t,sin⁡t)(3\cos t, \sin t) at t=0t = 0 and t=π/2t = \pi/2.

Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

10. Differential geometry of curves and surfaces

StretchHuman

Why must every torus in R3\mathbb{R}^3, however it is shaped, have points of negative Gaussian curvature?

Choose one
Common misconceptionsH

Common misconceptions

Misconception

"A cylinder is curved, so its Gaussian curvature is non-zero." The cylinder bends in one direction only: its principal curvatures are 1/r1/r and 00, and K=1/r⋅0=0K = 1/r \cdot 0 = 0. Intrinsically it is flat — unroll it and it is a rectangle, with all distances preserved. Its mean curvature H=±1/(2r)H = \pm 1/(2r) is non-zero, which is how it differs from a plane in space.

Misconception

"The curvature of a curve and the Gaussian curvature of a surface are the same kind of thing." The curvature κ\kappa of a curve measures how fast its tangent turns; it is extrinsic (a curve has no intrinsic geometry: every unit-speed curve looks like an interval from inside). The Gaussian curvature of a surface is a product of two principal curvatures and is intrinsic. A curve drawn on a flat sheet can have large curvature; the sheet still has K=0K = 0.

Misconception

"Mean curvature is intrinsic too." It is not. A plane and a cylinder are locally isometric (same E,F,GE, F, G), but H=0H = 0 for the plane and H≠0H \ne 0 for the cylinder. Only KK, the product of the principal curvatures, is intrinsic — that is what makes the Theorema Egregium remarkable.

Misconception

"Geodesics are straight lines." A geodesic is straight as seen from the surface: it has no sideways acceleration. In space it is usually curved — great circles on a sphere, helices on a cylinder. Shortest paths are geodesics, but a geodesic need not be the shortest path: going the long way round a great circle is a geodesic too.

Misconception

"Changing the shape of a surface changes its total curvature." Dents and bumps move curvature around, but by Gauss–Bonnet the total ∬K dA\iint K\, dA stays 2πχ2\pi\chi. Every sphere-shaped surface has total curvature 4π4\pi, and every torus has total curvature 00.

ViewpointsH

Many ways of seeing

Geometry— Intrinsic geometry and the road to Riemann

The Theorema Egregium says that a surface's geometry is determined by the first fundamental form, its rule for measuring lengths, with no reference to the surrounding space. Bernhard Riemann's habilitation lecture (1854) took the hint: a Riemannian manifold is a space of any dimension with an inner product on each tangent space, and curvature becomes the Riemann curvature tensor. In this language Eugenio Beltrami (1868) showed that the pseudosphere, with K=−1K = -1, carries the geometry of a piece of the hyperbolic plane. That made non-Euclidean geometry concrete; see non-Euclidean geometry. Hilbert (1901) proved that the whole hyperbolic plane cannot be realised as a smooth surface in R3\R^3 (strikingly, it can be as a C1C^1 surface, by the Nash–Kuiper theorem), so abstract surfaces are genuinely needed. See Riemannian geometry and smooth manifolds.

Topology— Curvature adds up to topology

Gauss–Bonnet says the total curvature is a topological invariant, 2πχ(S)2\pi\chi(S). Geometry cannot change it, and topology constrains geometry: a surface of genus g≥2g \ge 2 must have negative curvature somewhere, and only a sphere can have K>0K > 0 everywhere. A cousin is the Poincaré–Hopf theorem: the indices of the zeros of a vector field on SS add up to χ(S)\chi(S). So every vector field on the sphere vanishes somewhere ("you cannot comb a hairy ball"), while the torus has nowhere-vanishing fields. See the Euler characteristic. Shiing-Shen Chern's intrinsic proof (1944) of the Gauss–Bonnet theorem in all even dimensions opened the theory of characteristic classes.

Analysis— Curvature as second derivatives

Near a point, rotate the surface so that the tangent plane is horizontal. Then it is a graph z=f(x,y)z = f(x, y) with f(0)=0f(0) = 0 and ∇f(0)=0\nabla f(0) = 0. The second fundamental form is the Hessian of ff at 00: k1,k2k_1, k_2 are its eigenvalues, K=det⁡Hess⁡fK = \det \operatorname{Hess} f and H=12ΔfH = \frac12 \Delta f. Curvature is a second-derivative test made geometric. Minimal surfaces (H=0H = 0) are solutions of a nonlinear elliptic PDE, the minimal surface equation (1+fy2)fxx−2fxfyfxy+(1+fx2)fyy=0(1 + f_y^2) f_{xx} - 2 f_x f_y f_{xy} + (1 + f_x^2) f_{yy} = 0. They are the critical points of area, and Plateau's problem — to find a minimal surface spanning a given wire loop — was solved by Jesse Douglas and Tibor Radó around 1930. Douglas received one of the first Fields Medals for it in 1936.

Algebra— The shape operator is a symmetric matrix

All the curvatures of a surface at a point are invariants of one linear map, the shape operator SS. It is self-adjoint for the first fundamental form. By the spectral theorem of advanced linear algebra, it has real eigenvalues k1,k2k_1, k_2 (the principal curvatures) and orthogonal eigenvectors (the principal directions). K=det⁡SK = \det S and 2H=tr⁡S2H = \operatorname{tr} S are its characteristic-polynomial coefficients: λ2−2Hλ+K\lambda^2 - 2H\lambda + K. A point is umbilic when SS is a multiple of the identity (k1=k2k_1 = k_2); the only connected surfaces made entirely of umbilic points are pieces of planes and spheres.

Physics— Soap films, shells and spacetime

A soap film spanning a wire frame minimises its area, so it is a minimal surface, H=0H = 0. A soap bubble encloses air at higher pressure. By the Young–Laplace law the pressure difference across the film is proportional to its mean curvature, Δp=2σ∣H∣\Delta p = 2\sigma |H|, where σ\sigma is the tension of the film. So HH is constant, and by a theorem of Alexandrov (1950s) a closed embedded surface of constant mean curvature is a round sphere. Thin elastic shells — an eggshell, a pizza slice, a dome — resist bending much less than stretching. So they deform almost isometrically, and the Theorema Egregium makes curved shells stiff. Most dramatically, Einstein's general relativity (1915) describes gravity as the curvature of a four-dimensional spacetime. Gauss's intrinsic curvature, via Riemann, became the language of physical law; see relativity.

Computation— Discrete curvature

Computers represent surfaces as triangle meshes, which have no second derivatives. The discrete substitute for Gaussian curvature is the angle defect at a vertex: 2π2\pi minus the sum of the angles of the triangles meeting there. Descartes knew (around 1630) that the angle defects of a convex polyhedron add up to 4π4\pi. For a cube, each of the 88 corners has defect 2π−3⋅π2=π22\pi - 3 \cdot \frac{\pi}{2} = \frac{\pi}{2}, and 8⋅π2=4π8 \cdot \frac{\pi}{2} = 4\pi. That is the discrete Gauss–Bonnet theorem: the sum of the defects is 2π(V−E+F)2\pi(V - E + F) for any closed triangulated surface, by the same counting as in the proof of Theorem 6. Discrete differential geometry builds on this, for computer graphics, architecture (gridshells and curved glass roofs) and simulation.

History & global context

History and global context

  • Curves. Christiaan Huygens (Horologium Oscillatorium, 1673) studied evolutes and the curvature of curves for pendulum clocks; Isaac Newton and Gottfried Leibniz gave the curvature formula of calculus. Leonhard Euler (1760) introduced principal curvatures and Euler's formula, and Jean-Baptiste Meusnier (1776) related normal and curve curvatures. Jean Frenet (thesis 1847) and Joseph Serret (1851) found the frame equations.
  • Gauss. Carl Friedrich Gauss's Disquisitiones generales circa superficies curvas (1827) introduced the first fundamental form, defined curvature through the Gauss map, proved the Theorema Egregium and the formula for geodesic triangles. It grew out of his geodetic survey of the Kingdom of Hanover in the 1820s, in which he measured large triangles on the Earth's surface.
  • Global theory. Albert Girard stated his spherical-triangle theorem in 1629, and Descartes found the angle-defect theorem around 1630. Pierre Ossian Bonnet extended Gauss's formula to arbitrary regions (1848), and Walther von Dyck stated the global form with the Euler characteristic (1888).
  • Beyond surfaces. Bernhard Riemann (1854) created intrinsic geometry in all dimensions, and Eugenio Beltrami (1868) realised hyperbolic geometry on the pseudosphere. Shiing-Shen Chern, born in Jiaxing, China, gave an intrinsic proof of the higher-dimensional Gauss–Bonnet theorem (1944). He later founded mathematical institutes in Berkeley and in Tianjin.
Further reading

Further reading

  • Manfredo P. do Carmo, Differential Geometry of Curves and Surfaces (1976; 2nd edition 2016) — the standard text, with full proofs of the Theorema Egregium and Gauss–Bonnet.
  • Andrew Pressley, Elementary Differential Geometry (2nd edition, 2010) — gentle, with many worked examples.
  • Barrett O'Neill, Elementary Differential Geometry (revised 2nd edition, 2006) — uses moving frames and differential forms.
  • David Hilbert and Stephan Cohn-Vossen, Geometry and the Imagination (1932; English translation 1952) — curvature with pictures and insight.
  • Michael Spivak, A Comprehensive Introduction to Differential Geometry, volumes 2–3 (1970s) — including translations and analysis of Gauss's and Riemann's papers.