Kirchoff's matrix tree theorem

Tags: #theorem

Statement

The number of spanning trees of a graph G (yes multiedges, no self-loops) is the determinant of L~, the reduced Laplacian matrix (for any i).

Furthermore, the rank of L (the Laplacian (Kirchoff) matrix) is nc where n is the number of vertices and c is the number of connected components.

Another formulation: if the eigenvalues of L~ is λ1,,λn with λn=0, then the number of spanning trees of G is equal to

1nλ1λn1

Proof

Direct the edges of G arbitrarily. First, we collect some lemmas:

Lemma: L=BBT for any fixed orientation of the edges. (where B is the oriented incidence matrix)
The (i,j) entry of BBT is the dot product of the ith and jth rows of B.
If i=j, this gives us the number of edges that are incident to i.
If ij, this gives us the negation of the number of edges connecting i and j.
We note that this is exactly the (i,j) entry of L.

Lemma: L~=B~B~T where B~ is B with the ith row and column removed.
Follows from the above.

Applying Cauchy-Binet formula to the above equation, we get

det(L~)=det(B~B~T)=|S|=n1(detB~S)2

Key Lemma: detB~S=±1 if S is the set of edges of a spanning tree. 0 otherwise.
Suppose S does not form a spanning tree. Since it has n1 edges, it has to have a cycle. Then, the sum of all the corresponding columns of the cycle in B~S will be 0, which yields a linear dependence. Thus, the determinant is 0.
Suppose S=T forms a spanning tree. As long as the tree has at least 2 vertices, it will have at least 2 leaves. These leaves correspond to a row in B~T that only has 1 nonzero entry. We note then that detB~T=±detB~T where T is T without the leaf, still a tree. We may continue doing this until there are no more edges left, and we see that the determinant will always be ±1.
It turns out in general that the oriented incidence matrix of a graph is totally unimodal

With this lemma, we conclude the theorem.

The equivalent statement that it is the product of the eigenvalues comes from looking at the two ways to find the linear term of the characteristic polynomial of L

  1. The characteristic polynomial will look like λn(xλ1)(xλn1) and so the coefficient of the linear term will be (1)n1i=1n1λi
  2. Note that the coefficient of λ1 in det(λIL) is also the sum of the (n1)×(n1) minors, ie. (1)n1i=1ndet(L~i) which gives us n times the number of spanning trees

Combining these two yields that

i=1n1λi=#spanning trees of G