Sauter au contenu

Section 6.6 Determinant

For square matrices we define a useful quantity called the determinant . We define the determinant of a \(1 \times 1\) matrix as the value of its only entry
\begin{equation*} \det \left( \begin{bmatrix} a \end{bmatrix} \right) \overset{\text{ def } }{=} a\text{.} \end{equation*}
For a \(2 \times 2\) matrix we define
\begin{equation*} \det \left( \begin{bmatrix} a \amp b \\ c \amp d \end{bmatrix} \right) \overset{\text{ def } }{=} ad-bc\text{.} \end{equation*}
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. In particular, 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\text{.}\) The sign of \(\det(A)\) denotes a change of orientation (negative if the axes get flipped). For example, let
\begin{equation*} A = \begin{bmatrix} 1 \amp 1 \\ -1 \amp 1 \end{bmatrix}\text{.} \end{equation*}
Then \(\det(A) = 1+1 = 2\text{.}\) Let us see where \(A\) sends the unit square with vertices \((0,0)\text{,}\) \((1,0)\text{,}\) \((0,1)\text{,}\) and \((1,1)\text{.}\) The point \((0,0)\) gets sent to \((0,0)\text{.}\)
\begin{equation*} \begin{bmatrix} 1 \amp 1 \\ -1 \amp 1 \end{bmatrix} \begin{bmatrix} 1 \\ 0 \end{bmatrix} = \begin{bmatrix} 1 \\ -1 \end{bmatrix} , \qquad \begin{bmatrix} 1 \amp 1 \\ -1 \amp 1 \end{bmatrix} \begin{bmatrix} 0 \\ 1 \end{bmatrix} = \begin{bmatrix} 1 \\ 1 \end{bmatrix} , \qquad \begin{bmatrix} 1 \amp 1 \\ -1 \amp 1 \end{bmatrix} \begin{bmatrix} 1 \\ 1 \end{bmatrix} = \begin{bmatrix} 2 \\ 0 \end{bmatrix}\text{.} \end{equation*}
The image of the square is another square with vertices \((0,0)\text{,}\) \((1,-1)\text{,}\) \((1,1)\text{,}\) and \((2,0)\text{.}\) The image square has a side of length \(\sqrt{2}\) and is therefore of area 2. See 6.6.1.
Figure 6.6.1. Image of the unit quare via the mapping \(A\text{.}\)
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 parallelogram with vertices \((0,0)\text{,}\) \((a,c)\text{,}\) \((b,d)\) and \((a+b,c+d)\text{.}\) The area is
\begin{equation*} \left\lvert \, \det \left( \begin{bmatrix} a \amp b \\ c \amp d \end{bmatrix} \right) \, \right\lvert = \lvert a d - b c \rvert\text{.} \end{equation*}
The vertical lines above mean absolute value. The matrix \(\left[ \begin{matrix}a \amp b \\ c \amp d \end{matrix} \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
\begin{equation*} \text{ If } \qquad A = \begin{bmatrix} 1 \amp 2 \amp 3 \\ 4 \amp 5 \amp 6 \\ 7 \amp 8 \amp 9 \end{bmatrix} , \qquad \text{ then } \qquad A_{12} = \begin{bmatrix} 4 \amp 6 \\ 7 \amp 9 \end{bmatrix} \qquad \text{ and } \qquad A_{23} = \begin{bmatrix} 1 \amp 2 \\ 7 \amp 8 \end{bmatrix}\text{.} \end{equation*}
We now define the determinant recursively
\begin{equation*} \det (A) \overset{\text{ def } }{=} \sum_{j=1}^n {(-1)}^{1+j} a_{1j} \det (A_{1j})\text{,} \end{equation*}
or in other words
\begin{equation*} \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}) \amp \text{ if } n \text{ is odd, } \\ - a_{1n} \det (A_{1n}) \amp \text{ if } n \text{ even. } \end{cases} \end{equation*}
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})\text{.}\) For example,
\begin{equation*} \begin{split} \det \left( \begin{bmatrix} 1 \amp 2 \amp 3 \\ 4 \amp 5 \amp 6 \\ 7 \amp 8 \amp 9 \end{bmatrix} \right) \amp = 1 \cdot \det \left( \begin{bmatrix} 5 \amp 6 \\ 8 \amp 9 \end{bmatrix} \right) - 2 \cdot \det \left( \begin{bmatrix} 4 \amp 6 \\ 7 \amp 9 \end{bmatrix} \right) + 3 \cdot \det \left( \begin{bmatrix} 4 \amp 5 \\ 7 \amp 8 \end{bmatrix} \right) \\ \amp = 1 (5 \cdot 9 - 6 \cdot 8) - 2 (4 \cdot 9 - 6 \cdot 7) + 3 (4 \cdot 8 - 5 \cdot 7) = 0 . \end{split} \end{equation*}
It turns out that we did not have to necessarily use the first row. That is for any \(i\text{,}\)
\begin{equation*} \det (A) = \sum_{j=1}^n {(-1)}^{i+j} a_{ij} \det (A_{ij})\text{.} \end{equation*}
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{equation*} \begin{split} \det \left( \begin{bmatrix} 1 \amp 2 \amp 3 \\ 0 \amp 5 \amp 0 \\ 7 \amp 8 \amp 9 \end{bmatrix} \right) \amp = - 0 \cdot \det \left( \begin{bmatrix} 2 \amp 3 \\ 8 \amp 9 \end{bmatrix} \right) + 5 \cdot \det \left( \begin{bmatrix} 1 \amp 3 \\ 7 \amp 9 \end{bmatrix} \right) - 0 \cdot \det \left( \begin{bmatrix} 1 \amp 2 \\ 7 \amp 8 \end{bmatrix} \right) \\ \amp = 0 + 5 (1 \cdot 9 - 3 \cdot 7) + 0 = -60 . \end{split} \end{equation*}
Let us check if it is really the same as expanding along the first row,
\begin{equation*} \begin{split} \det \left( \begin{bmatrix} 1 \amp 2 \amp 3 \\ 0 \amp 5 \amp 0 \\ 7 \amp 8 \amp 9 \end{bmatrix} \right) \amp = 1 \cdot \det \left( \begin{bmatrix} 5 \amp 0 \\ 8 \amp 9 \end{bmatrix} \right) - 2 \cdot \det \left( \begin{bmatrix} 0 \amp 0 \\ 7 \amp 9 \end{bmatrix} \right) + 3 \cdot \det \left( \begin{bmatrix} 0 \amp 5 \\ 7 \amp 8 \end{bmatrix} \right) \\ \amp = 1 (5 \cdot 9 - 0 \cdot 8) - 2 (0 \cdot 9 - 0 \cdot 7) + 3 (0 \cdot 8 - 5 \cdot 7) = -60 . \end{split} \end{equation*}
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\text{.}\) 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\)
\begin{equation*} \det (A) = \sum_{i=1}^n {(-1)}^{i+j} a_{ij} \det (A_{ij})\text{.} \end{equation*}
A related fact is that
\begin{equation*} \det (A) = \det (A^T)\text{.} \end{equation*}
A matrix is upper triangular if all elements below the main diagonal are 0. For example,
\begin{equation*} \begin{bmatrix} 1 \amp 2 \amp 3 \\ 0 \amp 5 \amp 6 \\ 0 \amp 0 \amp 9 \end{bmatrix} \end{equation*}
is upper triangular. Similarly a lower triangular matrix is one where everything above the diagonal is zero. For example,
\begin{equation*} \begin{bmatrix} 1 \amp 0 \amp 0 \\ 4 \amp 5 \amp 0 \\ 7 \amp 8 \amp 9 \end{bmatrix}\text{.} \end{equation*}
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{matrix}5 \amp 0 \\ 8 \amp 9 \end{matrix} \right]\text{.}\) So the deteriminant is just the product of the diagonal entries:
\begin{equation*} \det \left( \begin{bmatrix} 1 \amp 0 \amp 0 \\ 4 \amp 5 \amp 0 \\ 7 \amp 8 \amp 9 \end{bmatrix} \right) = 1 \cdot 5 \cdot 9 = 45\text{.} \end{equation*}
Similarly for upper triangular matrices
\begin{equation*} \det \left( \begin{bmatrix} 1 \amp 2 \amp 3 \\ 0 \amp 5 \amp 6 \\ 0 \amp 0 \amp 9 \end{bmatrix} \right) = 1 \cdot 5 \cdot 9 = 45\text{.} \end{equation*}
In general, if \(A\) is triangular, then
\begin{equation*} \det (A) = a_{11} a_{22} \cdots a_{nn}\text{.} \end{equation*}
If \(A\) is diagonal, then it is also triangular (upper and lower), so same formula applies. For example,
\begin{equation*} \det \left( \begin{bmatrix} 2 \amp 0 \amp 0 \\ 0 \amp 3 \amp 0 \\ 0 \amp 0 \amp 5 \end{bmatrix} \right) = 2 \cdot 3 \cdot 5 = 30\text{.} \end{equation*}
In particular, the identity matrix \(I\) is diagonal, and the diagonal entries are all 1. Thus,
\begin{equation*} \det(I) = 1\text{.} \end{equation*}
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\text{.}\) This is true in general:
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 existence of inverses. Take \(A\) and \(B\) to be inverses, that is \(AB=I\text{.}\) Then
\begin{equation*} \det(A)\det(B) = \det(AB) = \det(I) = 1\text{.} \end{equation*}
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:
In fact, \(\det(A^{-1}) \det(A) = 1\) says that
\begin{equation*} \det(A^{-1}) = \frac{1}{\det(A)}\text{.} \end{equation*}
So we know what the determinant of \(A^{-1}\) is without computing \(A^{-1}\text{.}\)
Let us return to the formula for the inverse of a \(2 \times 2\) matrix:
\begin{equation*} \begin{bmatrix} a \amp b \\ c \amp d \end{bmatrix}^{-1} = \frac{1}{ad-bc} \begin{bmatrix} d \amp -b \\ -c \amp a \end{bmatrix}\text{.} \end{equation*}
Notice the determinant of the matrix \([\begin{matrix}a\amp b\\c\amp d \end{matrix} ]\) 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{equation*} \begin{vmatrix} a \amp b \\ c \amp d \end{vmatrix} = \det \left( \begin{bmatrix} a \amp b \\ c \amp d \end{bmatrix} \right)\text{.} \end{equation*}
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.

