Cauchy–Binet Formula

lean4-prooflinear-algebravisualization
det(AB)=S[n],S=mdet(AS)det(BS)\det(AB) = \sum_{S \subseteq [n],\, |S|=m} \det(A_S) \det(B^S)

Statement

Let AA be an m×nm \times n matrix and BB an n×mn \times m matrix over a commutative ring, with mnm \le n. Then

det(AB)=S[n]S=mdet(AS)det(BS),\det(AB) = \sum_{\substack{S \subseteq [n] \\ |S| = m}} \det(A_S) \det(B^S),

where ASA_S denotes the m×mm \times m submatrix of AA formed by the columns indexed by SS, and BSB^S is the m×mm \times m submatrix of BB formed by the rows indexed by SS.

When m=nm = n, the only term has S=[n]S = [n] and we recover the Determinant MultiplicativityDeterminant Multiplicativitydet(AB)=det(A)det(B)\det(AB) = \det(A)\,\det(B)The determinant of a product equals the product of determinantsRead more → formula det(AB)=detAdetB\det(AB) = \det A \cdot \det B.

Visualization

Take m=2m = 2, n=3n = 3:

A=(123456),B=(789101112).A = \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{pmatrix}, \quad B = \begin{pmatrix} 7 & 8 \\ 9 & 10 \\ 11 & 12 \end{pmatrix}.

There are (32)=3\binom{3}{2} = 3 index subsets: S{{1,2},{1,3},{2,3}}S \in \{\{1,2\}, \{1,3\}, \{2,3\}\} (1-indexed).

SSASA_Sdet(AS)\det(A_S)BSB^Sdet(BS)\det(B^S)product
{1,2}\{1,2\}(1245)\begin{pmatrix}1&2\\4&5\end{pmatrix}3-3(78910)\begin{pmatrix}7&8\\9&10\end{pmatrix}2-266
{1,3}\{1,3\}(1346)\begin{pmatrix}1&3\\4&6\end{pmatrix}6-6(781112)\begin{pmatrix}7&8\\11&12\end{pmatrix}4-42424
{2,3}\{2,3\}(2356)\begin{pmatrix}2&3\\5&6\end{pmatrix}3-3(9101112)\begin{pmatrix}9&10\\11&12\end{pmatrix}2-266

Sum: 6+24+6=366 + 24 + 6 = 36.

Direct computation: AB=(5864139154)AB = \begin{pmatrix} 58 & 64 \\ 139 & 154 \end{pmatrix}, det(AB)=5815464139=89328896=36\det(AB) = 58 \cdot 154 - 64 \cdot 139 = 8932 - 8896 = 36. Confirmed.

Proof Sketch

  1. Expand via multilinearity. Write ABij=kAikBkjAB_{ij} = \sum_k A_{ik} B_{kj}. Expand det(AB)\det(AB) using multilinearity of the determinant in each row: this gives a sum over functions f:[m][n]f: [m] \to [n] of products iAi,f(i)\prod_i A_{i,f(i)} times an m×mm \times m determinant of columns of BB indexed by ff.
  2. Non-injective terms vanish. If ff is not injective, two rows of the BB-submatrix are identical (up to sign), so its determinant is zero.
  3. Injective functions = subsets. For injective ff, grouping by the image set S=image(f)S = \mathrm{image}(f) and summing over permutations of SS recovers det(AS)\det(A_S) from the Leibniz formula. The remaining factor is det(BS)\det(B^S).
  4. Square case. When m=nm = n, the only injective f:[n][n]f: [n] \to [n] with image [n][n] are permutations — summing over all of them gives detAdetB\det A \cdot \det B.

Connections

Cauchy–Binet specializes to Determinant MultiplicativityDeterminant Multiplicativitydet(AB)=det(A)det(B)\det(AB) = \det(A)\,\det(B)The determinant of a product equals the product of determinantsRead more → when m=nm = n and implies Hadamard's InequalityHadamard's InequalitydetAj=1nAj|\det A| \le \prod_{j=1}^n \|A_j\|The absolute value of a determinant is at most the product of the Euclidean norms of its columns.Read more → (via bounding each minor term). It connects to Rank–Nullity TheoremRank–Nullity Theoremrank(f)+nullity(f)=dimV\operatorname{rank}(f) + \operatorname{nullity}(f) = \dim VThe dimensions of image and kernel of a linear map sum to the domain dimensionRead more → through the fact that rank(AB)min(rank(A),rank(B))\mathrm{rank}(AB) \le \min(\mathrm{rank}(A), \mathrm{rank}(B)), which follows from counting nonzero terms.

Lean4 Proof

-- Cauchy-Binet for the square case is exactly det_mul.
-- Mathlib: Matrix.det_mul in LinearAlgebra.Matrix.Determinant.Basic
-- For the rectangular case we verify a small numerical instance using decide.
open Matrix in
theorem cauchy_binet_square (n : Type*) [Fintype n] [DecidableEq n]
    (A B : Matrix n n ) :
    det (A * B) = det A * det B :=
  det_mul A B

-- Numerical check: the 2x3 times 3x2 example from the Visualization (over ℤ).
theorem cauchy_binet_check :
    let A : Matrix (Fin 2) (Fin 3)  := !![1, 2, 3; 4, 5, 6]
    let B : Matrix (Fin 3) (Fin 2)  := !![7, 8; 9, 10; 11, 12]
    (A * B).det = 36 := by decide