Determinants and volume
Define the determinant as a signed volume scaling, derive its key properties, and tie det=0 to singularity.
A linear map distorts space: it might expand, contract, or collapse it. The determinant is the number that measures that distortion. It is a single scalar that encodes whether a matrix is invertible and by how much it scales volumes.
Definition via volume
For a square matrix , the determinant (also written ) is the signed volume of the parallelepiped spanned by the column vectors of , relative to the unit cube's volume of [1].
Two properties characterize the determinant completely (up to normalization):
- Multilinearity in each column. Scaling one column by scales the determinant by . Splitting a column into a sum of two columns splits the determinant into a sum of two determinants.
- Alternating. Swapping any two columns changes the sign of the determinant.
The normalization (the identity does not distort volume) pins it down. From these three requirements, one can derive the cofactor-expansion formula and every other property.
Key properties
Product rule:[2]
Derivation. Both sides depend multilinearly on the columns of and . The cleanest proof uses the fact that any matrix is a product of elementary matrices (row operations), whose determinants multiply; here we state it as the fundamental multiplicativity law.
Transpose:
So everything that holds for columns holds for rows: swapping rows changes sign, scaling a row scales the determinant, and a zero row gives .
Triangular matrices: (the product of diagonal entries). Follows from multilinearity and alternating: off-diagonal entries in a triangular matrix contribute zero.
Block diagonal: .
Determinant = 0 means singular
if and only if the columns of are linearly dependent, i.e. the map collapses into a lower-dimensional subspace. The collapsed image has zero -dimensional volume, so the determinant (a volume scale factor) is zero. A matrix with nonzero determinant is invertible (or nonsingular), and
The sign and magnitude read off directly from what the map does to area in :
- doubles each axis, so it scales area by : the unit square maps to a square.
- A shear slants the square into a parallelogram of the same base and height, so : area is untouched even though the shape is not.
- squeezes one axis to half, so : area halved.
- A reflection preserves area but flips orientation, so : the negative sign is the orientation reversal, not a smaller area. A rotation, which neither stretches nor flips, has at every angle.
- The singular sends both columns onto the same line, collapsing the square to a segment of zero area: .
Computing the determinant
For :
For , the cofactor expansion along column gives a recursion:
where is the determinant of the matrix obtained by deleting row and column . This is naively, but the LU factorization computes the determinant in as the product of the LU diagonal entries (with sign from the row-swap parity).
Check it on arrays
import numpy as np
A = np.array([[2.0, 1.0, 0.0],
[1.0, 3.0, 1.0],
[0.0, 1.0, 2.0]])
d = np.linalg.det(A)
print(f"det(A) = {d:.6f}") # should be 2*5-1*2 = 8 (cofactor along row 1)
# Product rule: det(AB) = det(A)*det(B)
B = np.array([[1.0, 2.0, 0.0],
[0.0, 1.0, 3.0],
[2.0, 0.0, 1.0]])
print(f"det(A)*det(B) = {d * np.linalg.det(B):.6f}")
print(f"det(A@B) = {np.linalg.det(A @ B):.6f}") # same
# Singular matrix: det = 0
C = np.array([[1.0, 2.0, 3.0],
[2.0, 4.0, 6.0],
[1.0, 0.0, 1.0]])
print(f"det(C) = {np.linalg.det(C):.2e}") # ~0 (row 2 = 2*row 1)
# Triangular: det = product of diagonal
T = np.array([[3.0, 1.0, 5.0],
[0.0, 2.0, 7.0],
[0.0, 0.0, 4.0]])
print(f"det(T) = {np.linalg.det(T):.4f}") # 3*2*4 = 24
print(f"diagonal product = {3*2*4}")The product rule holds to floating-point precision; the singular matrix gives a determinant near zero; the triangular matrix matches its diagonal product.
Exercises
Exercise 1. Compute by hand the determinant of using cofactor expansion along the first row.
Solution
Step 1. Cofactor expansion along row : , where each is the minor obtained by deleting row and column .
Step 2. The minors: , , and the term drops out.
Step 3. Combine: .
Exercise 2. Using only multilinearity, the alternating property, and , prove that a matrix with two equal columns has determinant .
Solution
Step 1. Suppose columns and are equal, . The alternating property says swapping two columns flips the sign of the determinant. Swap columns and .
Step 2. Because the two columns are identical, the matrix after the swap is the same matrix, so its determinant is unchanged. The swap therefore gives both (from alternating) and (the matrix is unchanged).
Step 3. From we get , hence . This is why a matrix with linearly dependent columns, of which equal columns are the simplest case, has determinant zero.
Exercise 3 (code). A determinant is multiplied by when the whole matrix is scaled by (each of the columns contributes one factor of by multilinearity). Verify this for a random matrix and , and confirm the orientation-reversal fact that swapping two columns flips the sign of the determinant.
Solution
import numpy as np
rng = np.random.default_rng(0)
A = rng.normal(size=(4, 4))
n, c = 4, 3.0
# Scaling the whole matrix by c multiplies det by c**n.
assert np.isclose(np.linalg.det(c * A), c**n * np.linalg.det(A))
# Swapping two columns flips the sign of the determinant.
A_swapped = A[:, [1, 0, 2, 3]]
assert np.isclose(np.linalg.det(A_swapped), -np.linalg.det(A))
print("c**n factor:", c**n) # 81
print("det(A):", round(np.linalg.det(A), 6))The determinant of equals times , one factor of per column, and the single column swap negates the determinant exactly as the alternating property requires.
With the determinant linking to singularity, the next lesson asks: which vectors does only scale, without rotating?
References
- [1]Strang, G. (2016). Introduction to Linear Algebra (5th ed.). Wellesley-Cambridge Press. The determinant as a signed volume and its role in invertibility.↩
- [2]Axler, S. (2015). Linear Algebra Done Right (3rd ed.), ch. 10. Springer. The multilinear-alternating characterization and the product rule (doi:10.1007/978-3-319-11080-6).↩