Exercices Exercices

1.

Compute the determinant of the following matrices:
  1. \(\displaystyle \begin{bmatrix}3 \end{bmatrix}\)
  2. \(\displaystyle \begin{bmatrix}1 \amp 3 \\ 2 \amp 1 \end{bmatrix}\)
  3. \(\displaystyle \begin{bmatrix}2 \amp 1 \\ 4 \amp 2 \end{bmatrix}\)
  4. \(\displaystyle \begin{bmatrix}1 \amp 2 \amp 3 \\ 0 \amp 4 \amp 5 \\ 0 \amp 0 \amp 6 \end{bmatrix}\)
  5. \(\displaystyle \begin{bmatrix}2 \amp 1 \amp 0 \\ -2 \amp 7 \amp -3 \\ 0 \amp 2 \amp 0 \end{bmatrix}\)
  6. \(\displaystyle \begin{bmatrix}2 \amp 1 \amp 3 \\ 8 \amp 6 \amp 3 \\ 7 \amp 9 \amp 7 \end{bmatrix}\)
  7. \(\displaystyle \begin{bmatrix}0 \amp 2 \amp 5 \amp 7 \\ 0 \amp 0 \amp 2 \amp -3 \\ 3 \amp 4 \amp 5 \amp 7 \\ 0 \amp 0 \amp 2 \amp 4 \end{bmatrix}\)
  8. \(\displaystyle \begin{bmatrix}0 \amp 1 \amp 2 \amp 0 \\ 1 \amp 1 \amp -1 \amp 2 \\ 1 \amp 1 \amp 2 \amp 1 \\ 2 \amp -1 \amp -2 \amp 3 \end{bmatrix}\)

