Cofactor expansion is slow for big matrices. Row reduction from echelon form is fast, and the determinant changes in a simple, predictable way under each row operation.
| Row operation | Effect on the determinant |
|---|---|
| Replacement: add a multiple of one row to another | No change |
| Interchange: swap two rows | Multiplied by $-1$ |
| Scaling: multiply one row by $k$ | Multiplied by $k$ |
Why it works
Worked example: Determinant by row reduction
- $R_{1} \leftrightarrow R_{2}$ to get a nonzero pivot: the determinant flips sign. $\begin{bmatrix} 1 & 3 & 5 \\ 0 & 2 & 4 \\ 2 & 1 & -1 \end{bmatrix}$
- $R_{3} \to R_{3} - 2R_{1}$ and then $R_{3} \to R_{3} + \frac{5}{2}R_{2}$ (replacements, no change): $\begin{bmatrix} 1 & 3 & 5 \\ 0 & 2 & 4 \\ 0 & 0 & -1 \end{bmatrix}$
- Triangular, so its determinant is $1 \cdot 2 \cdot (-1) = -2$.
- Undo the one swap: $\det C = -(-2) = 2$.
Answer: $2$
This gives a fast method for any size: row reduce to an echelon form $U$ using replacements and swaps only. If you made $r$ swaps, then $\det A$ is $(-1)^{r}$ times the product of the diagonal entries of $U$. For a $20 \times 20$ matrix that is a few thousand arithmetic steps instead of the $20!$ terms of cofactor expansion.
Products, transposes and inverses
- $\det(AB) = (\det A)(\det B)$.
- $\det A^{T} = \det A$, so everything said about rows holds for columns too.
- $A$ is invertible exactly when $\det A \neq 0$, and then $\det A^{-1} = \dfrac{1}{\det A}$ (from $\det A \cdot \det A^{-1} = \det I = 1$).
- For an $n \times n$ matrix, $\det(kA) = k^{n}\det A$: every one of the $n$ rows is scaled by $k$.
Worked example: Combining the rules
- $\det(2A^{T}B^{-1}) = 2^{3}\det(A^{T}B^{-1})$, since $2A^{T}B^{-1}$ is $3 \times 3$.
- $\det(A^{T}B^{-1})$ $= \det A^{T}\cdot\det B^{-1}$ $= 2 \cdot \left(-\frac{1}{5}\right)$ $= -\frac{2}{5}$.
- Total: $8 \cdot \left(-\frac{2}{5}\right) = -\frac{16}{5}$.
Answer: $-\frac{16}{5}$
Common mistake
Key idea