Post · 11 min read· pp. 867–872
In which we review linear algebra and introduce spectral graph theory.
1. Eigenvalues and Eigenvectors
Spectral graph theory studies how the eigenvalues of the adjacency matrix of a graph, which are purely algebraic quantities, relate to combinatorial properties of the graph.
We begin with a brief review of linear algebra.
If x=a+ib is a complex number, then we let x∗=a−ib denote its conjugate.
If M∈Cn×n is a square matrix, λ∈C is a scalar, v∈Cn−{0} is a non-zero vector and we have
Mv=λv (1)
then we say that λ is an eigenvalue of M and that v is eigenvector of M corresponding to the eigenvalue λ.
When (1) is satisfied, then we equivalently have
(M−λI)⋅v=0
for a non-zero vector v, which is equivalent to
det(M−λI)=0 (2)
For a fixed matrix M, the function λ→det(M−λI) is a univariate polynomial of degree n in λ and so, over the complex numbers, the equation (2) has exactly n solutions, counting multiplicities.
If G=(V,E) is a graph, then we will be interested in the adjacency matrix A of G, that is the matrix such that Aij=1 if (i,j)∈E and Aij=0 otherwise. If G is a multigraph or a weighted graph, then Aij is equal to the number of edges between (i,j), or the weight of the edge (i,j), respectively.
The adjacency matrix of an undirected graph is symmetric, and this implies that its eigenvalues are all real.
Definition 1 A matrix M∈Cn×n is Hermitian if Mij=Mji∗ for every i,j.
Note that a real symmetric matrix is always Hermitian.
Lemma 2 If M is Hermitian, then all the eigenvalues of M are real.
Proof: Let M be an Hermitian matrix and let λ be a scalar and x be a non-zero vector such that Mx=λx. We will show that λ=λ∗, which implies that λ is a real number. We define the following inner product operation over vectors in Cn:
⟨v,w⟩:=i∑vi∗⋅wi
Notice that, by definition, we have ⟨v,w⟩=(⟨w,v⟩)∗ and ⟨v,v⟩=∣∣v∣∣2. The lemma follows by observing that
⟨Mx,x⟩
=i∑j∑Mij∗xj∗xi
=i∑j∑Mjixixj∗
=⟨x,Mx⟩
where we use the fact that M is Hermitian, and that
⟨Mx,x⟩=⟨λx,x⟩=λ∗∣∣x∣∣2
and
⟨x,Mx⟩=⟨x,λx⟩=λ∣∣x∣∣2
so that λ=λ∗. □
From the discussion so far, we have that if A is the adjacency matrix of an undirected graph then it has n real eigenvalues, counting multiplicities of the number of solutions to det(A−λI)=0.
If G is a d-regular graph, then instead of working with the adjacency matrix of G it is somewhat more convenient to work with the normalized matrix M:=d1⋅A.
In the rest of this section we shall prove the following relations between the eigenvalues of M and certain purely combinatorial properties of G.
Theorem 3 Let G be a d-regular undirected graph, and M=d1⋅A be its normalized adjacency matrix. Let λ1≥λ2≥⋯≥λn be the real eigenvalues of M with multiplicities. Then
1. λ1=1 and λn≥−1.
2. λ2=1 if and only if G is disconnected.
3. λn=−1 if and only if at least one of the connected components of G is bipartite.
In the next lecture we will begin to explore an “approximate” version of the second claim, and to show that λ2 is close to 1 if and only if G has a sparse cut.
1.1. More on Eigenvalues and Eigenvectors
In order to relate the eigenvalues of the adjacency matrix of a graph to combinatorial properties of the graph, we need to first express the eigenvalues and eigenvectors as solutions to optimization problems, rather than solutions to algebraic equations.
First, we observe that if M is a real symmetric matrix and λ is a real eigenvalue of M, then λ admits a real eigenvector. This is because if Mx=λx for some x∈Cn, then we also have Mx′=λx′, where x′∈Rn is the vector whose i-th coordinate is the real part of the i-th coordinate of x. Now, if λ is a (real) eigenvalue of a symmetric real matrix M, then the set {x∈Rn:Mx=λx} is a vector subspace of Rn, called the eigenspace of λ.
If λ=λ′ are two distinct eigenvalues of a symmetric real matrix M, then the eigenspaces of λ and λ′ are orthogonal.
Proof: Let x be an eigenvector of λ and y be an eigenvector of λ′. From the symmetry of M and the fact that M, x and y all have real entries we get
⟨Mx,y⟩=⟨x,My⟩
but
⟨Mx,y⟩=λ⋅⟨x,y⟩
and
⟨x,My⟩=λ′⋅⟨x,y⟩
so that
(λ−λ′)⋅⟨x,y⟩=0
which implies that ⟨x,y⟩=0, that is, that x and y are orthogonal. □
Definition 4 The algebraic multiplicity of an eigenvalue λ of a matrix M is the multiplicity of λ as a root of the polynomial det(M−λI). The geometric multiplicity of λ is the dimension of its eigenspace.
The following is the only result of this section that we state without proof.
If M is a symmetric real matrix and λ is an eigenvalue of M, then the geometric multiplicity and the algebraic multiplicity of λ are the same.
This gives us the following “normal form” for the eigenvectors of a symmetric real matrix.
If M∈Rn×n is a symmetric real matrix, and λ1,…,λn are its eigenvalues with multiplicities, and v1 is a length-1 eigenvector of λ1, then there are vectors v2,…,vn such that vi is an eigenvector of λi and v1,…,vn are orthonormal.
Proof: For each eigenvalue, choose an orthonormal basis for its eigenspace. For λ1, choose the basis so that it includes v1. □
Finally, we get to our goal of seeing eigenvalue and eigenvectors as solutions to continuous optimization problems.
Lemma 5 If M is a symmetric matrix and λ1 is its largest eigenvalue, then
λ1=x∈Rn:∣∣x∣∣=1supxTMx
Furthermore, the sup is achieved, and the vectors achieving it are precisely the eigenvectors of λ1.
Proof: That the sup is achieved follows from the fact that the set {x∈Rn:∣∣x∣∣=1} is compact and that x→xTMx is a continuous function.
If v1 is a length-1 eigenvector of λ1, then
x∈Rn:∣∣x∣∣=1supxTMx≥v1TMv1=λ1
If y is a length-1 vector that achieves the sup, then let v1,…,vn be as in Fact 1 and write
y=α1v1+…αnvn
Then
x∈Rn:∣∣x∣∣=1supxTMx=yTMy=i∑αi2λi
Since ∑iαi2=∣∣y∣∣2=1, we have
x∈Rn:∣∣x∣∣=1supxTMx=i∑αi2λi≤λ1⋅i∑αi2=λ1
Finally, we see that we have yTMy=λ1 precisely when, for every i such that αi=0 we have λi=λ1, that is, precisely when y is in the eigenspace of λ1. □
Similarly we can prove
Lemma 6 If M is a symmetric matrix, λ1 is its largest eigenvalue, and v1 is an eigenvector of λ1, then
λ2=x∈Rn:∣∣x∣∣=1,x⊥v1supxTMx
Furthermore, the sup is achieved, and the vectors achieving it are precisely the eigenvectors of λ2. (If λ1=λ2, then the vectors achieving the sup are the eigenvalues of λ1=λ2 which are orthogonal to v1.)
And
Lemma 7 If M is a symmetric matrix and λn is its largest eigenvalue, then
λn=x∈Rn:∣∣x∣∣=1infxTMx
Furthermore, the inf is achieved, and the vectors achieving it are precisely the eigenvectors of λn.
1.2. Proof of the Theorem
We will make repeated use of the following identity, whose proof is immediate: if M is the normalized adjacency matrix of a regular graph, and x is any vector, then
i,j∑Mi,j(xi−xj)2=2xTx−2xTMx (3)
That is,
xTMx=xTx−21i,j∑Mi,j(xi−xj)2≤xTx
And so
λ1=x∈Rn:∣∣x∣∣=1maxxTMx≤1
If we take 1=(1,…,1) to be the all-one vector, we see that 1TM1=1, and so 1 is the largest eigenvalue of M, with 1 being one of the vectors in the eigenspace of 1.
So we have the following formula for λ2:
λ2=x∈Rn:∣∣x∣∣=1,∑ixi=0supxTMx
where we equivalently expressed the condition x⊥1 as ∑ixi=0.
Using (3), we have
λ2=1−x∈Rn:∣∣x∣∣=1,∑ixi=0inf21ij∑Mij(xi−xj)2
So, if λ2=1, there must exist a non-zero v∈Rn such that ∑ivi=0 and ∑ijMij(vi−vj)2=0, but this means that, for every edge (i,j)∈E of positive weight we have vi=vj, and so vi=vj for every i,j which are in the same connected component. The conditions ∑ivi=0 and v=0 imply that v has both positive and negative coordinates, and so the sets A:={i:vi>0} and B:={i:vi<0} are non-empty and disconnected, and so G is not connected.
Conversely, if G is disconnected, and S and V−S are non-empty sets such that E(S,V−S)=0, then we can define v so that vi=∣S∣/(∣V−S∣) if i∈S, and vi=−∣V−S∣/∣S∣ if ∈S, so that ∑ivi=0. This gives us a non-zero vector such that ∑ijMij(vi−vj)2=0 and, after dividing every coordinate by ∣∣v∣∣, a length-1 vector proving that λ2≥1.
Finally, to study λn we observe that for every vector x∈Rn we have
i,j∑Mi,j(xi+xj)2=2xTx+2xTMx
and so
λn=x∈Rn:∣∣x∣∣=1minxTMx
=x∈Rn:∣∣x∣∣=1min−xTx+21i,j∑Mi,j(xi+xj)2
=−1+x∈Rn:∣∣x∣∣=1min21i,j∑Mi,j(xi+xj)2
From which we see that it is always λn≥−1, and that if λn=−1 then there must be a non-zero vector x such that xi=−xj for every edge (i,j)∈E. Let i be a vertex such that xi=a=0, and define the sets A:={j:xj=a}, B:={j:xj=−a} and R={j:xj=±a}. The set A∪B is disconnected from the rest of the graph, because otherwise an edge with an endpoint in A∪B and an endpoint in R would give a positive contribution to ∑i,jMi,j(xi+xj)2; furthermore, every edge incident on a vertex on A must have the other endpoint in B, and vice versa. Thus, A∪B is a connected component, or a collection of connected components, of G which is bipartite, with the bipartition A,B.