Tutorials › Graph Theory (Undergraduate) › Euler’s Formula for Connected Plane Graphs

Planar Graphs and Euler's Formula · Tutorial 425 of 799

Euler's Formula for Connected Plane Graphs

Learn why a spanning tree provides the starting point for counting faces and how each added edge yields Euler’s formula.

Intermediate 10 min read

What You'll Learn

  • Define the order, size, faces and spanning trees of a connected plane graph.
  • Prove that a finite connected graph has a spanning tree with one fewer edge than vertices.
  • Track the face count while adding omitted edges back to a plane spanning tree.
  • Apply the argument to trees, cycles and a plane embedding of the complete graph on four vertices.
  • Recognize common errors in applying Euler’s formula.

From a Spanning Tree to a Face Count

A plane graph is a graph together with a fixed drawing in the plane in which edges meet only at common endpoints. Its faces are the connected regions of the plane left after removing the drawing; the unbounded region counts as a face. Write \(V=V(G)\) for the vertex set, \(E=E(G)\) for the edge set, \(n=|V|\) for the order, \(m=|E|\) for the size, and \(F\) for the number of faces. Throughout, graphs are finite and simple, and a connected graph is assumed to have at least one vertex.

The central idea is to begin with a spanning tree of the graph. A spanning tree uses all the vertices but has no cycles. When the other edges are restored in their original positions, each one splits a face in two. Thus the face count can be found by counting how many edges were restored.

Definition: A spanning tree of a graph \(G\) is a subgraph that contains every vertex of \(G\) and is both connected and acyclic. A plane graph is a graph with a fixed crossing-free drawing. Its face count \(F\) refers to that drawing, not merely to the abstract graph.

Two facts about the starting tree and the edge-restoration process are useful. A finite connected graph has a spanning tree with \(n-1\) edges. Also, the earlier result on trees in plane embeddings says that a plane tree has exactly one face. Finally, the earlier result on how edge insertion changes face counts says that, when an edge is added inside a face between vertices already connected in the current plane graph, that face is split into two. The number of faces therefore increases by exactly one. We will apply this last fact only to edges in the original plane embedding, so the inserted edge has no crossings with the current drawing.

Why a Spanning Tree Has \(n-1\) Edges

We first justify the edge count that will determine how many edges must be restored.

Lemma: Every finite connected graph has a spanning tree. Every tree on \(n\geq 1\) vertices has exactly \(n-1\) edges.

Proof. Since \(G\) is finite, among its connected spanning subgraphs choose one, \(T\), with as few edges as possible. If \(T\) contained a cycle, removing one edge of that cycle would leave its endpoints connected by the rest of the cycle. Every route in \(T\) that used the removed edge could use that alternative route instead, so the resulting spanning subgraph would still be connected. This contradicts the minimal choice of \(T\). Thus \(T\) is connected and acyclic, hence a spanning tree.

We prove the edge count for trees by induction on the number \(n\) of vertices. For \(n=1\), a tree has no edges, so it has \(0=1-1\) edges. Now let \(n\geq 2\), and suppose the claim holds for trees on \(n-1\) vertices. A longest path in a finite tree has an endpoint of degree one: if an endpoint had another neighbor, that neighbor could not already be on the path, since that would create a cycle, and so the path could be extended. Remove this endpoint and its one incident edge. The remaining graph is connected, because a degree-one vertex cannot be an internal vertex of a path between two remaining vertices; it is also acyclic. It is therefore a tree on \(n-1\) vertices, with \(n-2\) edges by induction. Putting back the removed edge gives \(n-1\) edges. \(\square\)

In particular, if \(T\) is a spanning tree of an \(n\)-vertex graph with \(m\) edges, then the number of edges of \(G\) outside \(T\) is \(m-(n-1)\). The tree result above gives the base face count, and edge insertion gives one additional face for each of those remaining edges.

Euler’s Formula for Connected Plane Graphs

Theorem (Euler’s Formula): If \(G\) is a finite, nonempty, connected plane graph with \(n\) vertices, \(m\) edges and \(F\) faces, then $$|V|-|E|+F=2,$$ or equivalently \(n-m+F=2\).

Proof. Choose a spanning tree \(T\) of \(G\). It has all \(n\) vertices and exactly \(n-1\) edges. Keeping the original embedding and deleting the edges outside \(T\) gives a plane embedding of \(T\). Since a plane tree has one face, this starting drawing has \(F_T=1\).

Restore the \(m-(n-1)\) deleted edges one at a time, using their original positions in the plane embedding of \(G\). Before each restoration, the current graph contains \(T\), so it is connected. The endpoints of the edge being restored are therefore already connected. Its arc does not cross the current drawing, because all edges come from the fixed embedding of \(G\). By the edge-insertion result, each restored edge increases the face count by exactly one. After all \(m-(n-1)\) edges have been restored, the face count is

$$ F=1+\bigl(m-(n-1)\bigr)=1+m-n+1=m-n+2. $$

