Documentation

CslibFrontier.Foundations.LinearAlgebra.Matrix.SkewDeterminant

Odd cycles cancel in the determinant of a skew-symmetric matrix #

Let A be a square matrix over a commutative ring with Aᵀ = -A. In the Leibniz expansion det A = ∑ σ, sign σ • ∏ i, A (σ i) i, the permutations with a cycle of odd length cancel in pairs: reversing the odd cycle through a chosen point (Equiv.Perm.reverseCycle) keeps the sign, negates the product (the cycle has an odd number of entries, each replaced by its negative), and is an involution on these permutations. So the determinant is the sum over the permutations all of whose cycles have even length (Matrix.det_eq_sum_even_cycleType_of_transpose_eq_neg). This is the step in the standard proof of Tutte's determinant criterion for perfect matchings [Tut47].

When moreover the diagonal vanishes and the order is odd, every such permutation has a fixed point, so the determinant is 0 (Matrix.det_eq_zero_of_transpose_eq_neg_of_odd). The diagonal assumption matters only in characteristic 2, where Aᵀ = -A says that A is symmetric.

Main results #

References #

theorem Matrix.det_eq_sum_even_cycleType_of_transpose_eq_neg {α : Type u_1} [Fintype α] [DecidableEq α] {R : Type u_2} [CommRing R] {A : Matrix α α R} (hA : A.transpose = -A) :
A.det = ∑ σ : Equiv.Perm α with ∀ n ∈ σ.cycleType, Even n, Equiv.Perm.sign σ • ∏ i : α, A (σ i) i

Odd cycles cancel: the determinant of a skew-symmetric matrix is the Leibniz sum over the permutations all of whose cycles have even length.

theorem Matrix.det_eq_zero_of_transpose_eq_neg_of_odd {α : Type u_1} [Fintype α] [DecidableEq α] {R : Type u_2} [CommRing R] {A : Matrix α α R} (hA : A.transpose = -A) (hdiag : ∀ (i : α), A i i = 0) (hα : Odd (Fintype.card α)) :
A.det = 0

An alternating matrix (Aᵀ = -A with zero diagonal) of odd order has determinant 0: every permutation with only even cycles moves an even number of points, so it fixes some point.