Leibniz Permutation Formula
How can a single number, computed from the entries of a square matrix, detect whether that matrix is invertible? The determinant answers this question. But its usual introduction through row operations or an inductive cofactor expansion can obscure what the determinant actually is as a function of the entries. The Leibniz formula removes the obscurity. It exhibits the determinant as one explicit finite sum. This sum runs over every permutation of the column indices, of signed products of entries. This formula matters for an important reason. It is the bridge between the abstract characterization of the determinant and a concrete polynomial expression. The abstract characterization is the unique alternating, multilinear, normalized function of the rows. The concrete expression is one that anyone can compute, differentiate, or manipulate symbolically. It shows immediately why the determinant is a polynomial in the entries with integer coefficients. It also shows why the determinant commutes with transpose. Further, it shows why the number of terms explodes combinatorially ( terms for an matrix). This explains both its theoretical elegance and its practical uselessness as an algorithm for large . The big picture: determinants can be approached from three directions that must ultimately agree. One is axiomatic (alternating multilinear normalized function of rows). One is recursive (cofactor/Laplace expansion). One is combinatorial (the Leibniz sum). This article proves something important. The axiomatic determinant, whose existence and uniqueness is assumed known, equals the Leibniz sum. This single identity unlocks all further computational tools. What this article delivers: a precise statement and complete proof of the Leibniz formula. This proof derives from the defining properties of the determinant. The article also gives a geometric picture of what a "permutation term" contributes. It includes two fully worked numerical examples on non-symmetric matrices. It offers a counterexample showing why the sign of the permutation cannot be dropped. Finally, it maps where this formula surfaces across mathematics and its applications.
- The determinant of an matrix equals a sum over all permutations of .
- Each term is times the product of entries , one entry from each row and each column.
- The formula is derived from multilinearity and alternation applied to the standard basis expansion of each row.
- It proves the determinant is a polynomial in the entries, and that .
- It generalizes cofactor expansion: expanding along a row groups the terms by the column chosen in that row.
- Key idea: the determinant is the signed count, with multiplicities from matrix entries, of all ways to pick one entry per row and per column.
Where this lives today
The Leibniz formula underlies the theoretical definition of the determinant used throughout Existence and Uniqueness of the Determinant and directly explains why cofactor expansion (see Computing Determinants by Cofactor Expansion) works: expanding along a row is exactly grouping the Leibniz terms according to the value (or for any fixed row ), factoring out the common entry , and recognizing the remaining sum as a smaller determinant. It also gives the cleanest proof that determinant is multiplicative in spirit, motivating Multiplicativity of the Determinant, since both and can be expanded and compared permutation-by-permutation. Beyond pure linear algebra, the formula appears in multivariable calculus as the Jacobian determinant governing change-of-variables in integrals, in differential geometry as the volume form on a manifold, and in combinatorics as the prototype relating determinants to permanents (relevant to counting perfect matchings in bipartite graphs). In physics, the Leibniz sum underlies the Slater determinant construction in quantum mechanics, encoding the antisymmetry (Pauli exclusion) of fermionic wavefunctions — the alternating sign structure is not incidental but is the mathematical expression of antisymmetrization. In computer science and cryptography, understanding the growth of the Leibniz sum explains why determinant computation is implemented via Gaussian elimination () rather than direct summation, and permanent computation (the unsigned analogue) is known to be #P-hard, a foundational result in computational complexity theory that hinges on exactly the contrast highlighted in the counterexample above.
Ask the tutor: How does grouping the Leibniz sum by one row's chosen column turn into the cofactor expansion formula, step by step?
Let be an matrix over a field (or commutative ring) . Let denote the symmetric group on , and for let denote its Sign of a permutation. The Leibniz formula asserts
Each summand is called a permutation term: it picks exactly one entry from each row , in column , so that across all factors every row index and every column index appears exactly once.
Intuition
Think of choosing entries from the matrix, one per row, so that no two chosen entries share a column. Such a choice is precisely a bijection from rows to columns, i.e., a permutation : row contributes its entry in column . Multiplying the chosen entries and summing over all such choices, with a sign attached to each choice according to how many transpositions the permutation represents, produces the determinant. The sign is not a bookkeeping nuisance; it is what makes the sum detect linear dependence. If two rows of are equal, the permutation terms pair up: for every there is a partner (where is the transposition swapping the two equal-row indices) contributing the same product but the opposite sign, so everything cancels. This cancellation is exactly the alternating property of the determinant, seen combinatorially. For , there are only permutations: the identity, contributing with sign , and the transposition , contributing with sign . This recovers the familiar formula .
Central theorem
Let be a field and let be the unique function satisfying: 1. Multilinearity: is linear in each row separately (fixing the other rows). 2. Alternation: whenever two rows of are equal. 3. Normalization: , where is the identity matrix. (This function exists and is unique — see Existence and Uniqueness of the Determinant.) Then for every ,
We use the proof technique of expanding by multilinearity in each row against the standard basis, then invoking alternation to kill degenerate terms.
Step 1: Write each row in the standard basis. Let be the standard basis vectors of . Denote by the -th row of . Then
Let denote the determinant viewed as a function of the row vectors; this is legitimate since is defined on matrices, and a matrix is exactly an ordered -tuple of rows.
Step 2: Expand using multilinearity in the first row, then the second, and so on. By linearity in the first argument,
Now expand in the second slot inside each term, and continue through all rows. Because is linear in each row independently (multilinearity, hypothesis 1, applied times, once per row), the fully expanded sum is
This is a sum over all functions , i.e., over all tuples , not yet restricted to permutations.
Step 3: Alternation kills every non-injective tuple. Suppose is not injective, so for some . Then the tuple of vectors has two equal entries (the -th and -th, both equal to ). By hypothesis 2 (alternation), applied to the matrix whose rows are ,
Hence every term in the sum from Step 2 with a repeated vanishes. The only surviving terms are those where is a bijection , that is, a permutation with for all . Therefore
Step 4: Evaluate using alternation and normalization. We show for every . First, recall the standard fact (part of the theory of Sign of a permutation) that any permutation can be written as a product of transpositions, , and that ; while is not unique, its parity is, so is well defined. Claim: swapping two rows of any matrix negates . Let be a matrix and let be obtained from by swapping rows and (). Consider the matrix obtained from by replacing both row and row with (i.e., every row equals in positions ). By alternation, . Expand by multilinearity in rows and separately (all other rows fixed):
where the first and fourth terms each have a repeated row, hence vanish by alternation. This leaves
i.e., , where is with rows swapped. This proves the claim. Now apply the claim inductively. The identity permutation gives by hypothesis 3. If is a product of transpositions, then is obtained from by performing the corresponding row swaps (applying the transpositions to the row-index positions, in the appropriate order corresponding to how permutation composition acts on row slots). Each swap negates by the claim, so after swaps,
This value is independent of the particular factorization into transpositions since is well-defined (a fact already established for the sign function, assumed known here).
Step 5: Conclude. Substituting the result of Step 4 into the sum from Step 3,
This holds for an arbitrary matrix , completing the proof.
∎For every , .
Write with . By the theorem,
Reindex the product: set , so , and as ranges over so does (since is a bijection). Thus . Also , because if then , a product of the same number of transpositions, so both have sign . Hence
As ranges over all of , so does (inversion is a bijection ), so relabeling the summation index by gives
Worked examples
Example 1: A generic matrix (all entries distinct, no special structure). Let
There are permutations of . We list each as , its sign, and its permutation term :
| type | term | ||
|---|---|---|---|
| identity | |||
| transposition of | |||
| transposition of | |||
| 3-cycle | |||
| 3-cycle | |||
| transposition of |
Applying signs and summing:
Cross-check by cofactor expansion along the first row, which is justified because it is exactly a regrouping of this same Leibniz sum by the value of :
Both methods agree: .
Example 2: A matrix with a zero, to show how zeros prune the sum. Let
Direct Leibniz summation requires all permutations in principle, but any that selects a zero entry contributes , so we only need permutations avoiding the zero positions: [row 1, col 3], [row 2, col 1], [row 3, col 2] and [row 3, col 4], [row 4, col 3]. Zero positions: . A permutation (written as ) survives only if , , , , . The condition forces . Case : remaining values for with (automatic, already used), . So , , and gets the leftover of .
- : .
- : .
Case : remaining values for with (automatic), , (automatic). So .
- : leftover for : or .
- : leftover for : or .
So the surviving permutations are:
Now compute sign and term for each (entries of : ): 1. : this is the 4-cycle sending , fixing ; as a permutation it's a 3-cycle on times identity on , which is even, . Term: . 2. : check parity by counting inversions of the sequence : pairs out of order: (4,3),(4,1),(4,2),(3,1),(3,2) — that's 5 inversions, in order (since at correct relative spots — recompute carefully. Inversions of sequence (pairs with entryentry): (1,2):4>3 ✓; (1,3):4>1 ✓; (1,4):4>2 ✓; (2,3):3>1 ✓; (2,4):3>2 ✓; (3,4):1<2 ✗. Total 5 inversions, odd, . Term: . 3. : identity, . Term: . 4. : sequence ; inversions: (1,2):4>2✓;(1,3):4>3✓;(1,4):4>1✓;(2,3):2<3✗;(2,4):2>1✓;(3,4):3>1✓. Total 5, odd, . Term: . 5. : sequence ; inversions: (1,2):1<4✗;(1,3):1<3✗;(1,4):1<2✗;(2,3):4>3✓;(2,4):4>2✓;(3,4):3>2✓. Total 3, odd, . Term: . 6. : sequence ; inversions: (1,2):2<4✗;(1,3):2<3✗;(1,4):2>1✓;(2,3):4>3✓;(2,4):4>1✓;(3,4):3>1✓. Total 4, even, . Term: . Sum with signs:
Cross-check by expanding along row 3, which has entries :
(Signs from cofactor pattern for row 3, positions 1 and 3, are and ; let's redo carefully with correct cofactor signs.) Cofactor expansion along row 3: where is the minor deleting row 3, column .
- : .
= delete row 3, col 1: , det . Contribution: .
- : , contributes .
- : .
= delete row 3, col 3: , det . Contribution: .
- : , contributes .
Total: . Both methods agree: .
The Leibniz theorem's proof crucially used alternation to force rather than always . Suppose instead we define, in imitation of the formula but without signs, the permanent
This still uses every permutation and every entry exactly as before, only omitting . We show is not alternating, so it cannot equal the determinant, illustrating why the sign hypothesis (equivalently, alternation) is essential. Take
which has two equal rows, so by alternation. But
Thus : the unsigned sum fails to vanish on a matrix with a repeated row, precisely because without the sign the two permutation terms and reinforce instead of canceling. This shows the sign function is not a cosmetic feature of the Leibniz formula but is forced by the alternating property that defines the determinant in the first place.
Scope, edge cases & common traps
| Situation | What happens | Why |
|---|---|---|
| , only one permutation (identity), sign . | has one element. | |
| Any row or column all zero | . | Every permutation term contains a factor from that row (or, via transpose invariance, that column), which is . |
| Matrix over a general commutative ring, not just a field | Formula still holds verbatim; multilinearity, alternation, normalization are ring-module statements. | Proof used only additive/multiplicative structure and does not need division. |
| Confusing "sum over all functions " with "sum over permutations" | Leads to spurious extra terms. | Only bijective index choices survive; all others vanish by alternation (Step 3 of the proof). |
| Using the formula for numerical computation with large | Computationally intractable: terms. | Cofactor expansion or row reduction is used in practice; the Leibniz formula is a structural/theoretical tool, not an algorithm. |
The mathematician behind it
Origins · 1 minGottfried Wilhelm Leibniz and how this was discovered
Leibniz is best known as co-inventor of calculus, but he also conducted early systematic investigations into systems of linear equations and what we now call determinants, working these out in correspondence rather than in a single published treatise. His notation and philosophical ambitions for a universal symbolic calculus ("characteristica universalis") shaped how he approached elimination and combinatorial patterns in coefficients, anticipating the permutation-sum structure that today bears his name.
Why does the Leibniz formula have terms and not fewer?
Each term corresponds to a way of selecting one matrix entry from every row so that no two selected entries share a column — equivalently, a bijection from row indices to column indices. The number of bijections from an -element set to itself is , since there are choices for where row maps, remaining choices for row , and so on. No smaller count is possible if every such selection is to be represented, since the alternation property (proved via multilinearity and the vanishing of terms with repeated rows in the standard-basis expansion) allows precisely the bijective selections to survive and forces all of them to appear with a definite sign.
Is the Leibniz formula ever used to actually compute determinants by hand or by computer?
By hand, it is practical only for very small (typically ), because the number of terms grows factorially: , , . In practice, both hand computation and software use Gaussian elimination (row reduction to triangular form, tracking sign changes and pivots) with roughly arithmetic operations, or cofactor expansion for small structured matrices. The Leibniz formula's main role is theoretical: it proves the determinant is a well-defined polynomial in the entries, justifies transpose invariance, and provides the combinatorial language (permutations, signs) used to prove other determinant identities rigorously.
How does the Leibniz formula relate to cofactor expansion along a row?
Fix a row index, say row . Group the Leibniz sum by the value , the column chosen in row . For each fixed , summing over all with and factoring out yields exactly times times the determinant of the submatrix obtained by deleting row and column (the "minor"). Summing over recovers the cofactor expansion formula. This regrouping argument is the rigorous justification for cofactor expansion, developed fully in Computing Determinants by Cofactor Expansion.
Does the Leibniz formula work over rings that are not fields, such as the integers?
Yes. The proof only uses the additive and multiplicative structure of a commutative ring: multilinearity (distributing sums and scaling by ring elements), alternation, and the ring's multiplicative identity for normalization. No division, inversion, or field-specific property is invoked anywhere in the derivation. Consequently the Leibniz formula, and the determinant itself, are defined and behave identically over any commutative ring, which is essential for applications such as determinants of integer matrices in number theory and lattice theory.
Why is the permanent (the unsigned version) not equal to the determinant, and why does that matter?
The permanent drops the sign from every term. As the counterexample shows, this destroys the alternating property: a matrix with two identical rows has permanent generally nonzero (e.g., permanent for a matrix with det ), even though its determinant is forced to vanish. This matters because the two functions, despite looking almost identical combinatorially, have vastly different computational complexity: determinants are computable in polynomial time via elimination, while computing permanents is #P-hard in general (a foundational hardness result in complexity theory), showing that the innocuous-looking sign is responsible for an enormous computational simplification.
What role does the sign of a permutation play beyond just "+1 or −1 bookkeeping"?
The sign function is a group homomorphism (from to the multiplicative group ), which is exactly what makes the swap-negation argument in the proof consistent: composing two odd permutations gives an even one, matching how two row swaps return you to a determinant of the same sign as before both swaps. This homomorphism property is what allows the inductive argument in the theorem's proof (Step 4) to give a well-defined value regardless of which sequence of transpositions is used to build .
Can the Leibniz formula be used to prove the determinant is a polynomial with integer coefficients in the matrix entries?
Yes, directly. The formula expresses as a finite sum, over the permutations, of terms , each of which is a monomial of degree in the entries with coefficient . Since a finite sum of integer-coefficient monomials is by definition a polynomial with integer coefficients, is manifestly such a polynomial, of total degree , in the entries of . This is precisely why the determinant is a continuous (indeed, smooth, real-analytic) function of the matrix entries, a fact used throughout matrix analysis and differential geometry.