11.6: A.6- Determinant
-
- Last updated
- Save as PDF
For square matrices we define a useful quantity called the determinant . Define the determinant of a \(1 \times 1\) matrix as the value of its only entry \[\det \left( \begin{bmatrix} a \end{bmatrix} \right) \overset{\text{def}}{=} a . \nonumber \] For a \(2 \times 2\) matrix, define \[\det \left( \begin{bmatrix} a & b \\ c & d \end{bmatrix} \right) \overset{\text{def}}{=} ad-bc . \nonumber \] Before defining the determinant for larger matrices, we note the meaning of the determinant. An \(n \times n\) matrix gives a mapping of the \(n\)-dimensional euclidean space \({\mathbb{R}}^n\) to itself. So a \(2 \times 2\) matrix \(A\) is a mapping of the plane to itself. The determinant of \(A\) is the factor by which the area of objects changes. If we take the unit square (square of side 1) in the plane, then \(A\) takes the square to a parallelogram of area \(\lvert\det(A)\rvert\). The sign of \(\det(A)\) denotes a change of orientation (negative if the axes get flipped). For example, let \[A = \begin{bmatrix} 1 & 1 \\ -1 & 1 \end{bmatrix} . \nonumber \] Then \(\det(A) = 1+1 = 2\). Let us see where \(A\) sends the unit square—the square with vertices \((0,0)\), \((1,0)\), \((0,1)\), and \((1,1)\). The point \((0,0)\) gets sent to \((0,0)\). \[\begin{bmatrix} 1 & 1 \\ -1 & 1 \end{bmatrix} \begin{bmatrix} 1 \\ 0 \end{bmatrix} = \begin{bmatrix} 1 \\ -1 \end{bmatrix} , \qquad \begin{bmatrix} 1 & 1 \\ -1 & 1 \end{bmatrix} \begin{bmatrix} 0 \\ 1 \end{bmatrix} = \begin{bmatrix} 1 \\ 1 \end{bmatrix} , \qquad \begin{bmatrix} 1 & 1 \\ -1 & 1 \end{bmatrix} \begin{bmatrix} 1 \\ 1 \end{bmatrix} = \begin{bmatrix} 2 \\ 0 \end{bmatrix} . \nonumber \] The image of the square is another square with vertices \((0,0)\), \((1,-1)\), \((1,1)\), and \((2,0)\). The image square has a side of length \(\sqrt{2}\), and it is therefore of area \(2\). See Figure \(\PageIndex{1}\).
In general, the image of a square is going to be a parallelogram. In high school geometry, you may have seen a formula for computing the area of a with vertices \((0,0)\), \((a,c)\), \((b,d)\) and \((a+b,c+d)\). The area is \[\left\lvert \, \det \left( \begin{bmatrix} a & b \\ c & d \end{bmatrix} \right) \, \right\lvert = \lvert a d - b c \rvert . \nonumber \] The vertical lines above mean absolute value. The matrix \(\left[ \begin{smallmatrix} a & b \\ c & d \end{smallmatrix} \right]\) carries the unit square to the given parallelogram.
There are a number of ways to define the determinant for an \(n \times n\) matrix. Let us use the so-called cofactor expansion . We define \(A_{ij}\) as the matrix \(A\) with the \(i^{\text{th}}\) row and the \(j^{\text{th}}\) column deleted. For example, if \[\text{If} \qquad A = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{bmatrix} , \qquad \text{then} \qquad A_{12} = \begin{bmatrix} 4 & 6 \\ 7 & 9 \end{bmatrix} \qquad \text{and} \qquad A_{23} = \begin{bmatrix} 1 & 2 \\ 7 & 8 \end{bmatrix} . \nonumber \] We now define the determinant recursively \[\det (A) \overset{\text{def}}{=} \sum_{j=1}^n {(-1)}^{1+j} a_{1j} \det (A_{1j}) , \nonumber \] or in other words \[\det (A) = a_{11} \det (A_{11}) - a_{12} \det (A_{12}) + a_{13} \det (A_{13}) - \cdots \begin{cases} + a_{1n} \det (A_{1n}) & \text{if } n \text{ is odd,} \\ - a_{1n} \det (A_{1n}) & \text{if } n \text{ even.} \end{cases} \nonumber \] For a \(3 \times 3\) matrix, we get \(\det (A) = a_{11} \det (A_{11}) - a_{12} \det (A_{12}) + a_{13} \det (A_{13})\). For example, \[\begin{align}\begin{aligned} \det \left( \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{bmatrix} \right) & = 1 \cdot \det \left( \begin{bmatrix} 5 & 6 \\ 8 & 9 \end{bmatrix} \right) - 2 \cdot \det \left( \begin{bmatrix} 4 & 6 \\ 7 & 9 \end{bmatrix} \right) + 3 \cdot \det \left( \begin{bmatrix} 4 & 5 \\ 7 & 8 \end{bmatrix} \right) \\ & = 1 (5 \cdot 9 - 6 \cdot 8) - 2 (4 \cdot 9 - 6 \cdot 7) + 3 (4 \cdot 8 - 5 \cdot 7) = 0 . \end{aligned}\end{align} \nonumber \] It turns out that we did not have to necessarily use the first row. That is for any \(i\), \[\det (A) = \sum_{j=1}^n {(-1)}^{i+j} a_{ij} \det (A_{ij}) . \nonumber \] It is sometimes useful to use a row other than the first. In the following example it is more convenient to expand along the second row. Notice that for the second row we are starting with a negative sign. \[\begin{align}\begin{aligned} \det \left( \begin{bmatrix} 1 & 2 & 3 \\ 0 & 5 & 0 \\ 7 & 8 & 9 \end{bmatrix} \right) & = - 0 \cdot \det \left( \begin{bmatrix} 2 & 3 \\ 8 & 9 \end{bmatrix} \right) + 5 \cdot \det \left( \begin{bmatrix} 1 & 3 \\ 7 & 9 \end{bmatrix} \right) - 0 \cdot \det \left( \begin{bmatrix} 1 & 2 \\ 7 & 8 \end{bmatrix} \right) \\ & = 0 + 5 (1 \cdot 9 - 3 \cdot 7) + 0 = -60 . \end{aligned}\end{align} \nonumber \] Let us check if it is really the same as expanding along the first row, \[\begin{align}\begin{aligned} \det \left( \begin{bmatrix} 1 & 2 & 3 \\ 0 & 5 & 0 \\ 7 & 8 & 9 \end{bmatrix} \right) & = 1 \cdot \det \left( \begin{bmatrix} 5 & 0 \\ 8 & 9 \end{bmatrix} \right) - 2 \cdot \det \left( \begin{bmatrix} 0 & 0 \\ 7 & 9 \end{bmatrix} \right) + 3 \cdot \det \left( \begin{bmatrix} 0 & 5 \\ 7 & 8 \end{bmatrix} \right) \\ & = 1 (5 \cdot 9 - 0 \cdot 8) - 2 (0 \cdot 9 - 0 \cdot 7) + 3 (0 \cdot 8 - 5 \cdot 7) = -60 . \end{aligned}\end{align} \nonumber \] In computing the determinant, we alternately add and subtract the determinants of the submatrices \(A_{ij}\) multiplied by \(a_{ij}\) for a fixed \(i\) and all \(j\). The numbers \({(-1)}^{i+j}\det(A_{ij})\) are called cofactors of the matrix. And that is why this method of computing the determinant is called the cofactor expansion .
Similarly we do not need to expand along a row, we can expand along a column. For any \(j\), \[\det (A) = \sum_{i=1}^n {(-1)}^{i+j} a_{ij} \det (A_{ij}) . \nonumber \] A related fact is that \[\det (A) = \det (A^T) . \nonumber \] A matrix is upper triangular if all elements below the main diagonal are \(0\). For example, \[\begin{bmatrix} 1 & 2 & 3 \\ 0 & 5 & 6 \\ 0 & 0 & 9 \end{bmatrix} \nonumber \] is upper triangular. Similarly a lower triangular matrix is one where everything above the diagonal is zero. For example, \[\begin{bmatrix} 1 & 0 & 0 \\ 4 & 5 & 0 \\ 7 & 8 & 9 \end{bmatrix} . \nonumber \] The determinant for triangular matrices is very simple to compute. Consider the lower triangular matrix. If we expand along the first row, we find that the determinant is 1 times the determinant of the lower triangular matrix \(\left[ \begin{smallmatrix} 5 & 0 \\ 8 & 9 \end{smallmatrix} \right]\). So the deteriminant is just the product of the diagonal entries: \[\det \left( \begin{bmatrix} 1 & 0 & 0 \\ 4 & 5 & 0 \\ 7 & 8 & 9 \end{bmatrix} \right) = 1 \cdot 5 \cdot 9 = 45 . \nonumber \] Similarly for upper triangular matrices \[\det \left( \begin{bmatrix} 1 & 2 & 3 \\ 0 & 5 & 6 \\ 0 & 0 & 9 \end{bmatrix} \right) = 1 \cdot 5 \cdot 9 = 45 . \nonumber \] In general, if \(A\) is triangular, then \[\det (A) = a_{11} a_{22} \cdots a_{nn} . \nonumber \] If \(A\) is diagonal, then it is also triangular (upper and lower), so same formula applies. For example, \[\det \left( \begin{bmatrix} 2 & 0 & 0 \\ 0 & 3 & 0 \\ 0 & 0 & 5 \end{bmatrix} \right) = 2 \cdot 3 \cdot 5 = 30 . \nonumber \] In particular, the identity matrix \(I\) is diagonal, and the diagonal entries are all 1. Thus, \[\det(I) = 1 . \nonumber \] The determinant is telling you how geometric objects scale. If \(B\) doubles the sizes of geometric objects and \(A\) triples them, then \(AB\) (which applies \(B\) to an object and then it applies \(A\)) should make size go up by a factor of \(6\). This is true in general:
Theorem \(\PageIndex{1}\)
\[\det(AB) = \det(A)\det(B) . \nonumber \]
This property is one of the most useful, and it is employed often to actually compute determinants. A particularly interesting consequence is to note what it means for the existence of inverses. Take \(A\) and \(B\) to be inverses, that is \(AB=I\). Then \[\det(A)\det(B) = \det(AB) = \det(I) = 1 . \nonumber \] Neither \(\det(A)\) nor \(\det(B)\) can be zero. This fact is an extremely useful property of the determinant, and one which is used often in this book:
Theorem \(\PageIndex{2}\)
An \(n \times n\) matrix \(A\) is invertible if and only if \(\det (A) \not= 0\).
In fact, \(\det(A^{-1}) \det(A) = 1\) says that \[\det(A^{-1}) = \frac{1}{\det(A)}. \nonumber \] So we know what the determinant of \(A^{-1}\) is without computing \(A^{-1}\).
Let us return to the formula for the inverse of a \(2 \times 2\) matrix: \[\begin{bmatrix} a & b \\ c & d \end{bmatrix}^{-1} = \frac{1}{ad-bc} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix} . \nonumber \] Notice the determinant of the matrix \([\begin{smallmatrix}a&b\\c&d\end{smallmatrix}]\) in the denominator of the fraction. The formula only works if the determinant is nonzero, otherwise we are dividing by zero.
A common notation for the determinant is a pair of vertical lines: \[\begin{vmatrix} a & b \\ c & d \end{vmatrix} = \det \left( \begin{bmatrix} a & b \\ c & d \end{bmatrix} \right) . \nonumber \] Personally, I find this notation confusing as vertical lines usually mean a positive quantity, while determinants can be negative. Also think about how to write the absolute value of a determinant. This notation is not used in this book.