The Laplacian of a weight matrix #
A square matrix A : Matrix κ κ R can be read as the arc weights of a weighted digraph on κ.
Its Laplacian Matrix.laplacian A is the diagonal matrix of the row sums of A, minus A.
Row u of the Laplacian is ∑ v, A u v • (eᵤ - eᵥ). In particular every row sums to zero, and
the diagonal entries A u u (loops) cancel. For the adjacency matrix of a simple graph this is
Mathlib's SimpleGraph.lapMatrix. For a digraph it is the out-degree Laplacian.
The determinants of its principal minors count spanning trees and arborescences. These are the
matrix-tree theorems in CslibFrontier.Foundations.Combinatorics.SimpleGraph.MatrixTree and
CslibFrontier.Foundations.Combinatorics.Digraph.MatrixTree. Both proofs evaluate determinants of
matrices that become triangular after the index set is ordered by a weight. The determinant of
such a matrix is the product of its diagonal (Matrix.det_eq_prod_diag_of_weight).
Main definitions #
Matrix.laplacian: the Laplaciandiagonal (fun u => ∑ v, A u v) - A.
Main results #
Matrix.laplacian_apply: the entries of the Laplacian.Matrix.det_eq_prod_diag_of_weight: a matrix whose nonzero off-diagonal entries strictly increase a natural-number weight has determinant the product of its diagonal entries.Matrix.det_submatrix_eq_of_sum_eq_zero: all(n - 1) × (n - 1)principal minors of a matrix whose row sums and column sums vanish are equal.Matrix.det_laplacian_submatrix_eq: all reduced Laplacian determinants of a balanced weight matrix are equal across roots.
The Laplacian of a square matrix A, read as the arc weights of a weighted digraph: the
diagonal matrix of the row sums of A, minus A. Its row u is ∑ v, A u v • (eᵤ - eᵥ), so the
diagonal entries A u u (loops) cancel.
The entries of the Laplacian.
A square matrix whose off-diagonal nonzero entries M i j all satisfy d i < d j for a
weight d has determinant the product of its diagonal entries.
For a matrix L whose row sums and column sums all vanish, all principal cofactors obtained by
deleting a single row and matching column are equal.
For a balanced weight matrix A (∑ w, A v w = ∑ u, A u v), all reduced Laplacian
determinants are equal across roots.