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
\begin{equation*}
\det \left(
\begin{bmatrix}
a
\end{bmatrix}
\right)
\overset{\text{def}}{=}
a .
\end{equation*}
For a \(2 \times 2\) matrix, define
\begin{equation*}
\det \left(
\begin{bmatrix}
a & b \\
c & d
\end{bmatrix}
\right)
\overset{\text{def}}{=}
ad-bc .
\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. 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\text{.}\) The sign of \(\det(A)\) denotes a change of orientation (negative if the axes get flipped). For example, let
Then \(\det(A) = 1+1 = 2\text{.}\) Let us see where \(A\) sends the unit square—the 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{.}\)
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}\text{,}\) and it is therefore of area 2. See Figure A.7.
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 & b \\ c & d \end{bmatrix}
\right) \, \right\lvert
=
\lvert
a d - b c
\rvert
.
\end{equation*}
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
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.
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\text{,}\)
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]\text{.}\) So the deteriminant is just the product of the diagonal entries:
In particular, the identity matrix \(I\) is diagonal, and the diagonal entries are all 1. Thus,
\begin{equation*}
\det(I) = 1 .
\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 the existence of inverses. Take \(A\) and \(B\) to be inverses, that is \(AB=I\text{.}\) Then
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:
TheoremA.6.2.
An \(n \times n\) matrix \(A\) is invertible if and only if \(\det (A) \not= 0\text{.}\)
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 & b \\
c & d
\end{bmatrix}^{-1}
=
\frac{1}{ad-bc}
\begin{bmatrix}
d & -b \\
-c & a
\end{bmatrix} .
\end{equation*}
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{equation*}
\begin{vmatrix}
a & b \\
c & d
\end{vmatrix}
=
\det \left(
\begin{bmatrix}
a & b \\
c & d
\end{bmatrix}
\right) .
\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.
ExercisesExercises
A.6.1.
Compute the determinant of the following matrices:
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{.}\)
A.6.5.
Consider the linear mapping from \({\mathbb R}^2\) to \({\mathbb R}^2\) given by the matrix \(A = \left[ \begin{smallmatrix}
1 & x \\
2 & 1
\end{smallmatrix} \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).
A.6.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.
A.6.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{.}\)
A.6.101.
Compute the determinant of the following matrices: