From Permutations to Determinant Terms
The Leibniz formula evaluates a determinant by considering every way to choose one entry from each row and one from each column. Each choice is encoded by a permutation: the value \(\sigma(i)\) tells us which column to choose in row \(i\). The resulting product is included with a sign determined by the permutation. For small matrices, especially when many entries are zero, this gives a direct way to organize a computation without expanding along a row or column.
For a permutation written as a tuple \((\sigma(1),\dots,\sigma(n))\), an inversion is a pair of positions \(i<j\) for which \(\sigma(i)>\sigma(j)\). A permutation is even if it has an even number of inversions, and odd if it has an odd number. Its sign, written \(\operatorname{sgn}(\sigma)\), is \(1\) when it is even and \(-1\) when it is odd.
The calculation has two distinct tasks. First, determine which permutations contribute nonzero products; a product is zero if even one of its selected entries is zero. Second, assign the correct sign to each surviving product. Keeping these tasks separate helps prevent sign errors. When there are few zero entries, all the products may need to be calculated; when the matrix is sparse, it is often possible to discard most permutations quickly.
Counting and Grouping the Signs
For a \(3\times3\) matrix there are \(3!=6\) permutations: three even and three odd. For a \(4\times4\) matrix there are \(4!=24\): twelve even and twelve odd. The equality of the two sign counts is not a coincidence.
Proof. Fix the transposition \(\tau\) that swaps \(1\) and \(2\) and leaves all other numbers unchanged. Pair each permutation \(\sigma\) with \(\tau\circ\sigma\). Composing with a transposition reverses the sign of a permutation, so one member of each pair is even and the other is odd. No permutation is paired with itself: if \(\tau\circ\sigma=\sigma\), then composing on the right with \(\sigma^{-1}\) would give \(\tau\) equal to the identity, which it is not. The pairing covers all of \(S_n\), since applying \(\tau\) a second time returns \(\sigma\). Hence the permutations split into pairs with opposite signs, and the two sign counts are equal. \(\square\)
This count is useful for checking an organized list: for \(3\times3\), each sign group must contain three permutations; for \(4\times4\), each must contain twelve. It does not mean that the positive and negative numerical contributions have equal totals. Their products depend on the entries of the matrix, and their difference is the determinant.
The Six Terms for a \(3\times3\) Matrix
For three rows, the even permutations are \((1,2,3)\), \((2,3,1)\), and \((3,1,2)\). The odd permutations are \((3,2,1)\), \((2,1,3)\), and \((1,3,2)\). Substituting their products into the formula gives the familiar six-term expression, with the positive and negative groups kept visibly separate.
For example, \((2,3,1)\) has two inversions, since \(2>1\) and \(3>1\), so its term is positive. The tuple \((3,2,1)\) has three inversions, so its term is negative. Counting inversions directly is a dependable method when a permutation is not immediately recognizable.
Worked Example: A \(3\times3\) Determinant by Sign Groups
Evaluate the determinant, grouping the terms by permutation sign.
The three even permutations contribute \(1\cdot1\cdot0=0\), \(2\cdot4\cdot5=40\), and \(3\cdot0\cdot6=0\). The three odd permutations contribute \(3\cdot1\cdot5=15\), \(2\cdot0\cdot0=0\), and \(1\cdot4\cdot6=24\). Therefore
Check: Expanding along the first row, using the cofactor expansion method, gives \(1(1\cdot0-4\cdot6)-2(0\cdot0-4\cdot5)+3(0\cdot6-1\cdot5)=-24+40-15=1\), in agreement.
Finding the Surviving Terms for a \(4\times4\) Matrix
A direct \(4\times4\) calculation has 24 possible products, but zeros can rule out most of them. In a permutation tuple, every column number must appear exactly once. To find the nonzero terms, list the available columns in each row, then retain only the tuples that make a valid permutation. For each surviving tuple, count its inversions before evaluating the product.
Worked Example: A Sparse \(4\times4\) Determinant
Evaluate
Row 1 can use columns \(1,2,4\); row 2 can use columns \(2,3\); row 3 can use columns \(1,3,4\); and row 4 can use columns \(1,4\). Requiring each column to occur exactly once leaves only four tuples: \((1,2,3,4)\), \((4,2,3,1)\), \((2,3,1,4)\), and \((2,3,4,1)\). Every other permutation selects a zero entry in at least one row.
The tuple \((1,2,3,4)\) has no inversions, so its contribution is \(1\cdot1\cdot1\cdot2=2\). The tuple \((4,2,3,1)\) has five inversions: the \(4\) precedes three smaller entries, and both \(2\) and \(3\) precede the final \(1\). Its contribution is therefore negative: \(-\bigl(1\cdot1\cdot1\cdot1\bigr)=-1\). The tuple \((2,3,1,4)\) has two inversions, so its contribution is \(2\cdot3\cdot2\cdot2=24\). The tuple \((2,3,4,1)\) has three inversions, so its contribution is \(-\bigl(2\cdot3\cdot1\cdot1\bigr)=-6\). Summing these contributions gives
Check: Expanding along row 2, whose entries are \(0,1,3,0\), gives the \(3\times3\) determinants \(\det\begin{bmatrix}1&0&1\\2&1&1\\1&0&2\end{bmatrix}=2-1=1\) and \(\det\begin{bmatrix}1&2&1\\2&0&1\\1&0&2\end{bmatrix}=-6\). The row-2 signs are positive for column 2 and negative for column 3, so the result is \(1-3(-6)=19\), as calculated from permutations.
Proof. The Leibniz formula includes one term for every permutation in \(S_n\). Each permutation chooses exactly one column in each row, and because it is a permutation, the chosen columns are all distinct and together use every column exactly once. Thus the formula accounts for every allowed selection once and only once. If a selected product contains a zero entry, the product is zero and contributes nothing to the sum. Every other term must be included with the sign specified by that permutation. Removing only zero terms therefore leaves the determinant unchanged, which justifies the procedure. \(\square\)
Symbolic Entries and Cancellation
Permutation terms can also be useful when entries contain a parameter. In that setting, careful grouping matters because terms may cancel. The calculation still follows the same rule: write each product, assign its sign, and only then collect like terms.
Worked Example: A Parameter in a \(3\times3\) Matrix
Evaluate the determinant as a function of \(t\in\mathbb{R}\).
The even-permutation terms are \(1\cdot(1+t)\cdot(1+t)=(1+t)^2\), \(1\cdot1\cdot1=1\), and \(1\cdot1\cdot1=1\). The odd-permutation terms are \(1\cdot(1+t)\cdot1=1+t\), \(1\cdot1\cdot(1+t)=1+t\), and \(1\cdot1\cdot1=1\). Hence
Expanding \((1+t)^2=1+2t+t^2\), the expression becomes \(1+2t+t^2+2-2-2t-1=t^2\). Check: Expansion along the first row gives \(\bigl((1+t)^2-1\bigr)-\bigl((1+t)-1\bigr)+\bigl(1-(1+t)\bigr) =(2t+t^2)-t-t=t^2\).
When Is the Formula Practical?
The number of terms grows as \(n!\): there are \(6\) terms for a \(3\times3\) matrix, \(24\) for a \(4\times4\) matrix, and \(120\) for a \(5\times5\) matrix. This rapid growth limits the usefulness of listing every term for larger matrices. Even for a \(4\times4\) matrix, writing out all 24 products can be cumbersome when most entries are nonzero.
Direct permutation evaluation is most practical when the matrix is small or when zeros leave only a few possible nonzero products. For a \(3\times3\) matrix, all six terms are usually manageable. For a sparse \(4\times4\) matrix, first identifying the feasible permutations can make the calculation shorter and easier to audit. When a row or column has few nonzero entries, cofactor expansion—studied earlier—may be more efficient. The key is to choose a method that reduces the work without losing track of the signs.
Common mistake: assigning a sign by appearance. In the first worked example, the permutation \((3,2,1)\) has three inversions, so its term \(3\cdot1\cdot5=15\) must be subtracted. If it is mistakenly added, the calculation becomes \(40+15-24=31\), not \(1\). Counting the inversions gives the correction: three is odd, so the term has sign \(-1\). A useful check is to group all terms first and then verify that each permutation’s sign agrees with its inversion count.
Check Your Understanding
Use the Leibniz formula in each question, keeping the permutation signs visible.
- For the permutation \((3,1,2)\), count the inversions and state its sign.
- Write the six signed terms in the Leibniz formula for a general \(3\times3\) matrix.
- For the matrix in the sparse \(4\times4\) worked example, explain why \((1,2,3,4)\) contributes a nonzero term.
- How many even and odd permutations are there in \(S_4\)?
- For which matrix sizes is direct listing of every permutation term most practical, and why does sparsity help?