Rearranging gives \(n-m+F=2\), which is the claimed formula. This also covers the single-vertex graph: it has \(n=1\), \(m=0\), and \(F=1\), so \(1-0+1=2\). \(\square\)

The proof explains why connectedness matters to this argument: the spanning tree supplies a connected starting drawing, and every edge is restored between vertices that are already connected. The theorem concerns a plane graph, where faces belong to a specified embedding. The result is that for any such connected embedding, the vertex, edge and face counts satisfy the same equation.

Worked Examples

Worked Example: A Tree with No Edges to Restore

Let \(G\) be the plane path with vertex set \(V=\{1,2,3,4\}\) and edge set \(E=\{12,23,34\}\), drawn as a straight path. It is already a spanning tree. Thus \(n=4\), \(m=3\), and the tree has \(F=1\) face.

Substituting gives \(n-m+F=4-3+1=1+1=2\). Equivalently, \(|V|-|E|+F=4-3+1=2\). As a direct face check, a finite path drawn without crossings does not enclose a region, so its complement has just the one unbounded face. The edge list contains exactly three edges, agreeing with \(n-1=4-1=3\).

Check: The formula gives \(F=2-n+m=2-4+3=1\), which agrees with the face count for the drawn path.

Worked Example: Restoring the Closing Edge of a Cycle

Let \(G\) have vertex set \(V=\{1,2,3,4,5\}\) and edge set \(E=\{12,23,34,45,51\}\), with the vertices drawn in order on a convex pentagon and the edges along its sides. Take the spanning tree with edges \(12,23,34,45\). This tree has \(n=5\) vertices and \(4=n-1\) edges, and its embedding has one face.

There is exactly one edge outside the tree, namely \(51\). Restoring it closes the pentagon and splits the current face into two. Hence \(m=5\) and \(F=1+1=2\). Substitution gives \(n-m+F=5-5+2=0+2=2\). The two faces can also be counted directly: one is inside the pentagon and the other is outside it.

Check: Rearranging the formula gives \(F=2-n+m=2-5+5=2\), matching the direct count of the interior and exterior regions.

Worked Example: Building a Plane Embedding of \(K_4\)

Let \(G\) have vertex set \(V=\{1,2,3,4\}\) and edge set \(E=\{12,23,31,14,24,34\}\). To specify the embedding without a picture, place \(1,2,3\) at the corners of a triangle and \(4\) strictly inside it, and draw every listed edge as a straight segment. The three segments from \(4\) to the triangle’s corners stay inside the triangle and meet one another only at \(4\), so this is a plane embedding.

Start with the spanning tree \(T\) whose edges are \(12,23,34\). It has \(4-1=3\) edges and one face. Restore \(31\) first; it closes the triangle \(1,2,3\), so the face count becomes \(2\). Restore \(14\); it splits the interior face, so the count becomes \(3\). Restore \(24\); it splits one of the remaining interior faces, so the count becomes \(4\). The three restored edges account for all \(6-3=3\) edges outside the tree.

Thus \(n=4\), \(m=6\), and \(F=4\), giving \(n-m+F=4-6+4=-2+4=2\). Independently, the final embedding has the outer triangular face with boundary \(1,2,3,1\) and three interior triangular faces with boundaries \(1,2,4,1\), \(2,3,4,2\), and \(3,1,4,3\). That is one outer face plus three inner faces, again \(F=4\).

Check: The formula predicts \(F=2-n+m=2-4+6=-2+6=4\), agreeing with the four regions identified from the embedding.

Common Pitfalls and Uses

Confusing a plane graph with a planar graph. A planar graph is an abstract graph that can be drawn without crossings; a plane graph comes with one such drawing. In this tutorial, \(F\) counts regions in the specified drawing. The theorem applies to a connected plane graph, not to a crossing drawing in which faces have not been defined by a plane embedding.

Forgetting to count the unbounded face. In the pentagon example, counting only the bounded interior would give \(F=1\), and then \(5-5+1=1\), not \(2\). The correction is to include the exterior region: \(F=2\), and \(5-5+2=2\).

The spanning-tree argument is useful because it turns face counting into an edge count. Start with one face and \(n-1\) tree edges; each of the \(m-n+1\) remaining edges contributes one face. This method also provides a practical check: if a proposed face count for a connected plane graph does not satisfy \(n-m+F=2\), at least one of the counts or the claimed embedding needs review.

Check Your Understanding

Use the spanning-tree argument and, where appropriate, verify your count directly from the embedding.

  1. A connected plane graph has \(7\) vertices and \(8\) edges. How many faces does it have?
  2. Explain why a spanning tree on \(n\) vertices leaves exactly \(m-n+1\) edges outside it in a connected graph with \(m\) edges.
  3. For a plane cycle \(C_6\), state the numbers of vertices, edges and faces, then check Euler’s formula.
  4. Why does each restored edge in the proof have endpoints already connected in the current graph?
  5. Give a concrete incorrect face count for the pentagon example and show how including the unbounded face corrects it.