Ma/CS 6b Class 20: Spectral Graph Theory By Adam Sheffer Recall: Parity of a Permutation S n the set of permutations of 1,2,, n. A permutation σ S n is even if it can be written as a composition of an even number of transpositions. Otherwise, σ is odd. sgn σ = ቊ 1, σ is even 1, σ is odd 1
Determinants S n the set of permutations of 1,2,, n. M an n n matrix. m ij j th cell in i th row of M. The determinant of M is det M = M = σ S n m 1,σ(1) m n,σ n sgn σ Simple Example det M = M = σ S n m 1,σ(1) m n,σ n sgn σ a c b d = ad bc. 2
Eigenvalues and Eigenvectors A an n n matrix of real numbers. The eigenvalues of A are the numbers λ such that Ax = λx for some nonzero vector x R n. A vector x that satisfies Ax = λx for some eigenvalue λ is an eigenvector of A. Example. A = 2 1 1 2. Eigenvalue λ 1 = 3 with eigenvectors of the form a, a. Eigenvalue λ 2 = 1 with eigenvalues of the form a, a. Characteristic Polynomial A an n n matrix of real numbers. The characteristic polynomial of A is φ A; λ = det λi A. The roots of φ A; λ are exactly the eigenvalues of A. The algebraic multiplicity of an eigenvalue λ i is the multiplicity of λ i in φ A; λ. (Do not confuse with the geometric multiplicity, which is the dimension of the space of eigenvectors associated with λ). 3
Example: Multiplicities A = 2 0 0 0 1 2 0 0 0 1 3 0 0 0 1 3 λ 2 0 0 0 det λi A = det 1 λ 2 0 0 0 1 λ 3 0 0 0 1 λ 3 = λ 2 2 λ 3 2. So we have the eigenvalues λ 1 = 2 and λ 2 = 3, each with (algebraic) multiplicity 2. Recall: Adjacency Matrix A = Consider a graph G = V, E. We order the vertices as V = v 1, v 2,, v n. The adjacency matrix of G is a symmetric n n matrix A. The cell A ij contains the number of edges between v i and v j. v 1 0 1 0 1 0 1 0 0 1 1 0 1 0 1 0 0 0 1 0 1 1 1 0 1 0 v 5 v 4 v 2 v 3 4
The Spectrum of a Graph Consider a graph G = V, E and let A be the adjacency matrix of G. The eigenvalues of G are the eigenvalues of A. The characteristic polynomial φ G; λ is the characteristic polynomial of A. The spectrum of G is spec G = λ 1,, λ t, m 1,, m t where λ 1,, λ t are the distinct eigenvalues of A and m i is the multiplicity of λ i. Example: Spectrum A = det λi A = det 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 0 λ 1 0 1 1 λ 1 0 0 1 λ 1 1 0 1 λ = λ 2 λ 2 λ + 2. spec C 4 = 0 2 2 2 1 1 v 1 v 2 v 4 v 3 5
Spectral Graph Theory Spectral graph theory is the study of properties of a graph in relationship to the characteristic polynomial, eigenvalues, and eigenvectors of matrices associated with the graph, such as its adjacency matrix. Beyond being useful in graph theory, it is also used in research in quantum chemistry. Slight Change of Notation Instead of multiplicities, let λ 1,, λ n be the not necessarily distinct eigenvalues of G. 2 1 For example, if the spectrum is 2 2, we write λ 1 = λ 2 = 2 and λ 3 = λ 4 = 1 (instead of λ 1 = 2, m 1 = 2, λ 2 = 1, m 2 = 2). 6
The Spectral Theorem Every adjacency matrix A is symmetric and real. Theorem. Any real symmetric n n matrix has real eigenvalues and n orthonormal eigenvectors. The algebraic and geometric multiplicities are the same in this case. n We have φ A; λ = ς i=1 λ λ i. The multiplicity of an eigenvalue λ is n rank λi A. Changing the Diagonal A an n n real symmetric matrix. c a real constant. Adding c to each cell in the diagonal of A increases each of the eigenvalues of A by c. Since α + c is a root of det λi (ci + A) if and only if α is a root of det(λi A). 7
The Spectrum of a Complete Graph Problem. What is the spectrum of K n? 1 n n the all 1 s n n matrix. The adjacency matrix is A = 1 n n I. What is the spectrum of 1 n n? n 0 1 n 1. (Eigenvectors 1,1,, 1, 1, 1,0,, 0, etc.) Using the argument from the previous slide, we have n 1 1 spec K n = 1 n 1. Trace A n n adjacency matrix of a graph G. The trace of A is trace A = σ n i=1 A ii. In φ A; λ = det λi A, the coefficient of λ n 1 is trace A. n Since φ A; λ = ς i=1 λ λ i, we have trace A = σ n i=1 λ i Since G is simple, we get trace A = A ii = 0. n i=1 Thus, we have σ n i=1 λ i = 0. 8
Complete Bipartite Graphs Problem. What is the spectrum of K m,n? We have A = 0 m m 1 m n 1 n m 0 n n. We have rank A = 2 so the multiplicity of λ = 0 is m + n rank 0 I A = m + n 2. Denote the remaining eigenvalues as λ 2 and λ 3. We have 0 = trace A = λ 2 + λ 3. Searching for λ 2 We know that the spectrum of K m,n is 0 λ 2 λ 2. m + n 2 1 1 We thus have φ K m,n ; λ m+n = i=1 λ λ i = λ m+n 2 λ 2 λ 2 2 Recall that A = 0 m m 1 m n 1 n m 0 n n. Thus the coefficient of λ m+n 2 in det λi A is σ i j A ij A ji = mn. 9
Finding λ 2 m+n φ G; λ = i=1 λ λ i = λ m+n λ 2 2 λ m+n 2. The coefficient of λ m+n 2 in det λi A is σ i j A ij A ji = mn. So the spectrum of K m,n is 0 mn mn m + n 2 1 1. Which Famous American Serial Killer is Related to Mathematics Charles Manson The Unabomber Ted Bundy 10
Recall: Minors A minor of a matrix A is the determinant of a square sub-matrix, cut down from A by removing one or more of its rows or columns. A k k minor is the determinant of a k k submatrix of A. The Coefficient of λ n 2 A n n adjacency matrix of a (simple) graph G = (V, E). The leading coefficient of φ G; λ is 1. The coefficient of λ n 1 is trace A = 0. What is the coefficient of λ n 2? As in the example of K m,n, it is σ i j A ij A ji (sum of the 2 2 minors with the same row and column indices). Such a minor is -1 if v i, v j E, and 0 otherwise. Therefore, the coefficient of λ n 2 is E. 11
A n n adjacency matrix of a graph G. What is the coefficient of λ n 3 in φ G; λ? It is the sum of the 3 3 minors with the same row and column indices). Such a 3 3 minor is nonzero iff for the corresponding indices i, j, k we have that v i, v j, v k form a cycle of length three. Then det 0 e ij e ik e ij 0 e jk e ik e jk 0 = det 0 1 1 1 0 1 1 1 0 = 2. Thus, the coefficient of λ n 3 is 2 times the number of copies of K 3 in G. A Generalization A n n adjacency matrix of a graph G. The coefficient of λ n i in φ G; λ is the sum of the i i minors of A with the same row and column indices (times 1 i ). 12
Powers of A A n n adjacency matrix of a graph G. Recall that cell i, j of A k is the number of paths of length k between v i and v j. If λ is an eigenvalue of A, what do we know about A k? v an eigenvector of λ. A k v = λa k 1 v = λ 2 A k 2 v = = λ k v. So λ k is an eigenvalue of A k, with corresponding eigenvector v. Adding Isolated Vertices A n n adjacency matrix of a graph G. What happens to the spectrum of G when adding an isolated vertex? We add a row and a column of zeros to A. Recall that the multiplicity of an eigenvalue λ is n rank λi A. Specifically, the multiplicity of the eigenvalue 0 is n rank(a). Since adding the new row and column does not change rank(a), this increases the multiplicity of 0 by 1. 13
Eigenvalues of Bipartite Graphs Lemma. Let G be a bipartite graph and let λ be a nonzero eigenvalue of G with multiplicity m. Then λ is also an eigenvalue of G with multiplicity m. v 1 v 2 v 4 v 3 Example: Spectrum A = det λi A = det 0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 0 λ 1 0 1 1 λ 1 0 0 1 λ 1 1 0 1 λ = λ 2 λ 2 λ + 2. spec G = 0 2 2 2 1 1 v 1 v 2 v 4 v 3 14
Eigenvalues of Bipartite Graphs Lemma. Let G be a bipartite graph and let λ be a nonzero eigenvalue of G with multiplicity m. Then λ is also an eigenvalue of G with multiplicity m. Proof. If the two sides of G have different sizes, we even them out by adding isolated vertices. These do not change the spectrum of G except for increasing the multiplicity of 0. n the number of vertices in each part. We can write the adjacency matrix of G as 0 n n B B T where B is an n n matrix. 0 n n v = x y an eigenvector of λ (where both x and y have n coordinates). Then λx 0 B x = λv = Av = λy B T 0 y = By B T x. Then for v = x y we have Av B y = B T = λx x λy. That is, v is an eigenvector of λ. Also, if λ has k independent eigenvectors, so does λ. 15
More Bipartite Graphs Theorem. Let G be a graph with n vertices. Then the following statements are equivalent: G is bipartite. The nonzero eigenvalues of G occur in pairs: λ i = λ j. σ n i=1 λ t i = 0 for any odd positive integer t. Proof. The previous lemma shows that the first statement implies the second. Proof Assume that the eigenvalues of G occur in pairs: λ i = λ j. For any positive odd integer t, we have λ i t = λ j t. Thus σ n i=1 λ t i = 0. 16
Proof (cont.) Assume that for any positive odd integer t, we have σ n i=1 λ t i = 0. Recall that the λ t i s are the eigenvalues of A t. Since trace A t = σ n i=1 λ t i = 0, and A t contains only non-negative elements, the main diagonal of A t is all zeros. That is, there are no odd-length cycles in G. Recall from 6a that a G is bipartite iff it contains no odd-length cycles. The End Before Ted Kaczynski was the Unabomber, he was a mathematics professor at Berkeley. At the time, he was the youngest professor ever to get hired by Berkeley. His specialty was complex analysis. 17