Handshake Lemma
A simple breakdown
The Handshake Lemma is a fundamental idea in graph theory that connects vertices and edges in a very simple way.
If you’d like a formal definition see
The Big Idea
Every edge in a graph connects two vertices.
Because of this, every edge contributes 2 to the total degree count:
one for each vertex it touches
The Rule
Why is it called the Handshake Lemma?
Imagine a group of people shaking hands.
Each handshake involves two people
If you count how many handshakes each person has participated in and add them up,
you will count every handshake twice
👉 Graphs work the same way:
vertices = people
edges = handshakes
Example
Suppose you have the following graph
A
/ \
B C
/ \
D EDegrees of Each Vertex
A → connected to B, C → degree = 2
B → connected to A, D, E → degree = 3
C → connected to A → degree = 1
D → connected to B → degree = 1
E → connected to B → degree = 1
Or, much more intuitively, we can count the edges:
A—B
A—C
B—D
B—E
Then use the handshake lemma:
For simple math…
For trees, we already know:
So:
This helps us quickly verify whether a structure could be a valid tree.
Important Insight
The sum of all vertex degrees must always be even
Why?
So if the total degree is odd → the graph is not possible.
Quick Check
A graph has total degree 12. How many edges does it have?
Can a graph have total degree 9? Why or why not?
A tree has 6 vertices. What is the total degree?
