Spectral Graph Theory

Eigenvalues, the Laplacian, and spectral clustering

Spectral Graph Theory

Spectral graph theory studies the relationship between graph structure and the eigenvalues of associated matrices. By encoding a graph as a matrix, we can use powerful tools from linear algebra to uncover hidden properties.

The adjacency, degree, and Laplacian matrices each capture different aspects of a graph. Their eigenvalues reveal connectivity, expansion properties, and natural partitions that are invisible from the combinatorial perspective alone.

Graph Matrices Explorer

Every graph has associated matrices that encode its structure. The adjacency matrix A records which vertices are connected, the degree matrix D captures vertex degrees along the diagonal, and the Laplacian L = D - A combines both to encode connectivity.

Click a vertex to select, click two vertices to toggle edge

Adjacency Matrix A
1
2
3
4
1
0
1
0
0
2
1
0
1
0
3
0
1
0
1
4
0
0
1
0
4
Vertices (n)
3
Edges (m)
4×4
Matrix Size

Key insight: All three matrices are symmetric for undirected graphs, guaranteeing real eigenvalues — a prerequisite for the spectral analysis that follows.

Eigenvalue Properties

The eigenvalues of the Laplacian matrix reveal graph structure. The number of zero eigenvalues equals the number of connected components, and the second-smallest eigenvalue lambda-2 (algebraic connectivity) tells us how well-connected the graph is.

Laplacian Spectrum
0
1
2
3
4
5
Zero (λ = 0)
λ₂ (Fiedler)
Other
Eigenvalues of L:
λ1 = 0.000
λ2 = 0.586
λ3 = 2.000
λ4 = 3.414
λ₂ = 0.586
Algebraic Connectivity
Graph is CONNECTED
1
Zero Eigenvalues
= 1 Connected Component
✓ λ₂ > 0 confirms the graph is connected!
The larger λ₂ is, the more "well-connected" the graph. K₄ has λ₂ = 4!

Key insight: A graph is connected if and only if lambda-2 > 0. The larger lambda-2 is, the harder it is to disconnect the graph by removing edges — this is why it is called the algebraic connectivity.

Spectral Clustering

Spectral clustering uses the Fiedler vector (eigenvector of lambda-2) to partition graphs. Vertices are assigned to clusters based on the sign of their Fiedler vector component, naturally minimizing the number of edges cut.

Fiedler Vector (eigenvector of λ₂)
v1
-0.41
v2
-0.41
v3
-0.41
v4
+0.41
v5
+0.41
v6
+0.41
Cluster assignment: negative → Cluster A (blue), positive → Cluster B (red)
Cluster A (negative)
Cluster B (positive)
Unclustered

Key insight: The Fiedler vector provides an optimal relaxation of the NP-hard minimum bisection problem — spectral methods turn a combinatorial optimization into a linear algebra computation.

Key Takeaways

  • Graph matrices — the adjacency matrix A, degree matrix D, and Laplacian L = D - A encode graph structure in a form amenable to linear algebra
  • Laplacian eigenvalues — the number of zero eigenvalues equals the number of connected components; lambda-2 measures algebraic connectivity
  • Spectral clustering — the Fiedler vector partitions graphs by sign, minimizing edges cut between clusters