MATH-430 · Lesson 11 of 12 · 25 min
The Gauss–Bonnet theorem
The Gauss–Bonnet theorem is the summit of the classical theory. It relates the total Gaussian curvature of a region to the geodesic curvature of its boundary and the angles at its corners, and for a closed surface it says that the total curvature equals \(2\pi\) times the Euler characteristic, a number defined by counting vertices, edges and faces. Curvature is local and depends on the metric; the Euler characteristic is global and topological. That one should determine the other is astonishing, and the consequences reach from triangle geometry to vector fields to the classification of surfaces. This lesson proves the local theorem completely and derives the global theorem from it.
Piecewise regular curves and turning angles
Let \(\alpha : [0, \ell] \to S\) be a simple closed curve that is regular except at finitely many corners \(\alpha(s_1), \dots, \alpha(s_k)\), where the one-sided tangent vectors exist but differ. At each corner the exterior angle \(\theta_i\), with \(-\pi < \theta_i < \pi\), is the signed angle from the incoming tangent to the outgoing tangent, positive when the curve turns toward its interior. The interior angle is \(\iota_i = \pi - \theta_i\). Suppose \(\alpha\) bounds a region \(\mathcal{R}\) homeomorphic to a disc, lying in the image of an orthogonal parametrization \(\mathbf{x}(u, v)\), and that \(\alpha\) is positively oriented, with \(\mathcal{R}\) on its left with respect to the orientation \(N\).
The theorem of turning tangents, the version of Hopf's theorem from lesson 4 for piecewise regular curves on a surface, says the following. Measure the angle \(\varphi(s)\) from the unit vector \(e_1 = \mathbf{x}_u/\sqrt{E}\) to the tangent \(\alpha'(s)\), chosen continuously on each smooth arc. Then the total change of \(\varphi\) along the arcs plus the exterior angles is one full turn:
One proof deforms the metric \(E\,du^2 + G\,dv^2\) continuously to the flat metric \(du^2 + dv^2\) through the family \(\big((1 - t)E + t\big)du^2 + \big((1 - t)G + t\big)dv^2\). The left side depends continuously on \(t\), is always a multiple of \(2\pi\) because the curve closes up, and at \(t = 1\) equals \(2\pi\) by Hopf's theorem for the plane curve \((u(s), v(s))\), extended to curves with corners by rounding them off. A continuous function with values in \(2\pi\mathbb{Z}\) is constant. We use this result without further proof.
Liouville's formula for geodesic curvature
Lemma. In an orthogonal parametrization, the geodesic curvature of a unit-speed curve \(\alpha(s) = \mathbf{x}(u(s), v(s))\) is
Proof. Let \(e_1 = \mathbf{x}_u/\sqrt{E}\) and \(e_2 = \mathbf{x}_v/\sqrt{G}\), an orthonormal frame with \(N \times e_1 = e_2\). Write \(\alpha' = \cos\varphi\,e_1 + \sin\varphi\,e_2\), so that \(N \times \alpha' = -\sin\varphi\,e_1 + \cos\varphi\,e_2\). Differentiating covariantly,
Because \(e_1, e_2\) are orthonormal, \(\langle De_1/ds, e_1 \rangle = 0\), \(\langle De_2/ds, e_2 \rangle = 0\) and \(\langle De_2/ds, e_1 \rangle = -\langle De_1/ds, e_2 \rangle\). Taking the inner product with \(N \times \alpha'\) gives \(\kappa_g = \varphi' + \langle De_1/ds, e_2 \rangle\). Finally, by the chain rule and the table of lesson 9 with \(F = 0\),
where the derivative of the factor \(1/\sqrt{E}\) contributes only multiples of \(\mathbf{x}_u\), which are orthogonal to \(e_2\). \(\blacksquare\)
Liouville's formula splits the turning of a curve into the turning relative to the coordinate frame and the turning of the frame itself. On the plane in Cartesian coordinates the frame does not turn and \(\kappa_g = \varphi'\), the signed curvature of lesson 3.
The local Gauss–Bonnet theorem
Theorem. Let \(\mathcal{R}\) be a region as above, bounded by a positively oriented, simple closed, piecewise regular curve with exterior angles \(\theta_1, \dots, \theta_k\). Then
Proof. Integrate Liouville's formula along the smooth arcs and add the exterior angles. By the theorem of turning tangents,
where \(Q = \mathbf{x}^{-1}(\mathcal{R})\) and the line integral is over the boundary of \(Q\) in the \(uv\)-plane, positively oriented. Green's theorem turns the line integral into
using the orthogonal-coordinate formula for \(K\) from lesson 9. Substituting gives the theorem. \(\blacksquare\)
Special cases are illuminating. For a region of the plane, \(K = 0\) and the theorem is the turning tangents theorem itself; for a polygon with straight sides, the exterior angles sum to \(2\pi\). For a geodesic triangle, \(\kappa_g = 0\) on the sides, and with interior angles \(\iota_i = \pi - \theta_i\) the theorem becomes
The angle excess of a geodesic triangle is its total curvature. On a sphere of radius \(R\) this is the Harriot–Girard theorem of lesson 1, since \(K = 1/R^2\). On a surface with \(K < 0\) the angles of a geodesic triangle sum to less than \(\pi\), and on a surface with \(K = 0\) to exactly \(\pi\). Gauss stated this case in 1827. For a polar cap bounded by the circle of latitude \(\varphi_0\) on the unit sphere, \(\kappa_g = \tan\varphi_0\) over a length \(2\pi\cos\varphi_0\), no corners, and area \(2\pi(1 - \sin\varphi_0)\): indeed \(2\pi\sin\varphi_0 + 2\pi(1 - \sin\varphi_0) = 2\pi\).
Holonomy is the same theorem in another guise. Parallel transport around the boundary of \(\mathcal{R}\) rotates vectors relative to the tangent of the curve by \(-\int\kappa_g\,ds\) along the smooth arcs and by the corners' angles, and comparing with one full turn of the tangent shows that the net rotation of a transported vector equals \(\iint_{\mathcal{R}} K\,dA\), modulo \(2\pi\). Curvature is the holonomy per unit area, which is how lesson 12 will define curvature in higher dimensions.
Triangulations and the Euler characteristic
A triangulation of a compact surface \(S\) is a decomposition into finitely many curved triangles, images of plane triangles under homeomorphisms, such that any two triangles are disjoint, share exactly one vertex or share exactly one edge. Every compact regular surface has triangulations, which can be chosen fine enough that each triangle lies in an orthogonal coordinate patch; we take this from topology. If a triangulation has \(V\) vertices, \(E\) edges and \(F\) faces, the Euler characteristic is
It does not depend on the triangulation. Euler observed in 1758 that \(V - E + F = 2\) for convex polyhedra, and the topological invariance on surfaces was established in the nineteenth century: refining a triangulation by adding a vertex inside a face adds one vertex, three edges and two faces, leaving \(\chi\) unchanged, and any two triangulations have a common refinement. A sphere has \(\chi = 2\) (the tetrahedron has \(4 - 6 + 4 = 2\), the icosahedron \(12 - 30 + 20 = 2\)), a torus \(\chi = 0\), and a compact orientable surface with \(g\) holes \(\chi = 2 - 2g\). The global Gauss–Bonnet theorem also gives an independent proof of the invariance, since its left side does not mention triangulations.
The global Gauss–Bonnet theorem
Theorem. Let \(S\) be a compact orientable regular surface. Then
Proof. Choose a triangulation in which every triangle \(T_j\) lies in an orthogonal patch compatible with the orientation, and orient each triangle's boundary positively. Apply the local theorem to each triangle and add the \(F\) equations. On the left, the geodesic curvature integrals cancel in pairs: each edge belongs to exactly two triangles, which traverse it in opposite directions, and reversing direction changes the sign of \(\kappa_g\). The curvature integrals add to \(\iint_S K\,dA\). Writing exterior angles as \(\theta_{jl} = \pi - \iota_{jl}\), the angle terms add to \(3\pi F - \sum_{j, l}\iota_{jl}\), and the interior angles at each vertex add to \(2\pi\), so \(\sum \iota_{jl} = 2\pi V\). Therefore
Each face has three edges and each edge lies on two faces, so \(3F = 2E\) and \(\pi F = 2\pi E - 2\pi F\). Hence \(\iint_S K\,dA = 2\pi(V - E + F) = 2\pi\chi(S)\). \(\blacksquare\)
Consequences
Total curvature is topological. However a sphere is dented or stretched, its total curvature is \(4\pi\); however a torus is deformed, its total curvature is 0. For the round torus this can be checked directly: \(K\,dA = \frac{\cos v}{r(R + r\cos v)}\cdot r(R + r\cos v)\,du\,dv = \cos v\,du\,dv\), which integrates to 0. A compact surface with \(K > 0\) everywhere has \(\chi > 0\), so by the classification of surfaces it is topologically a sphere. A compact surface of genus \(g \ge 2\) must have negative total curvature, so it has points with \(K < 0\).
Geodesics on negatively curved surfaces. If \(K \le 0\) on a surface, two geodesics from the same point cannot meet again so as to bound a region homeomorphic to a disc. Such a geodesic digon would have two corners with exterior angles less than \(\pi\) each, so \(\theta_1 + \theta_2 < 2\pi\), while the theorem gives \(\theta_1 + \theta_2 = 2\pi - \iint K\,dA \ge 2\pi\), a contradiction. Likewise a simple closed geodesic cannot bound a disc on such a surface, since it would need \(\iint K\,dA = 2\pi\).
Vector fields. Henri Poincaré in 1885 and Heinz Hopf in 1926 proved that for any smooth tangent vector field with isolated zeros on a compact orientable surface, the sum of the indices of the zeros (the number of turns the field makes around a small circle about each zero) equals \(\chi(S)\). Combined with Gauss–Bonnet, the total curvature counts zeros of vector fields. Since \(\chi(S^2) = 2 \ne 0\), every tangent vector field on a sphere vanishes somewhere: you cannot comb a hairy ball flat, and at any moment there is a point on the Earth where the horizontal wind speed is zero.
The theorem has descendants throughout mathematics. Shiing-Shen Chern gave an intrinsic proof in 1944 that extended it to even-dimensional manifolds of any dimension, the Chern–Gauss–Bonnet theorem, and the Atiyah–Singer index theorem of 1963 generalizes it further. In physics, integrals of curvature that must be integers, like \(\frac{1}{2\pi}\iint K\,dA\), reappear as topological quantum numbers.
Checking Gauss–Bonnet numerically
The program integrates \(K\,dA\) numerically over several closed surfaces: a torus, an ellipsoid, and a bumpy sphere whose radius in direction \((\varphi, \theta)\) is \(1 + 0.2\cos 3\theta\cos^2\varphi\sin\varphi\), with curvature of both signs. For each it reports the total divided by \(2\pi\), which should be the Euler characteristic. It also verifies the local theorem for latitude caps and computes \(V - E + F\) for triangulations of a sphere and a torus.
import math
def dot(a, b): return sum(x*y for x, y in zip(a, b))
def cross(a, b): return [a[1]*b[2] - a[2]*b[1], a[2]*b[0] - a[0]*b[2], a[0]*b[1] - a[1]*b[0]]
def K_dA(X, u, v, h=1e-4):
P = lambda i, j: X(u + i*h, v + j*h)
xu = [(a - b)/(2*h) for a, b in zip(P(1, 0), P(-1, 0))]
xv = [(a - b)/(2*h) for a, b in zip(P(0, 1), P(0, -1))]
xuu = [(a - 2*m + b)/h**2 for a, m, b in zip(P(1, 0), P(0, 0), P(-1, 0))]
xvv = [(a - 2*m + b)/h**2 for a, m, b in zip(P(0, 1), P(0, 0), P(0, -1))]
xuv = [(a - b - c + d)/(4*h*h) for a, b, c, d in zip(P(1, 1), P(1, -1), P(-1, 1), P(-1, -1))]
n = cross(xu, xv); W = math.sqrt(dot(n, n)); N = [x/W for x in n]
e, f, g = dot(N, xuu), dot(N, xuv), dot(N, xvv)
return (e*g - f*f) / W # K * sqrt(EG - F^2), since K = (eg - f^2)/W^2
def total(X, urange, vrange, n=160):
(u0, u1), (v0, v1) = urange, vrange
du, dv = (u1 - u0)/n, (v1 - v0)/n
return sum(K_dA(X, u0 + (i + 0.5)*du, v0 + (j + 0.5)*dv) for i in range(n) for j in range(n)) * du * dv
R, r = 2.0, 0.7
torus = lambda u, v: [(R + r*math.cos(v))*math.cos(u), (R + r*math.cos(v))*math.sin(u), r*math.sin(v)]
ell = lambda th, ph: [3*math.cos(ph)*math.cos(th), 2*math.cos(ph)*math.sin(th), math.sin(ph)]
def bumpy(th, ph):
rho = 1 + 0.2*math.cos(3*th)*math.cos(ph)**2*math.sin(ph)
return [rho*math.cos(ph)*math.cos(th), rho*math.cos(ph)*math.sin(th), rho*math.sin(ph)]
half = math.pi/2
print(f"torus: total K dA / 2 pi = {total(torus, (0, 2*math.pi), (0, 2*math.pi)) / (2*math.pi):+.6f}")
print(f"ellipsoid: total K dA / 2 pi = {total(ell, (0, 2*math.pi), (-half, half)) / (2*math.pi):+.6f}")
print(f"bumpy sphere: total K dA / 2 pi = {total(bumpy, (0, 2*math.pi), (-half, half)) / (2*math.pi):+.6f}")
# where is the bumpy sphere negatively curved?
neg = sum(1 for i in range(60) for j in range(1, 60) if K_dA(bumpy, 2*math.pi*i/60, -half + math.pi*j/60) < 0)
print(f"bumpy sphere: {neg} of {60*59} sample points have K < 0")
# local Gauss-Bonnet for latitude caps of the unit sphere
for deg in (0, 30, 60, 85):
p = math.radians(deg)
kg_int = math.tan(p) * 2*math.pi*math.cos(p); KA = 2*math.pi*(1 - math.sin(p))
print(f"cap above latitude {deg:2d}: int k_g ds = {kg_int:.6f}, int K dA = {KA:.6f}, sum / 2 pi = {(kg_int + KA)/(2*math.pi):.6f}")
# Euler characteristic from triangulations
def octahedron_refined(k):
"""Subdivide each octahedron face into k^2 triangles; count V, E, F."""
F = 8*k*k; E = 3*F//2
verts = set()
for sx in (1, -1):
for sy in (1, -1):
for sz in (1, -1):
for i in range(k + 1):
for j in range(k + 1 - i):
a, b, c = i, j, k - i - j
verts.add((sx*a if a else 0, sy*b if b else 0, sz*c if c else 0))
return len(verts), E, F
for k in (1, 2, 5):
V, E, F = octahedron_refined(k)
print(f"sphere (octahedron subdivided {k}x): V={V} E={E} F={F} V-E+F={V - E + F}")
m, n = 6, 4 # torus grid of m x n squares, each cut into 2 triangles
V, E, F = m*n, 3*m*n, 2*m*n
print(f"torus ({m}x{n} grid): V={V} E={E} F={F} V-E+F={V - E + F}")torus: total K dA / 2 pi = +0.000000 ellipsoid: total K dA / 2 pi = +2.000005 bumpy sphere: total K dA / 2 pi = +2.000017 bumpy sphere: 528 of 3540 sample points have K < 0 cap above latitude 0: int k_g ds = 0.000000, int K dA = 6.283185, sum / 2 pi = 1.000000 cap above latitude 30: int k_g ds = 3.141593, int K dA = 3.141593, sum / 2 pi = 1.000000 cap above latitude 60: int k_g ds = 5.441398, int K dA = 0.841787, sum / 2 pi = 1.000000 cap above latitude 85: int k_g ds = 6.259276, int K dA = 0.023909, sum / 2 pi = 1.000000 sphere (octahedron subdivided 1x): V=6 E=12 F=8 V-E+F=2 sphere (octahedron subdivided 2x): V=18 E=48 F=32 V-E+F=2 sphere (octahedron subdivided 5x): V=102 E=300 F=200 V-E+F=2 torus (6x4 grid): V=24 E=72 F=48 V-E+F=0
The torus gives 0, and the ellipsoid and the bumpy sphere both give 2, to within about \(10^{-5}\), the error of a 160 by 160 midpoint grid with curvature computed by finite differences. About one sample point in seven on the bumpy sphere has negative curvature, so the total of \(4\pi\) is not a simple sum of positive contributions: the saddle regions between the bumps are paid for by extra positive curvature on the bumps themselves. For the latitude caps, the geodesic curvature of the boundary and the area of the cap trade off exactly, from the equator, a geodesic bounding a hemisphere of total curvature \(2\pi\), to a tiny cap near the pole whose boundary circle does almost all the turning. The triangulation counts give \(V - E + F = 2\) for every subdivision of the octahedron and 0 for the torus grid.
Common mistakes
MistakeForgetting the exterior angle terms at corners.
InsteadFor a geodesic polygon all the information is in the angles; dropping them gives nonsense such as \(\iint K\,dA = 2\pi\) for a small triangle.
MistakeUsing interior angles where exterior angles belong.
InsteadThe theorem uses exterior angles \(\theta_i = \pi - \iota_i\); in terms of interior angles a geodesic triangle has \(\sum\iota_i - \pi = \iint K\,dA\).
MistakeThinking total curvature depends on the shape of a closed surface.
InsteadIt equals \(2\pi\chi\), a topological invariant; dents and bulges cancel.
MistakeApplying the local theorem to a region that is not a disc.
InsteadAn annulus has two boundary curves and \(\chi = 0\); the general version replaces \(2\pi\) by \(2\pi\chi(\mathcal{R})\).
MistakeOrienting the boundary clockwise.
InsteadWith the region on the right, the geodesic curvature and the exterior angles change sign and the formula fails.
Summary and key terms
- Liouville's formula: in orthogonal coordinates \(\kappa_g = \varphi' + (G_uv' - E_vu')/(2\sqrt{EG})\).
- Local Gauss–Bonnet: \(\sum\int\kappa_g\,ds + \iint_{\mathcal{R}} K\,dA + \sum\theta_i = 2\pi\) for a disc-like region, proved by Green's theorem and the theorem of turning tangents.
- For geodesic triangles, the angle excess equals the total curvature; for \(K < 0\) angle sums are less than \(\pi\).
- The Euler characteristic \(V - E + F\) of a triangulation is a topological invariant: 2 for the sphere, 0 for the torus, \(2 - 2g\) in general.
- Global Gauss–Bonnet: \(\iint_S K\,dA = 2\pi\chi(S)\) for every compact orientable surface.
- Consequences include the hairy ball theorem, the absence of geodesic digons when \(K \le 0\), and the topological meaning of total curvature.
- exterior angle
- The signed angle through which a piecewise smooth curve turns at a corner.
- geodesic triangle
- A triangle on a surface whose sides are geodesic arcs.
- triangulation
- A decomposition of a surface into curved triangles meeting along whole edges or vertices.
- Euler characteristic
- The number of vertices minus edges plus faces of any triangulation.
- genus
- The number of holes of a compact orientable surface.
- total curvature
- The integral of the Gaussian curvature over a surface.
Practice problems
Work each problem on paper first, then reveal the answer to check.
A geodesic triangle on a surface with \(K = -1\) has angles \(30^\circ\), \(45^\circ\) and \(60^\circ\). Find its area.
Show answer
\(\iint K\,dA = -A = \iota_1 + \iota_2 + \iota_3 - \pi = -\frac{\pi}{4}\), so \(A = \pi/4\).
Show that a geodesic triangle on a surface with \(K = -1\) has area less than \(\pi\).
Show answer
\(A = \pi - (\iota_1 + \iota_2 + \iota_3) < \pi\), approached by ideal triangles with all angles tending to zero.
Compute the total curvature of a surface of genus 3.
Show answer
\(\chi = 2 - 6 = -4\), so \(\iint K\,dA = -8\pi\).
Verify the global theorem for the round torus directly.
Show answer
\(K\,dA = \cos v\,du\,dv\), and \(\int_0^{2\pi}\int_0^{2\pi}\cos v\,du\,dv = 0 = 2\pi\chi\).
Show that on a compact surface with \(K > 0\) any two simple closed geodesics intersect, assuming each one separates the surface into two discs.
Show answer
If they were disjoint, the region between them would be an annulus with \(\chi = 0\), geodesic boundary and no corners, so \(\iint K\,dA = 0\), impossible when \(K > 0\).
An ellipsoid is dented inward at one point so that a region of negative curvature appears. What is its total curvature now?
Show answer
Still \(4\pi\): the region of negative curvature is compensated by increased positive curvature around it.
Lesson quiz · 5 questions
Score 60% or more to complete this lesson.
Create a free account to save your progress, take quizzes and earn a certificate.