Defining Properties#
The determinant of a square matrix , written or , packages invertibility, orientation, and volume scaling into one scalar. No formula is needed to define it: three rules completely determine on every matrix, and every other property — the cofactor formula, the product of pivots — follows from them.
Rule 1 — Identity. The determinant of the identity is one:
The standard basis has unit volume and the standard orientation, so the number assigned to is .
Rule 2 — Row exchange. Swapping any two rows of multiplies the determinant by :
An even number of swaps leaves the sign unchanged; an odd number flips it.
Rule 3 — Linearity in each row. If you fix every row except row , the map that sends that row to is linear. Explicitly: if row is a sum , then is the sum of the two determinants obtained by putting or in row (other rows fixed). Scaling row by a scalar multiplies by .
These three rules are the whole axiomatic definition. From them you can derive further facts without a closed formula:
- If two rows are equal, (swap them and Rule 2 says the determinant equals its own negative).
- Adding a multiple of one row to another leaves unchanged (linearity plus the equal-row fact).
- A zero row forces (scale that row by ).
- if and only if is singular (not invertible) — elimination will produce a zero pivot, which we connect next.
The same three rules can be stated for columns instead of rows: the determinant is multilinear and alternating in the columns, and .
Determinant from Pivots#
Week 3 turned into an upper triangular matrix by elimination. Each elementary step either leaves the determinant unchanged or multiplies it by a known factor, so you can read off the pivots.
Recall the operations and their effect on :
| Elimination step | Effect on |
|---|---|
| Subtract a multiple of one row from another | No change |
| Swap two rows | Multiply by |
| Scale a row by | Multiply by (we rarely scale rows during plain elimination) |
After elimination without scaling, is upper triangular with the pivots on the diagonal. For a triangular matrix the determinant is the product of the diagonal entries (expand along the first column, or use multilinearity on the standard basis). Therefore
where the sign is raised to the number of row exchanges performed during elimination. Equivalently, if with a permutation matrix, then
since for unit lower triangular , and according as is an even or odd permutation.
Worked . For , elimination subtracts times row 1 from row 2 (no swap) and produces pivots and . So
The classical formula gives , matching.
Zero pivot means zero determinant. If elimination cannot produce a full set of nonzero pivots (even after all useful row exchanges), some diagonal entry of is zero, the product of pivots is zero, and . That is the algebraic test for singularity: is invertible if and only if .
The pivot product is the fastest way to compute a determinant for a small system you are eliminating anyway. The next section develops a recursive formula that requires no elimination first.
Cofactor Expansion#
The cofactor expansion (Laplace expansion) expresses as a weighted sum of determinants of smaller matrices. Fix the first row for concreteness. For an matrix ,
where the cofactor of entry is
and the minor is the determinant of the matrix obtained by deleting row and column of . The sign pattern is the checkerboard of and starting with in the top-left corner.
You may expand along any row or column :
Choose a row or column with many zeros to shorten the arithmetic.
Full example. Expand
along the first row:
The third term is zero because . The remaining cofactors are
So
Check via pivots. Eliminate without row swaps: subtract times row 1 from row 2 to get ; then add times the new row 2 to row 3. The pivots are , , and , and , matching the cofactor result.
Cofactor expansion is if applied naively to large ; for computation prefer elimination (product of pivots). For theory and small hand calculations — and for the characteristic polynomial in Week 9 — expansion is the right tool.
Compute det([[1,2,0],[3,1,1],[0,2,1]]) by cofactor expansion along the first row.
Cramer's Rule#
Cramer's rule solves a square system when is invertible, by writing each unknown as a ratio of two determinants. For each index , form the matrix by replacing column of with the right-hand side . Then
The formula follows from column multilinearity. The identity reads , so the -th column of is that linear combination. Expand in that column by multilinearity: every term carries a repeated column except the one containing , and repeated columns give determinant zero, leaving .
Worked . Solve
We already have . Replace column 1 with :
so . Replace column 2 with :
so . Check: .
When to use it. Cramer's rule is excellent for systems and for theoretical arguments that need an explicit formula for . For it is usually slower than elimination: you compute determinants instead of one factorization. If , the rule does not apply — the system has either no solution or infinitely many, which Week 5 will classify by rank.
Determinant as Volume#
The defining rules stop being arbitrary once you read them geometrically. If the columns of an matrix are vectors in , they span a parallelepiped (a parallelogram when ), and the absolute value of the determinant is the volume of that solid:
(The same statement holds with rows instead of columns.) The sign of encodes orientation: positive means the ordered basis has the same orientation as the standard basis; negative means it is mirrored (an odd number of reflections or row/column swaps).
The columns of span a parallelogram of area . The determinant is the factor by which scales every area (and, in , every volume).
Unit cube. The columns of are the standard unit vectors, which span the unit cube of volume , matching .
Axis-aligned box. If
the columns are edge vectors of lengths , , and along the coordinate axes. The box volume is , and .
Linear maps scale volume. Tile any region with tiny parallelepipeds: multiplies each piece's volume by , so it multiplies the total by the same factor. Applying to any region therefore scales its -dimensional volume by . In particular, if , the image of the unit cube is flattened into a lower-dimensional set of volume zero — the columns are linearly dependent, and is singular. That is the geometric reason a zero determinant means “no inverse”: you cannot reverse a map that has crushed volume to zero.
The volume picture returns in change-of-variables formulas (Jacobians) and in densities over configuration spaces. Algebraically, the same scalar reappears in Week 9 as the constant term of the characteristic polynomial .
Knowledge check#
Swapping two rows of a matrix does what to its determinant?
Browser lab: determinant as volume#
Compute a determinant, verify the row-swap sign flip, and use it as a volume.
import numpy as np
A = np.array([[1., 2., 0.],
[3., 1., 1.],
[0., 2., 1.]])
print("det(A) =", np.linalg.det(A))
A_swapped = A.copy()
A_swapped[[0, 1]] = A_swapped[[1, 0]]
print("det after row swap =", np.linalg.det(A_swapped))
edges = np.array([[1., 0., 0.],
[0., 2., 0.],
[0., 0., 3.]])
print("box volume via det =", abs(np.linalg.det(edges)))
print("Notice: det(A) = -7 flips to +7 after the row swap, and the box volume is 6.")
Done when#
You can compute a 3×3 determinant by cofactor expansion, state the sign change produced by a row swap, and read as a volume scale factor. Check it against the browser lab: for the given A the printed determinant is -7, the row-swapped matrix prints +7, and the box with edges 1, 2, 3 prints a volume of 6.
Further Reading#
- Strang, Introduction to Linear Algebra: Chapters 5.1–5.3 cover determinant properties, cofactor expansion, and the pivot formula in detail, with extensive exercises.
- 3Blue1Brown, Essence of Linear Algebra: The "Determinant" video provides a geometric intuition — the determinant as area/volume scaling and the sign as orientation.
- Axler, Linear Algebra Done Right: Chapter 10 defines the determinant without any reliance on matrices via alternating multilinear forms, complementing the coordinate-heavy approach taken here.