Handshake Lemma

Theorem
Let $G$ be a $\tuple {p, q}$-undirected graph, which may be a multigraph or a loop-graph, or both.

Let $V = \set {v_1, v_2, \ldots, v_p}$ be the vertex set of $G$.

Then:
 * $\ds \sum_{i \mathop = 1}^p \map {\deg_G} {v_i} = 2 q$

where $\map {\deg_G} {v_i}$ is the degree of vertex $v_i$.

That is, the sum of all the degrees of all the vertices of an graph is equal to twice its size.

This result is known as the Handshake Lemma or Handshaking Lemma.

Proof
In the notation $\tuple {p, q}$-graph, $p$ is its order and $q$ its size.

That is, $p$ is the number of vertices in $G$, and $q$ is the number of edges in $G$.

Each edge is incident to exactly two vertices.

The degree of each vertex is defined as the number of edges to which it is incident.

So when we add up the degrees of all the vertices, we are counting all the edges of the graph twice.