Get AI summaries of any video or article — Sign up free
Euler's Formula and Graph Duality thumbnail

Euler's Formula and Graph Duality

3Blue1Brown·
5 min read

Based on 3Blue1Brown's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.

TL;DR

For a connected planar graph, Euler’s formula uses V vertices, E edges, and F faces (including the outer region): V − E + F = 2.

Briefing

Euler’s formula for planar graphs—V − E + F = 2—can be derived from a clean duality argument built on spanning trees. The key move is to translate the planar drawing into two interlocking graphs: one whose vertices are the original graph’s vertices and another whose vertices are the faces carved out by the drawing. Once that dual graph is in place, spanning trees in the original graph force spanning trees in the dual, and a simple counting fact about trees turns into Euler’s constant “2.”

Start with a connected planar graph drawn without edge crossings. Label its vertices V, edges E, and faces F (including the unbounded outer region). The proof then introduces three concepts: cycles, spanning trees, and dual graphs. A cycle is a closed path that starts and ends at the same vertex. A spanning tree is a cycle-free connected subgraph that touches every vertex. The dual graph is formed by placing a vertex inside each face and connecting two dual vertices whenever their corresponding faces share an edge in the original drawing; the “edges” of the dual are literally the same geometric edges, just used to separate faces rather than connect vertices.

The duality payoff comes from a specific setup with two characters: Randolph moves along the original graph’s vertices, while Mortimer moves across the dual graph’s faces. Randolph buys a spanning tree, meaning he has a connected, cycle-free set of edges. Mortimer is forbidden from crossing those same edges, so he can traverse only the remaining edges. The crucial claim is that Mortimer’s available edges automatically form a spanning tree in the dual graph. Two checks make this work: (1) Mortimer can reach all dual vertices (all faces), because isolating a face would require a cycle in Randolph’s spanning tree, which trees cannot have; and (2) Mortimer’s traversable edges contain no cycles, because a dual cycle would split the original vertices into separated regions, preventing Randolph’s spanning tree from spanning everything.

With that correspondence established, counting becomes straightforward. Any tree with n edges has exactly n + 1 vertices: start from a root vertex, and each added edge brings in one new vertex without creating cycles. Randolph’s spanning tree has V vertices and V − 1 edges. The remaining edges form Mortimer’s spanning tree in the dual, whose vertices are the original faces F; therefore Mortimer’s tree has F vertices and F − 1 edges. Add the two edge counts: E = (V − 1) + (F − 1) = V + F − 2. Rearranging yields V − E + F = 2, which is Euler’s formula. The result is less a standalone counting trick than a consequence of how spanning trees and cycles mirror each other across the original graph and its dual.

Cornell Notes

For a connected planar graph with V vertices, E edges, and F faces, Euler’s formula V − E + F = 2 follows from duality plus a tree-counting fact. Build the dual graph by placing a vertex in each face and connecting dual vertices across each original edge. Choose any spanning tree in the original graph; the edges not in that tree form a spanning tree in the dual graph. Because every tree with k edges has k + 1 vertices, the original spanning tree has V − 1 edges, while the dual spanning tree has F − 1 edges. Adding them gives E = (V − 1) + (F − 1), which rearranges to V − E + F = 2.

How is the dual graph constructed from a planar drawing, and why do dual edges correspond to the same original edges?

Each face of the planar drawing becomes a vertex in the dual graph. Two dual vertices are connected by a dual edge exactly when their corresponding faces share an edge in the original graph. The dual’s edges are therefore not new geometric objects; they are the original edges reinterpreted as boundaries between faces. This is why the dual graph can be drawn by placing dots in faces and drawing connections that pass through the centers of the original edges.

What does it mean for a subgraph to be a spanning tree, and why does “no cycles” matter?

A spanning tree is connected and touches every vertex, but it contains no cycles. The “no cycles” condition is what prevents redundancy: if an edge completed a cycle, it would be unnecessary for reaching new vertices. In the proof, cycle-freeness is what guarantees that forbidding Mortimer from crossing Randolph’s spanning-tree edges does not trap him away from any face.

Why do cycles in the original graph correspond to connected components in the dual (and vice versa)?

The proof relies on a symmetry: cycles act like barriers that separate regions. In the original graph, a cycle encloses faces; in the dual graph, that enclosure shows up as a separation that affects connectivity. The transcript states the correspondence directly: cycles in the original correspond to connected components in the dual, and cycles in the dual correspond to connected components in the original. This relationship underpins the spanning-tree argument.

Why do the edges available to Mortimer (those not in Randolph’s spanning tree) form a spanning tree in the dual graph?

Two properties must hold. First, Mortimer must be able to reach all dual vertices (all faces). If some face were inaccessible, that would require a cycle in Randolph’s spanning tree to “insulate” the region—impossible because trees have no cycles. Second, Mortimer’s available edges must contain no cycles. If Mortimer could traverse a dual cycle, that cycle would separate the original vertices into two groups, meaning Randolph’s spanning tree could not have spanned the whole original graph.

How does the tree identity “vertices = edges + 1” drive the Euler formula?

A tree with k edges has k + 1 vertices. Randolph’s spanning tree in the original graph has V vertices, so it has V − 1 edges. The remaining edges form Mortimer’s spanning tree in the dual graph, whose vertices are the original faces F, so Mortimer’s tree has F − 1 edges. Therefore E = (V − 1) + (F − 1) = V + F − 2, which rearranges to V − E + F = 2.

Review Questions

  1. Given a connected planar graph with V vertices and F faces, how many edges must a spanning tree contain, and how does that relate to the dual spanning tree?
  2. In the duality argument, what specific failure mode would create a cycle in Mortimer’s available edges, and why would that contradict Randolph’s spanning property?
  3. How does the assumption of planarity (no edge crossings) ensure the dual graph is well-defined in terms of faces and shared edges?

Key Points

  1. 1

    For a connected planar graph, Euler’s formula uses V vertices, E edges, and F faces (including the outer region): V − E + F = 2.

  2. 2

    The dual graph is built by turning each face into a dual vertex and connecting dual vertices across each shared original edge.

  3. 3

    Edges of the dual graph correspond to the same geometric edges as the original graph; they are interpreted as boundaries between faces.

  4. 4

    Choosing any spanning tree in the original graph forces the remaining edges to form a spanning tree in the dual graph.

  5. 5

    Mortimer’s spanning-tree property follows from cycle-freeness: cycles would be required to isolate faces or to prevent the original spanning tree from covering all vertices.

  6. 6

    Every tree with k edges has exactly k + 1 vertices, enabling a direct edge count: E = (V − 1) + (F − 1).

  7. 7

    Rearranging the resulting count yields Euler’s constant term: V − E + F = 2.

Highlights

Dual graphs turn faces into vertices, and the same original edges become dual edges separating those faces.
A spanning tree in the original graph and a spanning tree in the dual graph are linked: forbid one spanning tree’s edges and the rest automatically span the dual.
The entire Euler formula drops out of one fact about trees: vertices = edges + 1.
Cycles act like separators; preventing cycles is what keeps connectivity intact across the original and dual graphs.

Topics

  • Euler's Formula
  • Planar Graphs
  • Graph Duality
  • Spanning Trees
  • Dual Graph Construction