The determinant of an matrix is defined by
where the sum is over all permutations ) of the sequence and is the number of inversions in , that is, the number of pairs with . Each term in the sum is a signed product of entries of and the product contains one entry taken from each row and one from each column.
The determinant is sometimes written with vertical bars, as .
Three fundamental properties are
The first property is immediate, the second can be proved using properties of permutations, and the third is proved in texts on linear algebra and matrix theory.
An alternative, recursive expression for the determinant is the Laplace expansion
for any , where denotes the submatrix of obtained by deleting row and column , and for a scalar . This formula is called the expansion by minors because is a minor of .
For some types of matrices the determinant is easy to evaluate. If is triangular then . If is unitary then implies on using (3) and (4). An explicit formula exists for the determinant of a Vandermonde matrix.
The determinant of is connected with the eigenvalues of via the property . Since the eigenvalues are the roots of the characteristic polynomial , this relation follows by setting in the expression
For , the determinant is
but already for the determinant is tedious to write down. If one must compute , the formulas (1) and (5) are too expensive unless is very small: they have an exponential cost. The best approach is to use a factorization of involving factors that are triangular or orthogonal, so that the determinants of the factors are easily computed. If is an LU factorization, with a permutation matrix, unit lower triangular, and upper triangular, then . As this expression indicates, the determinant is prone to overflow and underflow in floating-point arithmetic, so it may be preferable to compute .
The determinant features in the formula
for the inverse, where is the adjugate of (recall that has element ). More generally, Cramer’s rule says that the components of the solution to a linear system are given by , where denotes with its th column replaced by . While mathematically elegant, Cramer’s rule is of no practical use, as it is both expensive and numerically unstable in finite precision arithmetic.
A celebrated bound for the determinant of a Hermitian positive definite matrix is Hadamard’s inequality. Note that for such , is real and positive (being the product of the eigenvalues, which are real and positive) and the diagonal elements are also real and positive (since ).
Theorem 1 (Hadamard’s inequality). For a Hermitian positive definite matrix ,
with equality if and only if is diagonal.
Theorem 1 is easy to prove using a Cholesky factorization.
The following corollary can be obtained by applying Theorem 1 to or by using a QR factorization of .
Corollary 2. For ,
with equality if and only if the columns of are orthogonal.
Obviously, one can apply the corollary to and obtain the analogous bound with column norms replaced by row norms.
The determinant of can be interpreted as the volume of the parallelepiped , whose sides are the columns of . Corollary 2 says that for columns of given lengths the volume is maximized when the columns are orthogonal.
Nearness to Singularity and Conditioning
The determinant characterizes nonsingularity: is singular if and only if . It might be tempting to use as a measure of how close a nonsingular matrix is to being singular, but this measure is flawed, not least because of the sensitivity of the determinant to scaling. Indeed if is unitary then can be given any value by a suitable choice of , yet is perfectly conditioned: , where is the condition number.
To deal with the poor scaling one might normalize the determinant: in view of Corollary 2,
satisfies and if and only if the columns of are orthogonal. Birkhoff (1975) calls the Hadamard condition number. In general, is not related to the condition number , but if has columns of unit -norm then it can be shown that (Higham, 2002, Prob. 14.13). Dixon (1984) shows that for classes of random matrices that include matrices with elements independently drawn from a normal distribution with mean , the probability that the inequality
holds tends to as for any , so for large . This exponential growth is much faster than the growth of , for which Edelman (1998) showed that for the standard normal distribution, , where denotes the mean value. This MATLAB example illustrates these points.
>> rng(1); n = 50; A = randn(n); >> psi = prod(sqrt(sum(A.*A)))/abs(det(A)), kappa2 = cond(A) psi = 5.3632e+10 kappa2 = 1.5285e+02 >> ratio = psi/(n^(0.25)*exp(n/2)) ratio = 2.8011e-01
The relative distance from to the set of singular matrices is equal to the reciprocal of the condition number.
Theorem 3 (Gastinel, Kahan). For and any subordinate matrix norm,
Determinants came before matrices, historically. Most linear algebra textbooks make significant use of determinants, but a lot can be done without them. Axler (1995) shows how the theory of eigenvalues can be developed without using determinants.
Determinants have little application in practical computations, but they are a useful theoretical tool in numerical analysis, particularly for proving nonsingularity.
There is a large number of formulas and identities for determinants. Sir Thomas Muir collected many of them in his five-volume magnum opus The Theory of Determinants in the Historical Order of Development, published between 1890 and 1930. Brualdi and Schneider (1983) give concise derivations of many identities using Gaussian elimination, bringing out connections between the identities.
The quantity obtained by modifying the definition (1) of determinant to remove the term is the permanent. The permanent arises in combinatorics and quantum mechanics and is much harder to compute than the determinant: no algorithm is known for computing the permanent in operations for a polynomial .
This is a minimal set of references, which contain further useful references within.
- Sheldon Axler, Down With Determinants!, Amer. Math. Monthly 102, 139–154, 1995.
- Garrett Birkhoff, Two Hadamard Numbers for Matrices, Comm. ACM 18, 25–29, 1975.
- Richard Brualdi and Hans Schneider, Determinantal Identities: Gauss, Schur, Cauchy, Sylvester, Kronecker, Jacobi, Binet, Laplace, Muir, and Cayley, Linear Algebra Appl. 52–53, 769–791, 1983.
- John Dixon, How Good is Hadamard’s Inequality for Determinants?, Canadian Math. Bulletin 27, 260–264, 1984.
- Alan Edelman, Eigenvalues and Condition Numbers of Random Matrices, SIAM J. Matrix Anal. Appl. 9(4), 543–560, 1988.
- Nicholas J. Higham, Accuracy and Stability of Numerical Algorithms, second edition, Society for Industrial and Applied Mathematics, Philadelphia, PA, USA, 2002.
Related Blog Posts
- The Strange Case of the Determinant of a Matrix of 1s and -1s by Nick Higham and Alan Edelman (2017)
- What Is a Vandermonde Matrix? (2021)
- What Is the Adjugate of a Matrix? (2020)
This article is part of the “What Is” series, available from https://nhigham.com/category/what-is and in PDF form from the GitHub repository https://github.com/higham/what-is.