Skip to content
Tutorials Center
My learning

Topics

Lesson 33 of 44 · The Gauss-Bonnet Theorem

The global Gauss-Bonnet theorem and the Euler characteristic

Prove that total curvature of a closed surface equals 2π times its Euler characteristic, learn χ = V − E + F, and test it on ellipsoids, bumpy spheres and tori by code.

The local theorem handled a single patch. Now we cover a whole closed surface by patches and ask what remains when we add all the local statements. The answer is one of the most beautiful formulas in mathematics:

Global Gauss–Bonnet theorem. For a compact, oriented surface S without boundary,

∬_S K dA = 2π χ(S),

where χ(S) = V − E + F is the Euler characteristic, computed from any triangulation of S.

The left side is geometry: it uses the metric, depends on curvature, and would change if you changed lengths. The right side is topology: a whole number counting vertices, edges and faces that does not change when you stretch, squash or bend the surface. The theorem says the two are the same.

A cube with one corner highlighted and the flattened fan of three faces with a ninety-degree gap
On a polyhedron all curvature sits at the corners: the cube has eight corners with defect π/2, total 4π.

What you will learn

  • How to compute the Euler characteristic of a surface from a triangulation.
  • How the global theorem follows from the local one by adding over triangles.
  • How the polyhedral version (angle defects) is the same theorem.
  • What the theorem forbids and allows, and how to check it numerically.

Key terms

Triangulation: a division of the surface into triangles meeting only along whole edges or at vertices.

Euler characteristic χ: V − E + F, the same for every triangulation of a given surface.

Genus g: the number of holes of a closed orientable surface (sphere 0, torus 1); χ = 2 − 2g.

Angle defect: 2π minus the sum of the face angles at a vertex of a polyhedron.

Compact surface without boundary: a closed surface such as a sphere or torus, with no edge.

The Euler characteristic

Count the vertices V, edges E and faces F of any triangulation:

Surface V − E + F
Tetrahedron (sphere) 4 − 6 + 4 = 2
Cube (sphere) 8 − 12 + 6 = 2
Icosahedron (sphere) 12 − 30 + 20 = 2
Torus as a 3 × 3 grid of squares, each split into two triangles 9 − 27 + 18 = 0

Subdividing triangles never changes the answer (adding a vertex in an edge adds one V and one E, and splitting a face by an edge adds one E and one F), and a deeper theorem says that it is independent of the triangulation altogether. For a closed orientable surface with g holes, χ = 2 − 2g.

Proof of the global theorem

Triangulate S with small curvilinear triangles, each inside a coordinate patch. Apply the local theorem to each triangle Tᵢ with interior angles αᵢ, βᵢ, γᵢ; the boundary term for an edge with geodesic curvature κ_g appears twice, once from each of the two triangles sharing the edge, with opposite orientations, so these terms cancel when we add over all triangles. What survives for each triangle is

∬_{Tᵢ} K dA = 2π − Σ exterior angles = αᵢ + βᵢ + γᵢ − π − (boundary terms).

Summing over the F triangles, the corner angles add up to 2π at each of the V vertices, so the sum of all interior angles is 2πV:

∬_S K dA = 2πV − πF.

Every triangle has three edges and every edge belongs to two triangles, so 3F = 2E, i.e. F/2 = E − F. Therefore πF = 2π(E − F) and

∬_S K dA = 2π(V − E + F) = 2πχ(S).

The polyhedral version

On a polyhedron, K is zero on faces and edges (they unfold flat) and the curvature is concentrated at vertices as the angle defect. The claim becomes

Σ over vertices (2π − sum of face angles) = 2πχ.

This is Descartes' theorem on total angular defect, and the proof is a two-liner: Σ defects = 2πV − Σ over faces (nf − 2)π = 2πV − 2πE + 2πF, since a face with nf sides has angle sum (nf − 2)π and Σ nf = 2E. So Σ defects = 2π(V − E + F). The cube has 8 · π/2 = 4π, matching χ = 2.

