Why Row Reduction Helps
Cofactor expansion can become lengthy as a matrix grows, especially when many entries are nonzero. Row reduction offers another route: convert a square matrix to upper triangular form, where the determinant is the product of the diagonal entries, while keeping track of how each row operation changes the determinant. The reduction is useful only if that bookkeeping is accurate; the triangular matrix alone does not generally have the same determinant as the original.
Throughout, matrices are square matrices over \(\mathbb{R}\). An upper triangular matrix is a matrix whose entries below the main diagonal are all zero. For example, the entry in row \(i\), column \(j\) must be zero whenever \(i>j\). The three elementary row operations are swapping two rows, multiplying one row by a nonzero scalar, and adding a multiple of one row to another. Their determinant effects are different.
In particular, a row replacement is not a scaling: it leaves the determinant unchanged even when the added multiple is large. A row scaling has an effect that must be reversed when recovering the original determinant. We will record each operation as it is performed instead of trying to reconstruct the changes at the end.
The Triangular Form and the Bookkeeping Rule
Proof. By the Leibniz formula, \(\det\mathbf{U}\) is a sum over permutations \(\pi\) of \(\{1,\dots,n\}\). A term can be nonzero only if every factor \(u_{i,\pi(i)}\) is not below the diagonal, so \(\pi(i)\ge i\) for every \(i\). But \(\sum_{i=1}^n\pi(i)=\sum_{i=1}^n i\), since \(\pi\) is a permutation. Therefore the nonnegative differences \(\pi(i)-i\) sum to zero, which forces \(\pi(i)=i\) for every \(i\). Only the identity permutation can contribute, and its term is \(u_{11}u_{22}\cdots u_{nn}\). This argument also covers a zero diagonal entry: in that case the sole possible term is zero. \(\square\)
The row-operation effects give a compact rule for the full reduction. Suppose a sequence of row operations changes \(\mathbf{A}\) into an upper triangular matrix \(\mathbf{U}\). Let \(s\) be the number of swaps, and let \(q_1,\dots,q_m\) be the nonzero scalars used in row scalings. Row replacements contribute no factor. Then
Proof. The formula follows by applying the stated determinant effect at each step. A swap contributes a factor of \(-1\), a scaling by \(q_j\) contributes \(q_j\), and every row replacement contributes \(1\). Multiplying these factors in sequence gives \(\det\mathbf{U}=(-1)^s(q_1\cdots q_m)\det\mathbf{A}\). Each scaling factor is nonzero, so division by the total factor is valid. The triangular determinant theorem then supplies \(\det\mathbf{U}\) from the diagonal. \(\square\)
Row reduction can be arranged to reach upper triangular form without dividing by zero. Scan columns from left to right, keeping track of the next row in which a pivot can be placed. If that column has a nonzero entry in or below that row, swap one such entry into the pivot position and use row replacements to make the entries beneath it zero. If the column has no such entry, leave it and continue to the next column. The column is already zero from the active pivot row downward. This process produces zeros below the diagonal, even when some columns are skipped.
Worked Reductions
Worked Example: A Swap Changes the Sign
Compute the determinant of \(\mathbf{A}=\begin{bmatrix}0&2&1\\1&1&0\\2&3&4\end{bmatrix}\) by row reduction.
The first entry is zero, so swap rows 1 and 2 to obtain a nonzero first pivot. This swap reverses the sign of the determinant. Then use row replacements to clear the entries below the first and second pivots:
The final matrix is upper triangular, so its determinant is \(1\cdot2\cdot\frac72=7\). There was one swap and no scaling, so \(\det\mathbf{U}=-\det\mathbf{A}\). Hence \(\det\mathbf{A}=-7\).
Check: Expanding the original matrix along its first row gives \(\det\mathbf{A}=-2(4-0)+(3-2)=-8+1=-7\), in agreement with the reduction.
Worked Example: A Row Scaling Must Be Reversed
Compute the determinant of \(\mathbf{A}=\begin{bmatrix}2&4&2\\1&3&5\\3&2&1\end{bmatrix}\). Scale the first row by \(\frac12\), then use row replacements to eliminate entries beneath the pivots:
The two row replacements do not change the determinant. The first row was scaled by \(\frac12\), so \(\det\mathbf{U}=\frac12\det\mathbf{A}\). The triangular determinant is \(1\cdot1\cdot14=14\). Therefore \(\det\mathbf{A}=2\cdot14=28\).
Check: Expansion along the first row of the original matrix gives \(2(3-10)-4(1-15)+2(2-9)=-14+56-14=28\). The scale factor has been reversed correctly.
Worked Example: When a Pivot Column Has No Pivot
Compute the determinant of \(\mathbf{A}=\begin{bmatrix}1&2&0\\2&4&1\\3&6&5\end{bmatrix}\). First clear the entries below the first pivot:
In column 2, the entries in rows 2 and 3 are both zero, so there is no pivot available in that column. Do not divide by a zero pivot. Move to column 3 instead; the entry in row 2 is \(1\), and the final row replacement clears the entry beneath it. The resulting matrix is upper triangular, with diagonal entries \(1,0,0\). All operations were row replacements, so the determinant was unchanged. Thus \(\det\mathbf{A}=1\cdot0\cdot0=0\).
Check: Cofactor expansion along the first row of the original matrix gives \((4\cdot5-1\cdot6)-2(2\cdot5-1\cdot3)=14-14=0\).
Common Pitfalls
Forgetting a swap changes the sign. In the first example, the upper triangular matrix has diagonal product \(7\). A tempting but incorrect calculation is to report \(\det\mathbf{A}=7\), as though all row operations preserve determinants. The correction is to record the swap: \(\det\mathbf{U}=-\det\mathbf{A}\), so the original determinant is \(-7\).
Do not treat a row scaling as a row replacement. In the second example, the final determinant \(14\) belongs to a matrix whose first row was scaled by \(\frac12\). It is therefore \(\frac12\det\mathbf{A}\), not \(\det\mathbf{A}\). Recovering the original determinant requires multiplying \(14\) by \(2\).
A zero pivot is not permission to divide by zero. If no nonzero entry can be moved into the active pivot position from below, skip that column and continue. A zero diagonal entry in the resulting upper triangular matrix makes the determinant zero; the triangular determinant theorem justifies that conclusion without any division.
A useful ledger is a short record written beside the matrix: count the swaps, list every row-scaling factor, and mark row replacements as determinant-preserving. When no row scaling is used, the only correction needed after multiplying the diagonal is the sign \((-1)^s\). When scalings are used, include their product as well.
Check Your Understanding
For each question, keep a determinant ledger and justify the final diagonal product.
- Reduce \(\begin{bmatrix}0&1\\2&3\end{bmatrix}\) to upper triangular form and compute its determinant, recording the swap.
- Suppose a reduction uses two swaps and scales one row by \(3\), with all other operations being row replacements. If the final triangular determinant is \(-18\), what was the original determinant?
- Explain why a column with no nonzero entry at or below the active pivot row should be skipped rather than used as a pivot.
- Reduce \(\begin{bmatrix}1&2&1\\2&4&3\\0&1&1\end{bmatrix}\) to upper triangular form and track the determinant through each operation.
- State why the determinant of an upper triangular matrix is the product of its diagonal entries, including the case in which a diagonal entry is zero.