The Matrix-Tree Theorem

Give each edge e its own variable xe and form the weighted Laplacian L = D − A. Delete the row and column of any vertex r: the determinant of what remains is ΣT ∏e∈T xe, one monomial for each spanning tree T, every coefficient 1.

Graph
Variables
Delete row/col
Weighted Laplacian
Determinant
How to use / what is computed

Drawing. In Draw mode click empty space for a vertex and drag from one vertex to another for an edge; dragging again between the same pair adds a parallel edge with its own variable. Move drags vertices, X deletes, Root picks the vertex r whose row and column are struck out. Right-click deletes in any mode. Loops are ignored (they cancel in D − A and lie in no tree).

Linking. Hover a monomial or a tree to light up the other and draw that tree on the big graph; click to pin it. Hover an edge of the big graph to keep only the trees (and monomials) that use it; hover a matrix entry to see the edges it records.

Honesty. The determinant is expanded symbolically from the matrix shown (Laplace expansion with memoised minors, exact integer coefficients), and separately the spanning trees are enumerated by search. The line at the top right of the determinant box reports whether the two agree term-for-term. For larger graphs the symbolic expansion is skipped, and the count is checked against the integer determinant (all xe = 1) instead.