TL;DR
The determinant of a square matrix is a single number that summarises it. It tells you by what factor the matrix scales areas or volumes, whether it flips orientation (a mirror image), and whether the matrix can be undone at all. A determinant of zero means the matrix squashes space onto something flatter, and information is lost.
Where you'll see it: in checking whether a system of linear equations has exactly one solution, in finding eigenvalues, and in the normalising constant of a multivariate Gaussian.
Intuition
Area under a transformation
Take the unit square, the square with corners at , , and . A Matrix with columns and carries each point of that square to a new point. The square becomes a parallelogram. Its area is , and that is exactly the absolute value of the determinant of the matrix. The determinant is the area scaling factor of the transformation.
Why do we need such a number? Because many questions are really questions about how a map changes size. Does a system of equations have a unique answer? Does a change of coordinates stretch an integral's area element? Those questions depend only on the scaling factor, not on the details of the matrix, so one number is enough to answer them.
The sign carries information too. A positive determinant means the transformation keeps the orientation of the plane: a shape you draw counter-clockwise stays counter-clockwise. A negative determinant means the shape has been flipped, like a reflection in a mirror. A determinant of zero means the parallelogram has collapsed onto a line or a point, so its area is zero.
The plot below shows this collapse for the matrix with rows and . Its determinant is . The two columns become parallel exactly when .
- det of the matrix with rows (1, x) and (x, 1)
The math
Definition
The determinant of an matrix with entries (row , column ) is
The sum runs over all permutations of the numbers , that is, over all ways of reordering them. The sign is if can be reached from the identity order by an even number of swaps of two entries, and if it takes an odd number.
Read the formula as a recipe. Pick one entry from each row, making sure no two picks share a column. Multiply the picks together. Add up all such products, each with a plus or minus sign depending on the permutation.
For there are two permutations: the identity, with sign , which picks , and the swap, with sign , which picks . So for a matrix
For there are six terms. Nobody computes large determinants this way, but the definition is the one that makes all the properties below follow.
Cofactor expansion
Let be the minor of : the matrix left after deleting row and column . Then for any fixed row ,
This reduces an determinant to determinants of size . It is the hand method for small matrices.
How row operations change the determinant
These three facts drive almost every calculation.
- Swapping two rows multiplies the determinant by .
- Multiplying one row by a number multiplies the determinant by .
- Adding a multiple of one row to another row leaves the determinant unchanged.
Use the third rule to clear entries below the diagonal. The matrix becomes upper triangular, and the determinant of a triangular matrix is simply the product of its diagonal entries.
Products, transposes and inverses
For matrices and , and a number :
If is invertible, then . The product rule is the reason the determinant behaves like a size: applying two maps in turn multiplies their scaling factors.
Invertibility test
is invertible exactly when . Equivalent statements: the columns of are linearly independent (none is a combination of the others), and the system has exactly one solution for every . When the determinant is nonzero, Cramer's rule gives that solution explicitly: , where is with column replaced by .
Eigenvalues
A number is an eigenvalue of exactly when is not invertible, which means
Expanding this gives a polynomial in whose roots are the eigenvalues. This is how eigenvalues are found by hand. See Eigenvalues and Eigenvectors.
Volume and change of variables
is the factor by which multiplies volume in any dimension. For a nonlinear change of coordinates, the same role is played by the determinant of the Jacobian matrix, evaluated locally. Example 3 below uses this.
Worked examples
Let .
- Identify , , , .
- Compute .
- Simplify: .
So . The matrix doubles areas and keeps orientation, because the sign is positive. It is invertible, because the determinant is not zero.
Let . Expand along the first row.
- The first row is , so .
- Delete row 1 and column 1 to get , with determinant .
- Delete row 1 and column 2 to get , with determinant .
- The third term is multiplied by , so it vanishes.
- Combine: .
So scales volume by , keeps orientation, and is invertible.
Write a point in the plane as , . The Jacobian matrix of this map is
- Compute .
- Simplify: .
- Use : .
So a small patch of area in polar coordinates corresponds to area in the plane. This is why integrals in polar coordinates carry an extra factor of .
Tradeoffs and failure modes
Use the determinant to answer yes or no questions about invertibility and scaling. For computing with large matrices, reach for other tools.
| Situation | What goes wrong | Better choice |
|---|---|---|
| Computing of a matrix bigger than about with the definition or cofactors | The work grows like , which is hopeless quickly | LU decomposition: row reduce, then multiply the pivots, about operations |
| Solving by Cramer's rule for | Needs determinants and is numerically unstable | LU or QR factorisation, then back-substitution |
| Judging a matrix as nearly singular by a tiny determinant | Scale matters: , so with the identity has determinant even though it is perfectly invertible | Condition number, or the smallest singular value |
| Multiplying many entries to get a large determinant | The product overflows or underflows in floating point | Work with the log of the absolute value, summing logs of the pivots, and track the sign separately |
| Testing whether a measured matrix is exactly singular | Measured numbers almost never give exactly zero | Numerical rank with a tolerance, from the SVD |
History
Determinants appeared before matrices did. Seki Takakazu in Japan developed them for solving systems of equations around the 1680s, and Gottfried Leibniz in Europe worked on the same idea in the 1690s. Gabriel Cramer published his rule for solving linear systems in 1750. In 1812 Augustin-Louis Cauchy gave the word "determinant" its modern meaning and proved the product rule . Matrices became objects in their own right later, in the 1850s, when Cayley and Sylvester developed their theory.
The determinant caught on because it packed a yes or no question about solvability into one formula, and because it tied algebra to geometry. Once calculus moved to several variables, the determinant of the Jacobian became the rule for changing coordinates, and it has stayed in use ever since.
Check yourself
QuestionWhat is the determinant of the 2 by 2 matrix with rows (a, b) and (c, d)?Show answer
. Multiply the main diagonal entries and subtract the product of the off-diagonal entries.
QuestionCompute the determinant of the matrix with rows (4, 7) and (2, 6).Show answer
. The matrix scales area by 10 and keeps orientation.
QuestionWhy does swapping two rows change the sign of the determinant, but adding a multiple of one row to another does not?Show answer
Swapping rows reorders the permutations in the definition, and each swap of two positions flips the sign of a permutation. For a matrix you can see it directly: swapping the rows of gives . Adding a multiple of one row to another leaves the area of the parallelogram unchanged, because the parallelogram is sheared (slid sideways) with the same base and height, so the determinant is unchanged.
QuestionA 3 by 3 matrix A has determinant 0. What does this tell you about the system A x = b, and why?Show answer
is not invertible, so its columns are linearly dependent. Then there is a nonzero vector with , so if has one solution it has infinitely many. For other choices of there is no solution at all. In either case the system does not have exactly one solution.
QuestionA 3 by 3 matrix A has determinant 4. What is the determinant of 2A?Show answer
. Each of the three rows is doubled, and each doubling multiplies the determinant by 2.
Sources
- Determinant (Wikipedia)
- Gilbert Strang, Introduction to Linear Algebra, Wellesley-Cambridge Press: https://math.mit.edu/~gs/linearalgebra/
- Sheldon Axler, Linear Algebra Done Right, Springer: https://linear.axler.net/