Example note: the Hodge Laplacian, drawn
A worked example on one triangle: its boundary maps, the Laplacian they build, and what the Laplacian's kernel counts.
One triangle
Take the smallest cell complex with something to say: three vertices, the three edges between them, and the face those edges bound. Give each edge an orientation, from its lower vertex to its higher one. The orientation is bookkeeping. It fixes the signs below, and any other choice gives the same answers.1Flipping an edge changes the sign of its column in one matrix and of its row in the other. Ranks, kernels, and eigenvalues stay the same.
Boundary maps
The boundary of an edge is its head minus its tail. The boundary of the face is the sum of its edges, each signed by whether it runs with or against the loop . Edges and run with it; runs against. With the vertices as rows and the edges as columns:
Their product is zero, : the boundary of a boundary is empty. Every complex has this property, and the rest of the note leans on it.
The Laplacian on edges
The Hodge Laplacian on edges adds the view from below, through the vertices, to the view from above, through the face:
For the filled triangle the two terms add up to , and its kernel holds only zero: every edge signal shows up in one view or the other. Remove the face and only the first term remains. Its kernel is spanned by , the loop around the triangle: a hole.
| Complex | Boundary of the face | Eigenvalues of | Kernel of | Holes |
|---|---|---|---|---|
| Hollow triangle | None | 0, 3, 3 | 1 | |
| Filled triangle | 3, 3, 3 | Only zero | 0 |
This is the Hodge theorem in miniature: over the reals, the kernel of has one dimension for each -dimensional hole. Checking it takes a few lines:
import numpy as np
B1 = np.array([[-1, -1, 0],
[ 1, 0, -1],
[ 0, 1, 1]])
B2 = np.array([[1], [-1], [1]])
assert not (B1 @ B2).any() # the boundary of a boundary
L1 = B1.T @ B1 + B2 @ B2.T
print(np.linalg.eigvalsh(L1)) # [3. 3. 3.]: no holes
# Without the face, one eigenvalue is zero: one hole.
print(np.linalg.eigvalsh(B1.T @ B1)) # about [0. 3. 3.]What a network gets from it
The two halves of are two ways for edges to be neighbors. links edges that share a vertex, and links edges that lie on a common face. A message passing layer on edges can give each its own weights. The layer on the paper page passes its messages along the same two boundary maps.