The Determinant
A single number that measures how a linear map scales volume and whether it is invertible.
What it measures
The determinant of a square matrix A, written det(A) or |A|, is a scalar that reports the signed volume scaling factor of the linear transformation A. If A maps the unit cube to a shape of volume V, then |det(A)| = V. A negative sign indicates the transformation flips orientation; a determinant of zero means the transformation collapses space into a lower dimension.
Key properties
- det(I) = 1
- det(AB) = det(A) det(B)
- det(A^T) = det(A)
- det(A^{-1}) = 1 / det(A)
- swapping two rows negates the determinant
- det is linear in each row separately
Small cases
For a 2-by-2 matrix the determinant is ad - bc. For 3-by-3, the rule of Sarrus expands into six signed products. In general the Leibniz formula sums n! signed products, which is far too expensive; determinants are computed instead from an LU factorization as the product of the pivots, at cubic cost.
Invertibility test
A matrix is invertible if and only if its determinant is nonzero. However, the determinant is a poor numerical measure of how close a matrix is to singular, because it scales with the size of the entries. The condition number is the reliable indicator; a matrix can have a tiny determinant yet be well conditioned, or a large determinant yet be nearly singular.
import numpy as np
A = np.array([[1.0, 2.0], [3.0, 4.0]])
print(np.linalg.det(A)) # -2.0
# sign, logdet is safer for large matrices
sign, logdet = np.linalg.slogdet(A)
print(sign, logdet)
Determinants appear in changes of variables for integrals through the Jacobian, and in physics whenever a coordinate transform must preserve or track volume, such as phase-space arguments in kinetic plasma models.