The idea: count dots, lines and regions
Draw a connected graph on paper so that no two edges cross. Count the vertices V, the edges E and the faces F, the regions the edges cut the paper into. The region outside the drawing is a face too: the outer face. Then V − E + F = 2, whatever you drew. The house on the page has 5 vertices, 7 edges and 4 faces: 5 − 7 + 4 = 2.
Two moves, one invariant
Build the drawing one edge at a time, always touching what is already there. Start with a single dot: V = 1, E = 0 and the whole plane is one face, so 1 − 0 + 1 = 2. Each new edge then either
- reaches a new vertex: V + 1 and E + 1, F stays the same, or
- joins two vertices already drawn: it splits one region in two, so E + 1 and F + 1.
In both cases a +1 and a −1 cancel, so the sum stays 2 to the end. That is the whole proof. A tree uses only the first move: E = V − 1 and F = 1. Every extra edge closes exactly one face. (Demo: build a house, one edge at a time)
Why the outer face counts
Without the outer face a single dot would give 1 − 0 + 0 = 1, and a triangle 3 − 3 + 1 = 1: still constant, just a different number. Counting the outside makes the plane behave like a sphere. On a ball there is no "outside": the outer face is just one more region.
From a solid to a flat drawing
A convex polyhedron has vertices, edges and faces too. Put your eye just above one face and look through it: the other faces appear inside it, and nothing crosses. This flat picture is a Schlegel diagram. The face you looked through becomes the outer face, so the counts are the same and V − E + F = 2 holds for every convex solid. (Demo: cube flattened)
| solid | faces | at each corner | V | E | F | V − E + F |
|---|---|---|---|---|---|---|
| tetrahedron | triangles | 3 | 4 | 6 | 4 | 2 |
| cube | squares | 3 | 8 | 12 | 6 | 2 |
| octahedron | triangles | 4 | 6 | 12 | 8 | 2 |
| dodecahedron | pentagons | 3 | 20 | 30 | 12 | 2 |
| icosahedron | triangles | 5 | 12 | 30 | 20 | 2 |
The cube and the octahedron swap V and F, and so do the dodecahedron and the icosahedron: put a dot in the middle of each face and join dots of neighbouring faces, and you get the dual solid.
Why only five regular solids
A regular solid has the same regular p-gon on every face and q faces at every corner. Each edge lies on two faces and has two ends, so pF = 2E and qV = 2E. Put V = 2E/q and F = 2E/p into Euler's formula and divide by 2E:
With p, q ≥ 3 only five pairs work: (3, 3), (3, 4), (4, 3), (3, 5) and (5, 3). The angles tell the same story: the q corners meeting at a vertex must add to less than 360°, or they lie flat. (Demo: why only five regular solids)
| p, q | corner angle sum | 1/p + 1/q | result |
|---|---|---|---|
| 3, 3 | 180° | 0.667 | tetrahedron, E = 6 |
| 3, 4 | 240° | 0.583 | octahedron, E = 12 |
| 4, 3 | 270° | 0.583 | cube, E = 12 |
| 3, 5 | 300° | 0.533 | icosahedron, E = 30 |
| 5, 3 | 324° | 0.533 | dodecahedron, E = 30 |
| 3, 6 · 4, 4 · 6, 3 | 360° | 0.5 | flat tilings (triangles, squares, hexagons) |
| anything else | over 360° | below 0.5 | impossible |
How many edges fit: K5 and K3,3
In a planar graph with at least 3 vertices every face has at least 3 sides, and each edge borders two faces, so 3F ≤ 2E. Put that into Euler's formula and you get E ≤ 3V − 6. The complete graph K5 has V = 5 and E = 10, but 3 · 5 − 6 = 9. On the page, 9 of its edges fit (every face then is a triangle), and the 10th must cross. (Demo: K5 can't be drawn flat)
K3,3 (three houses, each joined to gas, water and electricity) has no triangles, because houses only join utilities. So every face has at least 4 sides, 4F ≤ 2E, and E ≤ 2V − 4 = 8. It has 9 edges. (Demo: three houses, three utilities (K3,3))
Kuratowski's theorem says these two are the only obstacles: a graph is planar exactly when it doesn't contain a subdivided K5 or K3,3. Another consequence of E ≤ 3V − 6: the average degree is below 6, so every planar graph has a vertex with at most 5 neighbours. That is the first step in proving that maps can be coloured with few colours; see Graph Coloring.
Several pieces
If the drawing falls into C separate pieces, a lone new dot adds V + 1 and nothing else. So the sum is V − E + F = 1 + C. Two separate triangles give 6 − 6 + 3 = 3. Joining the pieces with one edge (E + 1, F unchanged) brings it back to 2. Counting pieces is what Connected Components does. (Demo: two separate pieces)
See also Euler Path and Circuit (another theorem by Euler about graphs: degrees and walks that use every edge once), Kruskal's spanning tree (a spanning tree has E = V − 1) and Proofs Without Words.
What the page leaves out
On a torus (a doughnut) the sum is 0, not 2: a 3 × 3 grid wrapped around it has 9 vertices, 18 edges and 9 faces, 9 − 18 + 9 = 0. A surface with g holes gives 2 − 2g, the Euler characteristic, and a picture-frame polyhedron with a hole also gives 0. The page leaves out non-convex solids, Descartes' theorem that the angle defects of a convex solid add to 720°, the proof of Kuratowski's theorem, linear-time planarity tests (Hopcroft–Tarjan), the Archimedean solids, and higher dimensions, where 4D polytopes have V − E + F − C = 0 (C = 3D cells). Every planar graph can also be drawn with straight edges only (Fáry's theorem); the curved edge in the K3,3 scene is just a choice.