TL;DR
The graph Laplacian is a matrix built from a graph's adjacency matrix and its degrees. Put a number on each vertex and the Laplacian tells you how much those numbers differ across edges. A signal that agrees on neighbours scores low, and one that jumps along edges scores high. Its eigenvectors are the basic patterns a graph can hold, ordered from smoothest to most jagged, and its eigenvalues say how jagged each pattern is.
Where you'll see it: in spectral clustering, which splits a graph using the eigenvectors of its Laplacian, in semi-supervised learning on graphs, where labels spread along edges, and in graph neural networks, whose layers are smoothing operators built from it.
Intuition
Counting disagreements along edges
Take the four-vertex graph from the adjacency matrix lesson: vertices A, B, C and D, with edges A–B, A–C, B–C, C–D and B–D. Put a number on each vertex, say a temperature. Call the list of numbers , which is a vector.
Now ask a simple question: across each edge, how different are the two endpoints? Add up the squared differences over all edges. If every vertex has the same value, the total is zero. If one vertex is very different from its neighbours, the total is large. This total is the roughness of on the graph.
The Laplacian is the matrix that computes this total in one step. You do not need to loop over edges. You multiply the matrix by the vector and take a dot product, and the answer is the same sum.
Why a matrix at all
Each vertex has a degree: the number of edges touching it. Write the degrees on a diagonal matrix . The Laplacian is
where is the adjacency matrix. The degree matrix counts how many neighbours each vertex has, and the adjacency matrix subtracts the neighbour values back out. The row for a vertex says: take times the value at , then subtract the values at its neighbours. If the vertex matches its neighbours, the result is zero. That is why the Laplacian measures disagreement.
The name comes from the discrete analogue of the Laplace operator in calculus, which measures how far a function at a point differs from the average of its surroundings. The graph version does the same thing with neighbours in place of nearby points.
The math
For an undirected graph with vertices, adjacency matrix and degree matrix (a diagonal matrix with equal to the degree of vertex ), the unnormalized graph Laplacian is . The normalized Laplacian is , where is the diagonal matrix with entries .
Basic properties
Every row of sums to zero, because each row has on the diagonal and in each of the neighbour columns. So the all-ones vector always satisfies .
is symmetric, so it has real eigenvalues and orthogonal eigenvectors. This is the same spectral theorem that the eigenvalues and eigenvectors lesson builds toward. The eigenvalues are never negative, which follows from the quadratic form below.
The quadratic form
For any vector ,
where the sum runs over every edge once. To see this, expand the product. Each diagonal entry collects one term for each edge touching , and each off-diagonal pairs with the matching to give the cross term of . This identity is the reason the Laplacian is the right object: it is the energy of a signal on the graph.
Because each square is non-negative, for all . The Laplacian is positive semidefinite.
Eigenvalues as roughness
Order the eigenvalues , with orthonormal eigenvectors . For a unit eigenvector, , so is exactly the roughness of that pattern. The first eigenvector is the constant vector, with roughness zero.
If the graph splits into connected pieces, then . Each piece gets its own constant pattern, and no edge joins two pieces, so nothing forces a difference. The second smallest eigenvalue , called the algebraic connectivity or Fiedler value, is positive exactly when the graph is connected, and small values mean the graph is nearly split in two.
Normalized version
Degree matters. A hub with 50 edges contributes far more to than a vertex with 2 edges. The normalized Laplacian divides out the degrees, so every vertex counts on the same scale. Its eigenvalues lie between 0 and 2 for any graph. Many spectral methods use it for that reason.
Worked examples
- Adjacency matrix: .
- Degrees: each vertex has one edge, so .
- Laplacian: .
- Try the constant vector: . Eigenvalue .
- Try the difference vector: . Eigenvalue .
- Check the quadratic form on : the single edge gives . Using the eigenvalue, . The two agree.
Interpretation: the graph has two eigenvalues, for "both vertices the same" and for "opposite signs". The opposite-sign pattern is the rough one.
Vertices A, B, C, D with edges A–B, A–C, B–C, C–D and B–D. The degrees are , so
- Check the row sums: row A is , row B is , and the other rows work the same way.
- Roughness of the spike . Only the edges A–B and A–C touch a nonzero value, and each contributes . The total is . This matches .
- Find the eigenvalues with symmetry. The graph is unchanged if you swap A with D and B with C, so the eigenvectors split into patterns that are symmetric or antisymmetric under that swap.
- Symmetric patterns have the form . Applying gives , a system with eigenvalues and . The eigenvectors are and .
- Antisymmetric patterns have the form . Applying gives the decoupled equations and , so the eigenvalues are and , with eigenvectors and .
- Check the trace. The diagonal of sums to , and .
So the spectrum is . The zero eigenvalue appears once because the graph is connected, and the Fiedler value is .
A path on vertices has a known spectrum, for . For :
- : .
- : .
- : .
- : .
- : .
Low means a slowly varying pattern across the path, and high means one that alternates quickly. The eigenvalue grows with the number of sign changes, which is the roughness story in one line.
- 2 - 2 cos(k pi / 5)
Tradeoffs and failure modes
The unnormalized Laplacian and the normalized answer different questions, and choosing the wrong one is a common mistake.
| Situation | Problem | Better choice |
|---|---|---|
| Degrees vary a lot (hubs and leaves) | lets high-degree vertices dominate the spectrum | , or random-walk normalization |
| You want cuts that balance cluster sizes | alone can isolate tiny clusters | Normalized cut built on |
| Graph is directed | is not symmetric and its spectrum may be complex | Directed Laplacians, or symmetrize first |
| Graph is huge | A full eigendecomposition costs | Sparse eigensolvers for the few smallest eigenvalues |
| Graph changes over time | Recomputing eigenvectors each step is expensive | Incremental or approximate spectral methods |
A subtler failure: eigenvectors for repeated eigenvalues are not unique. When , any rotation within that subspace is equally valid, so an algorithm that reads a single "second eigenvector" can give different answers on the same graph.
History
Gustav Kirchhoff used a matrix closely related to the Laplacian in 1847 to count spanning trees of an electrical network, in what became the matrix-tree theorem. The matrix was a tool for circuits long before it had a graph-theory name.
Spectral graph theory grew in the early 1970s. Miroslav Fiedler studied the second smallest eigenvalue and its relation to how well a graph can be split, and that value is now called the Fiedler value. Later work by Fan Chung in the 1990s gathered these results into a systematic theory.
In machine learning, the Laplacian became a practical tool around 2000. Jianbo Shi and Jitendra Malik used normalized cuts for image segmentation in 2000, and Mikhail Belkin and Partha Niyogi used Laplacian eigenmaps for dimensionality reduction in 2003. Xiaojin Zhu, Zoubin Ghahramani and John Lafferty used the Laplacian to spread labels through a graph in 2003, which is the basis of the method described in semi-supervised learning. The idea caught on because it turned a graph into ordinary linear algebra. Kipf and Welling's graph convolutional network in 2017 is built on a smoothing operator closely related to .
Check yourself
QuestionRecall: what is the Laplacian of a graph in terms of and ?Show answer
, where is the diagonal matrix of vertex degrees and is the adjacency matrix. The degree term counts each vertex's neighbours, and the subtraction of removes the neighbour values, so a vertex that matches all its neighbours gets zero.
QuestionComputation: for the path on three vertices 1–2–3, what is for ?Show answer
The edges are 1–2 and 2–3. Only edge 1–2 has a difference, with . Edge 2–3 gives . The total is . Check with the matrix: , and .
QuestionWhy: why does a graph with two connected pieces have two zero eigenvalues?Show answer
Each piece has its own constant pattern, which is an eigenvector with eigenvalue zero: set every vertex in one piece to 1 and every vertex in the other piece to 0. No edge joins the pieces, so every edge difference is zero and so is the quadratic form. Those two patterns are independent, so the eigenvalue zero has multiplicity two.
QuestionApplied: a social network has a few users with thousands of followers and many with only two. Which Laplacian would you use for spectral clustering, and why?Show answer
Use the normalized Laplacian . The unnormalized weights each vertex by its degree, so the hubs dominate the quadratic form and can pull the clusters toward a split that isolates a few users. Dividing by the degrees puts every vertex on the same scale, so the clusters reflect the shape of the network rather than its hubs.