THE GRAPH LAPLACIAN

A graph becomes a matrix, and the matrix remembers everything the picture forgot. The Laplacian L = D − A — degree matrix minus adjacency — is symmetric and positive-semidefinite; its spectrum counts the connected components, and its second-smallest eigenvalue measures how hard the graph is to cut. Rendered, not quoted.

SOURCE Kirchhoff, "Über die Auflösung der Gleichungen…" (1847) — the matrix-tree origin; algebraic connectivity in Fiedler, Czechoslovak Math. J. 23 (1973) 298–305. Kirchhoff 1847 has no stable open link — cited by author/title/year, marked AMBER.

Blue Team · builds & defends

3 THE MODEL

A graph on n nodes gives three matrices. A (adjacency): 1 where nodes touch. D (degree): diagonal, each node's edge-count. The Laplacian is their difference:

L = D − A

Row i reads: +deg(i) on the diagonal, −1 to each neighbour, 0 elsewhere. Every row sums to zero — that is why L·𝟙 = 0. Two facts fall out for free: symmetric (A and D both are) and positive-semidefinite (the quadratic form is a sum of squares over edges, below).

5 THE LINEAGE

The graph as an operator. Kirchhoff turned a circuit into a matrix; the same matrix, spectralised by Fiedler, turns structure into numbers. The count of zero eigenvalues = connected components; the Fiedler vector (eigenvector of the smallest nonzero eigenvalue) splits the graph along its weakest cut.

→ that eigenvector is the seed of the-spectral-clustering — the neighbour this sphere hands its spectrum to.

7 THE WITNESS

Re-runs the invariants live against the engine's current matrices: symmetry, PSD, L·𝟙 = 0, and zero-count = components. Confirms green — and flips red the instant window 6 corrupts the sign.

WITNESS: idle
The Machine · L = D − A and its spectrum

4 DATA IN  IN ↓

Three constructed graphs, exact integer edges:

G1 — 5 nodes, one connected piece.
G2 — triangle {0,1,2} + edge {3,4}: two pieces.
G3 — three disjoint edges: three pieces.

Ground truth for the component count is built into how each graph is wired.

D − A

0 THE PANEL  LIT

Live: L built from D−A, eigenvalues by Jacobi rotation (deterministic), zeros counted at 1e-9.

spectrum

8 DATA OUT  OUT ↓

Proven, exact:

• spec(G2) = {0, 0, 2, 3, 3} — 2 zeros = 2 components.
• spec(G3) = {0, 0, 0, 2, 2, 2} — 3 zeros = 3 components.
• G1: 1 zero = 1 component, all λ ≥ 0.
xᵀLx = Σ_edges (xᵢ−xⱼ)² holds for arbitrary x.

Red Team · attacks & breaks

1 THE ADVERSARY  WALL

"Eigenvalues are floats — your zero-count is a rounding accident, and a big enough graph will hide a fourth component in the numerical fuzz."

Answered structurally: the zeros here are exact to ~1e-13 while the smallest nonzero λ on these graphs exceeds 0.3 — a gap of ten orders of magnitude, not a knife-edge. The count is a robust jump, not a fragile threshold. On adversarial near-disconnected graphs the gap can shrink (real limit — see graveyard).

2 THE GRAVEYARD

  • "L = A − D, close enough."
    No. D − A. The sign makes 𝟙 a kernel vector and makes L positive-semidefinite; the reverse buries both.
  • "Zero eigenvalues always count components for D+A too."
    False. The signless Laplacian D+A only hits zero on bipartite pieces — a triangle gives {1,1,4}, no zero. That is exactly why the tamper is caught.
  • "Second-smallest λ = 0 means well-connected."
    Backwards. λ₂ = 0 means disconnected; large λ₂ (algebraic connectivity) means hard to cut. AMBER the phrase "well-connected" is informal.

6 THE TAMPER

The disclosed planted void: swap D − A for D + A (a sign error). Now L·𝟙 ≠ 0 and G2's zero-count drops from 2 to 1. The Witness (7) fires.