What the theorem says about shapes

  • Sphere-like surfaces (χ = 2) have total curvature 4π, whatever bumps they carry.
  • Torus-like surfaces (χ = 0) have total curvature 0: the positive curvature of the outside is exactly cancelled by the negative curvature of the inside.
  • Higher genus surfaces (χ ≤ −2) have net negative curvature.
  • A surface with K > 0 everywhere must have χ > 0, so it is a sphere topologically. A closed surface in space can never have K ≤ 0 everywhere: look at the point farthest from the origin, where the surface sits inside a sphere and K > 0.
  • A torus has to have K > 0, K < 0 and K = 0 points, as we saw.
  • Abstractly, surfaces of genus ≥ 2 can carry a metric with K = −1 everywhere (hyperbolic surfaces); they cannot sit in ℝ³ that way.

A hint of more. The Poincaré–Hopf theorem says that the zeros of a tangent vector field on a closed surface have indices adding up to χ. On a sphere χ = 2 ≠ 0, so every tangent vector field has a zero: you cannot comb a hairy ball flat. The torus has χ = 0 and can be combed.

Common misconceptions

"Total curvature measures the size of the surface." It does not: the total is 4π for a golf ball and for the Earth. It counts the topology of the surface.

"Flat means K = 0 so the torus must be flat." The doughnut in space has K = 0 only on two circles. The abstract flat torus (a square with opposite edges glued) has K = 0 everywhere but cannot be placed in ℝ³ with its flat metric.

"Euler characteristic depends on how you triangulate." Not at all. It depends only on the surface.

Try it

First, verify that V − E + F does not depend on how finely you triangulate. We build subdivided icosahedra (projected to the sphere) and triangulated torus grids and compute both χ and the total angle defect of the sphere meshes.

Python Euler characteristic and angle defect on meshes

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

All sphere meshes give χ = 2 and total defect 4π; all torus meshes give χ = 0. Second, total curvature of smooth shapes: the integral ∬K dA = ∬ (eg − f²)/√(EG − F²) du dv computed numerically on an ellipsoid, a sphere with bumps, an ordinary torus and a torus whose tube thickness wobbles around the ring.

Python Total curvature of smooth surfaces

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The two sphere-like surfaces give 4π ≈ 12.566 (to about four digits, the accuracy of the midpoint rule on the grid), and the two torus-like ones give 0: the shape does not matter, only the number of holes.

Third, an interactive counter for how V, E and F grow while χ stays put.

Interactive: refine the mesh, χ stays the same

This page counts mesh elements with closed formulas (V = 10n² + 2, E = 30n², F = 20n² for an icosahedron with each edge split into n parts; m × k for the grid), it does not build the meshes.

Check your understanding

Quick check · 6 questions

of 6 answered You scored / 6 · perfect!

  1. 1. The global Gauss–Bonnet theorem for a closed oriented surface S says

    Total Gaussian curvature equals 2π times the Euler characteristic.
  2. 2. A triangulation of a surface has V = 8, E = 18, F = 12. Its Euler characteristic is

    8 − 18 + 12 = 2: a sphere-like surface (for example a triangulated cube).
  3. 3. Why do the edge terms cancel when the local theorem is summed over a triangulation?

    Two adjacent triangles traverse a shared edge in opposite directions, so ∫κ_g ds cancels.
  4. 4. Which closed surface can have K > 0 everywhere?

    K > 0 everywhere forces χ > 0, so χ = 2 and the surface is a topological sphere.
  5. 5. The total angle defect of a convex polyhedron is

    Descartes' theorem: the defects add to 2πχ = 4π.
  6. 6. A torus whose tube thickness varies around the ring still has total curvature

    Its topology is unchanged (χ = 0), so ∬K dA = 0.

Summary

  • Triangulate: χ = V − E + F; orientable closed surfaces have χ = 2 − 2g.
  • Sum the local theorem over triangles: the geodesic curvature of edges cancels and the angles give ∬K dA = 2πχ.
  • Polyhedra: the total angle defect is 2πχ; convex solids have 4π.
  • Total curvature is a topological invariant: 4π, 0, −4π, … for genus 0, 1, 2, ….
  • It restricts shapes: closed surfaces in space have points with K > 0, and K > 0 everywhere means a sphere.

Next: Chapter 7 review