# Introduction to graph theory/Proof of Theorem 1

## Statement

The sum of the degrees of the vertices of a graph ${\displaystyle G}$ is precisely twice the size of ${\displaystyle G}$.

## Proof

Let ${\displaystyle S=\{(v,e):v\in V(G),e\in E(G),v}$ incident with ${\displaystyle e\}\!\,}$. We will count the number of elements of ${\displaystyle S}$ in two different ways, using the method of double counting.

The degree of a vertex is defined to be the number of edges incident with that vertex. Therefore vertex ${\displaystyle v}$ is the vertex-part of precisely ${\displaystyle d(v)}$ elements of ${\displaystyle S}$. Thus the number of elements of ${\displaystyle S}$ is the sum of the degrees of the vertices.

The other obvious way to count the number of elements of ${\displaystyle S}$ is in terms of the edges. Clearly each edge is incident with precisely two vertices. Therefore edge ${\displaystyle e}$ is the edge-part of precisely 2 elements of ${\displaystyle S}$. Thus the number of elements of ${\displaystyle S}$ is twice the number of edges.

Since a set has the same number of elements, regardless of how you count them (unless, of course, you miscount them), it follows that the sum of the degrees of the vertices is twice the number of edges.

## Alternate Proof

In combinatorics, you can prove most results a number of different ways. Here is an alternate proof by induction on the number of edges ${\displaystyle m}$. If ${\displaystyle m=0}$, there are no edges and hence each degree is 0, so the total of the degrees is indeed twice the number of edges.

Now suppose that we have proved the theorem for all graphs with ${\displaystyle m-1}$ edges, and that graph ${\displaystyle G}$ has ${\displaystyle m}$ edges. Let ${\displaystyle uv}$ be an edge of ${\displaystyle G}$. Denote by ${\displaystyle G-uv}$ the graph identical to ${\displaystyle G}$ in all respects, save the omission of the edge ${\displaystyle uv}$. Then clearly ${\displaystyle G-uv}$ has ${\displaystyle m-1}$ edges, and so its degrees sum to ${\displaystyle 2m-2}$. ${\displaystyle G}$ has identical degrees to ${\displaystyle G-uv}$, except for an increase by one at the vertices ${\displaystyle u}$ and ${\displaystyle v}$. Thus the sum of the degrees of ${\displaystyle G}$ is ${\displaystyle (2m-2)+2=2m}$, proving the theorem by induction.