2.

For which \(x\) are the following matrices singular (not invertible).
  1. \(\displaystyle \begin{bmatrix}2 \amp 3 \\ 2 \amp x \end{bmatrix}\)
  2. \(\displaystyle \begin{bmatrix}2 \amp x \\ 1 \amp 2 \end{bmatrix}\)
  3. \(\displaystyle \begin{bmatrix}x \amp 1 \\ 4 \amp x \end{bmatrix}\)
  4. \(\displaystyle \begin{bmatrix}x \amp 0 \amp 1 \\ 1 \amp 4 \amp 2 \\ 1 \amp 6 \amp 2 \end{bmatrix}\)

3.

Compute
\begin{equation*} \det \left( \begin{bmatrix} 2 \amp 1 \amp 2 \amp 3 \\ 0 \amp 8 \amp 6 \amp 5 \\ 0 \amp 0 \amp 3 \amp 9 \\ 0 \amp 0 \amp 0 \amp 1 \end{bmatrix}^{-1} \right) \end{equation*}
without computing the inverse.

4.

Suppose
\begin{equation*} L = \begin{bmatrix} 1 \amp 0 \amp 0 \amp 0 \\ 2 \amp 1 \amp 0 \amp 0 \\ 7 \amp \pi \amp 1 \amp 0 \\ 2^8 \amp 5 \amp -99 \amp 1 \end{bmatrix} \qquad \text{ and } \qquad U = \begin{bmatrix} 5 \amp 9 \amp 1 \amp -\sin(1) \\ 0 \amp 1 \amp 88 \amp -1 \\ 0 \amp 0 \amp 1 \amp 3 \\ 0 \amp 0 \amp 0 \amp 1 \end{bmatrix}\text{.} \end{equation*}
Let \(A = LU\text{.}\) Compute \(\det(A)\) in a simple way, without computing what is \(A\text{.}\) Hint: First read off \(\det(L)\) and \(\det(U)\text{.}\)

