Key Properties
Row Operations: The Three-Rule Table
Every hand solution is a sequence of legal moves, so the effects deserve one clean summary. A swap of two rows flips the sign. Multiplying one row by a nonzero constant multiplies the determinant by . Adding a multiple of one row to another leaves the determinant unchanged — this is the only move that is free, which is why it does all the heavy lifting: use it to create zeros, then expand along the row that became sparse. The same three rules hold for columns, courtesy of .
| Move | Effect on | Typical use |
|---|---|---|
| interchange two rows | sign flips | pull a zero or a simple row into position |
| multiply one row by | multiplies by | rarely used directly; track the factor carefully |
| unchanged | create zeros before expanding | |
| transpose | unchanged | convert row work into column work |
Example: Use Properties
Prove that .
Cofactor Expansion With Real Numbers
When properties alone do not reduce the matrix enough, expansion finishes the job. Expanding along a row with the most zeros, the determinant equals the alternating sum of entries times their cofactors: , where is the minor obtained by deleting row and column . For the matrix
the first column holds a zero, so expand along it: . Had we expanded along the full first row instead, the arithmetic would have been three minors instead of two — same answer, more work.
Triangular Matrices: The One-Line Determinant
A triangular matrix — zeros below the diagonal (lower) or above the diagonal (upper) — has determinant equal to the product of its diagonal entries. That single fact turns any square matrix into a one-line computation: sweep with free row additions to clear the lower triangle, track every swap and every scalar multiplication you performed, and multiply the pivots at the end. Row reduction to triangular form is exactly how computer algebra systems evaluate large determinants in practice, because it costs a cubic number of operations instead of the factorial growth of a naive cofactor expansion.
Verifying Properties in Python
A pure-Python determinant with exact fractions lets you test every property from the table on the same matrix, which is faster and more reliable than trusting a single hand computation.
from fractions import Fraction
def det3(M):
a, b, c = M[0]
d, e, f = M[1]
g, h, i = M[2]
return a * (e * i - f * h) - b * (d * i - f * g) + c * (d * h - e * g)
M = [[2, 1, 3], [0, 4, 5], [1, 2, 6]]
print(det3(M)) # 21
# one row interchange flips the sign
print(det3([[0, 4, 5], [2, 1, 3], [1, 2, 6]])) # -21
# scaling a single row by 7 multiplies the determinant by 7
print(det3([[2 * 7, 1 * 7, 3 * 7], [0, 4, 5], [1, 2, 6]])) # 147
# R1 -> R1 + 3*R2 leaves the determinant alone
added = [[2 + 3 * 0, 1 + 3 * 4, 3 + 3 * 5], [0, 4, 5], [1, 2, 6]]
print(det3(added)) # 21
# identical rows give zero
print(det3([[1, 2, 3], [1, 2, 3], [4, 5, 6]])) # 0
The reduction approach — clear everything below the diagonal while tracking sign and scale factors — generalises to any size, which is what the second script does.
from fractions import Fraction
def det_general(M):
A = [[Fraction(x) for x in row] for row in M]
n, sign = len(A), 1
for col in range(n):
pivot = next((r for r in range(col, n) if A[r][col] != 0), None)
if pivot is None:
return 0 # a whole column cleared: singular matrix
if pivot != col:
A[col], A[pivot] = A[pivot], A[col]
sign = -sign # remember the row interchange
for r in range(col + 1, n):
factor = A[r][col] / A[col][col]
for c in range(col, n):
A[r][c] -= factor * A[col][c]
det = sign
for i in range(n):
det *= A[i][i] # product of the pivots
return det
print(det_general([[2, 1, 3], [0, 4, 5], [1, 2, 6]])) # 21
print(det_general([[1, 2], [3, 4]])) # -2
print(det_general([[1, 2, 3], [2, 4, 6], [1, 1, 1]])) # 0 (row 2 is twice row 1)
Important Results
The Multiplicative Property and the kA Trap
Determinants turn matrix multiplication into ordinary multiplication: whenever both matrices are . It follows that , that when the inverse exists, and that — the exponent appears because the whole matrix scaled, unlike the single-row rule. Concretely, if and for matrices, then but . Confusing these two scalings is one of the most common exam slips, and the numeric pair above is the quickest way to catch yourself.
Cramer's Rule
For the system and :
Common Mistakes
Multiplying one row by k and leaving the determinant unchanged, or scaling the whole matrix by k and multiplying the determinant by only k
Fix: One row scaled by k multiplies the determinant by k; the whole n by n matrix scaled by k multiplies it by k to the power n.
Adding a row swap to a row scaling and forgetting to track the accumulated sign change
Fix: Keep a running sign counter: every interchange multiplies it by minus one, every scalar multiple multiplies the determinant, and free row additions do nothing.
Applying Cramer's rule after the coefficient determinant evaluates to zero
Fix: Compute the coefficient determinant first; if it vanishes, switch to elimination and classify the system as inconsistent or underdetermined.
Key Takeaways
- Row interchanges flip the sign, single-row scalings multiply by the constant, and adding a multiple of one row to another is free — the workhorse move for creating zeros.
- Expanding along the sparsest row or reducing to triangular form both beat blind cofactor expansion; triangular determinants are just the product of the diagonal.
- The multiplicative law |AB| = |A||B| coexists with the scaling law |kA| = k^n |A|; the two are distinct and frequently confused.
- Cramer's rule solves a system with determinants only when the coefficient determinant is nonzero; otherwise the system needs elimination instead.