5.

Consider the linear mapping from \({\mathbb R}^2\) to \({\mathbb R}^2\) given by the matrix \(A = \left[ \begin{matrix}1 \amp x \\ 2 \amp 1 \end{matrix} \right]\) for some number \(x\text{.}\) You wish to make \(A\) such that it doubles the area of every geometric figure. What are the possibilities for \(x\) (there are two answers).

6.

Suppose \(A\) and \(S\) are \(n \times n\) matrices, and \(S\) is invertible. Suppose that \(\det(A) = 3\text{.}\) Compute \(\det(S^{-1}AS)\) and \(\det(SAS^{-1})\text{.}\) Justify your answer using the theorems in this section.

7.

Let \(A\) be an \(n \times n\) matrix such that \(\det(A)=1\text{.}\) Compute \(\det(x A)\) given a number \(x\text{.}\) Hint: First try computing \(\det(xI)\text{,}\) then note that \(xA = (xI)A\text{.}\)

8. 2.

Compute the determinant of the following matrices:
  1. \(\displaystyle \begin{bmatrix}-2 \end{bmatrix}\)
  2. \(\displaystyle \begin{bmatrix}2 \amp -2 \\ 1 \amp 3 \end{bmatrix}\)
  3. \(\displaystyle \begin{bmatrix}2 \amp 2 \\ 2 \amp 2 \end{bmatrix}\)
  4. \(\displaystyle \begin{bmatrix}2 \amp 9 \amp -11 \\ 0 \amp -1 \amp 5 \\ 0 \amp 0 \amp 3 \end{bmatrix}\)
  5. \(\displaystyle \begin{bmatrix}2 \amp 1 \amp 0 \\ -2 \amp 7 \amp 3 \\ 1 \amp 1 \amp 0 \end{bmatrix}\)
  6. \(\displaystyle \begin{bmatrix}5 \amp 1 \amp 3 \\ 4 \amp 1 \amp 1 \\ 4 \amp 5 \amp 1 \end{bmatrix}\)
  7. \(\displaystyle \begin{bmatrix}3 \amp 2 \amp 5 \amp 7 \\ 0 \amp 0 \amp 2 \amp 0 \\ 0 \amp 4 \amp 5 \amp 0 \\ 2 \amp 1 \amp 2 \amp 4 \end{bmatrix}\)
  8. \(\displaystyle \begin{bmatrix}0 \amp 2 \amp 1 \amp 0 \\ 1 \amp 2 \amp -3 \amp 4 \\ 5 \amp 6 \amp -7 \amp 8 \\ 1 \amp 2 \amp 3 \amp -2 \end{bmatrix}\)
Réponse.
a) \(-2\) b) \(8\) c) \(0\) d) \(-6\) e) \(-3\) f) \(28\) g) \(16\) h) \(-24\)

9.

For which \(x\) are the following matrices singular (not invertible).
  1. \(\displaystyle \begin{bmatrix}1 \amp 3 \\ 1 \amp x \end{bmatrix}\)
  2. \(\displaystyle \begin{bmatrix}3 \amp x \\ 1 \amp 3 \end{bmatrix}\)
  3. \(\displaystyle \begin{bmatrix}x \amp 3 \\ 3 \amp x \end{bmatrix}\)
  4. \(\displaystyle \begin{bmatrix}x \amp 1 \amp 0 \\ 1 \amp 4 \amp 0 \\ 1 \amp 6 \amp 2 \end{bmatrix}\)
Réponse.
a) \(3\) b) \(9\) c) \(3\) d) \(\nicefrac{1}{4}\)

10.

Compute
\begin{equation*} \det \left( \begin{bmatrix} 3 \amp 4 \amp 7 \amp 12 \\ 0 \amp -1 \amp 9 \amp -8 \\ 0 \amp 0 \amp -2 \amp 4 \\ 0 \amp 0 \amp 0 \amp 2 \end{bmatrix}^{-1} \right) \end{equation*}
without computing the inverse.
Réponse.
\(12\)

11. challenging.

Find all the \(x\) that make the matrix inverse
\begin{equation*} \begin{bmatrix} 1 \amp 2 \\ 1 \amp x \end{bmatrix}^{-1} \end{equation*}
have only integer entries (no fractions). Note that there are two answers.
Réponse.
\(1\) and \(3\)