Skip to main content

Discrete Mathematics for Computer Science: An open educational resource.

Section 11.4 Matrix Determinants

The determinant is a number (a scalar value) that is a certain function of the entries of a square matrix. The determinant of a matrix \(A\) is commonly denoted \(\det (A)\text{,}\) \(\det A\text{,}\) or \(|A|\text{.}\) Its value characterizes some properties of the matrix and the area of the shape it represents geometrically. Historically, determinants were used long before matrices: A determinant was originally defined as a property of a system of linear equations. The determinant "determines" whether the system has a unique solution (which occurs precisely if the determinant is non-zero).
We will see in this section that the determinant is used to determine if a matrix has an inverse (the system of equations has a unique solution), to find an inverse matrix if it exists, and to solve systems of linear equations more quickly. The determinant has many other uses which would be covered in more advanced mathematics courses. See also the Wikipedia article: Determinant.
 1 
en.wikipedia.org/wiki/Determinant

Subsection 11.4.1 Cofactors and \(2 \times 2\) Deteriminants

Let \(A\) be an \(n \times n\) matrix. The determinant of \(A\text{,}\) denoted as \(\det (A)\) is a number. If the matrix is a \(2 \times 2\) matrix, this number is very easy to find.

Definition 11.4.1. Determinant of a \(2 \times 2\) Matrix.

Let
\begin{equation*} A = \begin{pmatrix} a & b\\ c & d \end{pmatrix}\text{.} \end{equation*}
Then
\begin{equation*} \det (A) \equiv ad - cb\text{.} \end{equation*}
The determinant is also often denoted by enclosing the matrix with two vertical lines. Thus
\begin{equation*} \det \begin{pmatrix} a & b\\ c & d \end{pmatrix} = \begin{vmatrix} a & b\\ c & d \end{vmatrix} . \end{equation*}

Example 11.4.2.

Find \(\det \begin{pmatrix} 2 & 4\\ -1 & 6 \end{pmatrix}\text{.}\)
Solution.
From the definition this is
\begin{equation*} (2)(6) - (-1)(4) = 16\text{.} \end{equation*}
Having defined what is meant by the determinant of a \(2 \times 2\) matrix, what about a \(3 \times 3\) matrix?

Definition 11.4.3. Matrix Minor.

Suppose \(A\) is a \(3 \times 3\) matrix. The \(ij^{th}\) minor, denoted as \(\text{minor}(A)_{ij}\) or \((i,j)\) minor , is the determinant of the \(2\times 2\) matrix which results from deleting the \(i^{th}\) row and the \(j^{th}\) column.

Example 11.4.4.

Consider the matrix
\begin{equation*} \begin{pmatrix} 1 & 2 & 3\\ 4 & 3 & 2\\ 3 & 2 & 1\\ \end{pmatrix}. \end{equation*}
The (1,2) minor is the determinant of the \(2 \times 2\) matrix which results when you delete the first row and the second column. This minor is therefore
\begin{equation*} \det\begin{pmatrix} 4 & 2\\ 3 & 1\end{pmatrix} = (4)(1) - (3)(2) = -2. \end{equation*}
The (2,3) minor is the determinant of the \(2 \times 2\) matrix which results when you delete the second row and the third column. This minor is therefore
\begin{equation*} \det\begin{pmatrix} 1 & 2\\ 3 & 2\end{pmatrix} = (1)(2) - (3)(2) = -4. \end{equation*}

Definition 11.4.5. \(ij^{th}\) Cofactor.

Suppose \(A\) is a \(3 \times 3\) matrix. The \(ij^{th}\) cofactor is defined to be \((-1)^{i+j} \times (ij^{th}\) minor). In words, you multiply \((-1)^{(i+j)}\) times the \(ij^{th}\) minor to get the \(ij^{th}\) cofactor.
The cofactors of a matrix are so important that special notation is appropriate when referring to them. The \(ij^{th}\) cofactor of a matrix \(A\) will be denoted by \(\text{cof} (A)_{ij}\) . It is also convenient to refer to the cofactor of an entry of a matrix as follows. For \(a_{ij}\) an entry of the matrix, its cofactor is just \(\text{cof} (A)_{ij}\) . Thus the cofactor of the \(ij^{th}\) entry is just the \(ij^{th}\) cofactor.

Example 11.4.6.

Consider the matrix
\begin{equation*} \begin{pmatrix} 1 & 2 & 3\\ 4 & 3 & 2\\ 3 & 2 & 1\\ \end{pmatrix}. \end{equation*}
The (1,2) minor is the determinant of the \(2 \times 2\) matrix which results when you delete the first row and the second column. This minor is therefore
\begin{equation*} \det \begin{pmatrix}4&2\\ 3&1\end{pmatrix} = (4)(1) - (3)(2) = -2. \end{equation*}
It follows
\begin{equation*} \text{cof} (A)_{12} = (-1)^{1+2} \det \begin{pmatrix} 4 & 2\\ 3 & 1\end{pmatrix} = (-1)^{1+2} (-2) = 2. \end{equation*}
The (2,3) minor is the determinant of the \(2 \times 2\) matrix which results when you delete the second row and the third column. This minor is therefore
\begin{equation*} \det \begin{pmatrix} 1 & 2\\ 3 & 2\end{pmatrix} = (1)(2) - (3)(2) = -4. \end{equation*}
Therefore,
\begin{equation*} \text{cof} (A)_{23} = (-1)^{2+3} \det \begin{pmatrix} 1 & 2\\ 3 & 2\end{pmatrix} = (-1)^{2+3} (-4) = 4. \end{equation*}
Similarly,
\begin{equation*} \text{cof} (A)_{22} = (-1)^{2+2} \det \begin{pmatrix} 1 & 3\\ 3 & 1\\ \end{pmatrix} = -4. \end{equation*}

Definition 11.4.7. Expanding Along a Row or Column.

The determinant of a \(3 \times 3\) matrix \(A\text{,}\) is obtained by picking a row (column) and taking the product of each entry in that row (column) with its cofactor and adding these up. This process when applied to the \(i^{th}\) row (column) is known as expanding the determinant along the \(i^{th}\) row (column).

Example 11.4.8.

Find the determinant of
\begin{equation*} A = \begin{pmatrix} 1 & 2 & 3\\ 4 & 3 & 2\\ 3 & 2 & 1\\ \end{pmatrix}. \end{equation*}
Here is how it is done by expanding around the first column.
\begin{equation*} \overbrace{1(-1)^{1+1}\begin{vmatrix}3 & 2\\ 2 & 1 \end{vmatrix}}^{\text{cof} (A)_{11}} + \overbrace{4(-1)^{2+1}\begin{vmatrix}2 & 3\\ 2 & 1 \end{vmatrix}}^{\text{cof} (A)_{21}} + \overbrace{3(-1)^{3+1}\begin{vmatrix}3 & 2\\ 3 & 2 \end{vmatrix}}^{\text{cof} (A)_{31}} = 0 . \end{equation*}
You see, we just followed the rule in the above definition. We took the 1 in the first column and multiplied it by its cofactor, the 4 in the first column and multiplied it by its cofactor, and the 3 in the first column and multiplied it by its cofactor. Then we added these numbers together.
You could also expand the determinant along the second row as follows.
\begin{equation*} \overbrace{4(-1)^{2+1}\begin{vmatrix}2 & 3\\ 2 & 1 \end{vmatrix}}^{\text{cof} (A)_{21}} + \overbrace{3(-1)^{2+2}\begin{vmatrix}1 & 3\\ 3 & 1 \end{vmatrix}}^{\text{cof} (A)_{22}} + \overbrace{2(-1)^{2+3}\begin{vmatrix}1 & 2\\ 3 & 2 \end{vmatrix}}^{\text{cof} (A)_{23}} = 0 . \end{equation*}
Observe this gives the same number. You should try expanding along other rows and columns. If you don’t make any mistakes, you will always get the same answer.
What about a \(4 \times 4\) matrix? You know now how to find the determinant of a \(3 \times 3\) matrix. The pattern is the same.

Definition 11.4.9.

Suppose A is a \(4 \times 4\) matrix. The \(ij^{th}\) minor is the determinant of the \(3 \times 3\) matrix you obtain when you delete the \(i^{th}\) row and the \(j^{th}\) column. The \(ij^{th}\) cofactor, \(\text{cof} (A)\) is defined to be \((-1)^{i+j} \times (ij^{th} \text{ minor})\text{.}\) In words, you multiply \((-1)^{i+j}\) times the \(ij^{th}\) minor to get the \(ij^{th}\) cofactor.

Definition 11.4.10. Laplace Expansion.

The determinant of a \(4 \times 4\) matrix \(A\text{,}\) is obtained by expanding along a row (column) just as was done for a \(3\times 3\) matrix in Definition 11.4.7, except the expanding process must be repeated again for each of the resulting \(3\times 3\) matrices to obtain their determinants.
This method of evaluating a determinant by expanding along a row or a column can be done for any size square matrix and is called the method of Laplace expansion. The process must be repeated until the resulting matrices are small enough to easily calculate their determinants.

Example 11.4.11.

Find \(\det (A)\) where
\begin{equation*} A = \begin{pmatrix} 1 & 2 & 3 & 4\\ 5 & 4 & 2 & 3\\ 1 & 3 & 4 & 5\\ 3 & 4 & 3 & 2 \end{pmatrix}. \end{equation*}
Solution.
As in the case of a \(3 \times 3\) matrix, you can expand this along any row or column. Lets pick the third column. \(\det (A) =\)
\begin{equation*} 3(-1)^{1+3}\begin{vmatrix} 5 & 4 & 3\\ 1 & 3 & 5\\ 3 & 4 & 2 \end{vmatrix} + 2(-1)^{2+3}\begin{vmatrix} 1 & 2 & 4\\ 1 & 3 & 5\\ 3 & 4 & 2 \end{vmatrix} + \end{equation*}
\begin{equation*} 4(-1)^{3+3}\begin{vmatrix} 1 & 2 & 4\\ 5 & 4 & 3\\ 3 & 4 & 2 \end{vmatrix} + 3(-1)^{4+3}\begin{vmatrix} 1 & 2 & 4\\ 5 & 4 & 3\\ 1 & 3 & 5 \end{vmatrix} . \end{equation*}
Now you know how to expand each of the \(3 \times 3\) matrices along a row or a column. If you do so, you will get \(-12\) assuming you make no mistakes. You could expand this matrix along any row or any column and assuming you make no mistakes, you will always get the same thing which is defined to be the determinant of the matrix \(A\text{.}\) .
Note that each of the four terms in the example solution above involves three terms consisting of determinants of \(2 \times 2\) matrices and each of these will need 2 terms. Therefore, there will be \(4 \times 3 \times 2 = 24\) terms to evaluate in order to find the determinant using the method of Laplace expansion. Suppose now you have a \(10 \times 10\) matrix and you follow the above pattern for evaluating determinants. By analogy to the above, there will be \(10! = 3, 628 , 800\) terms involved in the evaluation of such a determinant by Laplace expansion along a row or column. This is a lot of terms.
In addition to the difficulties just discussed, you should regard the above claim that you always get the same answer by picking any row or column with considerable skepticism. It is incredible and not at all obvious. However, it requires a little effort to establish it. This is done in the Elementary Linear Algebra book chapter 7 on the theory of the determinant.

Definition 11.4.12. Cofactor Matrix.

Let \(A = (a_{ij})\) be an \(n \times n\) matrix and suppose the determinant of a \((n - 1) \times (n - 1)\) matrix has been defined. Then a new matrix called the cofactor matrix, \(cof (A)\) is defined by \(cof (A) = (c_{ij}) \) where to obtain \(c_{ij}\) delete the \(i^{th}\) row and the \(j^{th}\) column of \(A\text{,}\) take the determinant of the \((n - 1) \times (n - 1)\) matrix which results, (This is called the \(ij^{th}\) minor of \(A\text{.}\) ) and then multiply this number by \((-1)^{i+j}\) .
Thus \((-1)^{i+j} \times (\text{ the } ij^{th} \text{ minor})\) equals the \(ij^{th}\) cofactor. To make the formulas easier to remember, \(\text{cof} (A)_{ij}\) will denote the \(ij^{th}\) entry of the cofactor matrix.
With this definition of the cofactor matrix, here is how to define the determinant of an \(n \times n\) matrix.

Definition 11.4.13. Determininant as Sum of Cofactor Matrices.

Let \(A\) be an \(n \times n\) matrix where \(n \geq 2\) and suppose the determinant of an \((n - 1) \times (n - 1)\) has been defined. Then
\begin{equation*} \det (A) = \sum_{j = 1}^{n} a_{ij}\, \text{cof} (A)_{ij} = \sum_{i = 1}^{n} a_{ij}\, \text{cof} (A)_{ij} \end{equation*}
The first sum consists of expanding the determinant along the \(i^{th}\) row and the second expands the determinant along the \(j^{th}\) column.

Subsection 11.4.2 The Determinant of a Triangular Matrix

Notwithstanding the difficulties involved in using the method of Laplace expansion, certain types of matrices are very easy to deal with.

Definition 11.4.15. Triangular Matrices.

A matrix \(M\) , is upper triangular if \(M_{ij}= 0\) whenever \(i \gt j\text{.}\) Thus in such a matrix, every entry below the main diagonal (the entries of the form \(M_{ii}\)) equals zero, as shown.
\begin{equation*} M = \begin{pmatrix} M_{11} & \cdot & \cdots & \cdot \\ 0 & M_{22} & \ddots & \vdots\\ \vdots & \ddots & \ddots & \cdot \\ 0 & \cdots & 0 & M_{nn} \end{pmatrix} \end{equation*}
A lower triangular matrix is defined similarly as a matrix for which all entries above the main diagonal are equal to zero.
You should verify the following using the above theorem on Laplace expansion.

Example 11.4.17.

Let
\begin{equation*} A = \begin{pmatrix} 1 & 2 & 3 & 77\\ 0 & 2 & 6 & 7\\ 0 & 0 & 3 & 33.7\\ 0 & 0 & 0 & -1 \end{pmatrix} \end{equation*}
Find \(\det (A).\)
Answer.
From the above corollary, it suffices to take the product of the diagonal elements. Thus \(\det (A) =1 \times 2 \times 3 \times (-1) = -6.\)
Solution.
Without using the corollary, you could expand along the first column. This gives
\begin{equation*} 1\begin{vmatrix} 2 & 6 & 7\\ 0 & 3 & 33.7\\ 0 & 0 & -1 \end{vmatrix} + 0(-1)^{2+1}\begin{vmatrix} 2 & 3 & 77\\ 0 & 3 & 33.7\\ 0 & 0 & -1 \end{vmatrix} + \end{equation*}
\begin{equation*} 0(-1)^{3+1}\begin{vmatrix} 2 & 3 & 77\\ 2 & 6 & 7\\ 0 & 0 & -1 \end{vmatrix} + 0(-1)^{4+1}\begin{vmatrix} 2 & 3 & 77\\ 2 & 6 & 7\\ 0 & 3 & 33.77 \end{vmatrix} + \end{equation*}
and the only non-zero term in the expansion is the first one
\begin{equation*} 1\begin{vmatrix} 2 & 6 & 7\\ 0 & 3 & 33.7\\ 0 & 0 & -1 \end{vmatrix} \end{equation*}
Now expand this along the first column to obtain
\begin{equation*} 1 \times \left( 2 \times \begin{vmatrix} 3 & 33.7\\ 0 & -1 \end{vmatrix} + 0(-1)^{2+1}\begin{vmatrix} 6 & 7\\ 0 & -1 \end{vmatrix} + 0(-1)^{3+1}\begin{vmatrix} 6 & 7\\ 3 & 33.7 \end{vmatrix} \right) \end{equation*}
\begin{equation*} = 1\times 2 \times \begin{vmatrix} 3 & 33.7\\ 0 & -1 \end{vmatrix} \end{equation*}
Next expand this last determinant along the first column to obtain the above equals
\begin{equation*} 1\times 2 \times 3 \times (-1) = -6 \end{equation*}
which is just the product of the entries down the main diagonal of the original matrix.

Subsection 11.4.3 Properties of Determinants

There are many properties satisfied by determinants. Some of these properties have to do with row operations. Recall the row operations: Definition 11.1.6

Example 11.4.19.

Let \(A = \begin{pmatrix}1 & 2\\ 3 & 4\end{pmatrix} \text{,}\) and let \(A_1 = \begin{pmatrix}3 & 4\\ 1 & 2\end{pmatrix} \text{.}\)
Then \(\det (A) = -2\) and \(\det (A_1) = 2.\)

Example 11.4.21.

Let \(A = \begin{pmatrix}1 & 2\\ 3 & 4\end{pmatrix} \text{,}\) \(A_1 = \begin{pmatrix}2 & 4\\ 3 & 4\end{pmatrix} \text{.}\)
The first row of \(A_1\) is 2 times the first row of \(A\text{.}\)
\(\det (A) = -2\) and \(\det (A_1) = -4 = 2 \cdot -2 = 2 \, \det (A).\)

Example 11.4.23.

Let \(A = \begin{pmatrix}1 & 2\\ 3 & 4\end{pmatrix} \) and let \(A_1 = \begin{pmatrix}1 & 2\\ 4 & 6\end{pmatrix} \text{.}\) Thus the second row of \(A_1\) is one times the first row added to the second row.
\(\det (A) = -2\) and \(\det (A_1) = -2.\)
There are two other major properties of determinants which do not involve row operations.

Example 11.4.26.

Compare \(\det (AB)\) and \(\det (A) \det (B)\) for
\begin{equation*} A = \begin{pmatrix}1 & 2\\ -3& 2\end{pmatrix}, B = \begin{pmatrix}3 & 2\\ 4& 1\end{pmatrix} \end{equation*}
Solution.
First
\begin{equation*} AB = \begin{pmatrix}1 & 2\\ -3& 2\end{pmatrix}\begin{pmatrix}3 & 2\\ 4& 1\end{pmatrix} = \begin{pmatrix}11 & 4\\ -1 & -4\end{pmatrix} \end{equation*}
and so
\begin{equation*} \det (AB) = \det \begin{pmatrix}11 & 4\\ -1 & -4\end{pmatrix} = -40. \end{equation*}
Now
\begin{equation*} \det (A) = det\begin{pmatrix}1 & 2\\ -3 & 2\end{pmatrix} = 8 \end{equation*}
and
\begin{equation*} \det ( b) = det\begin{pmatrix}3 & 2\\ 4 & 1\end{pmatrix} = -5. \end{equation*}
Thus \(\det (A)\det (B) = 8 \times (-5) = -40.\)

Example 11.4.28.

Compare \(\det (A)\) and \(\det (A^T)\) for
\begin{equation*} A = \begin{pmatrix}1 & 2\\ -3& 2\end{pmatrix}. \end{equation*}
Solution.
\begin{equation*} \det (A) = det\begin{pmatrix}1 & 2\\ -3 & 2\end{pmatrix} = (1\cdot 2) - (-3 \cdot 2) = 8 \end{equation*}
and
\begin{equation*} \det (A^t) = det\begin{pmatrix}1 & -3\\ 2 & 2\end{pmatrix} = (1\cdot 2) - (2 \cdot -3) = 8. \end{equation*}
Thus \(\det (A)= \det (A^T).\)

Subsection 11.4.4 Finding Determinants Using Row Operations

From the above section, Theorem 11.4.22 - Theorem 11.4.24, can be used to find determinants using row operations. As pointed out above, the method of Laplace expansion will not be practical for any matrix of large size. Here is an example in which all the row operations are used.

Example 11.4.29.

Find the determinant of the matrix
\begin{equation*} A = \begin{pmatrix} 1 & 2 & 3 & 4\\ 5 & 1 & 2 & 3\\ 4 & 5 & 4 & 3\\ 2 & 2 & -4 & 5 \end{pmatrix} \end{equation*}
Solution.
Replace the second row by (-5) times the first row added to it. Then replace the third row by (-4) times the first row added to it. Finally, replace the fourth row by (-2) times the first row added to it. This yields the matrix
\begin{equation*} B = \begin{pmatrix} 1 & 2 & 3 & 4\\ 0 & -9 & -13 & -17\\ 0 & -3 & -8 & -13\\ 0 & -2 & -10 & -3 \end{pmatrix} \end{equation*}
and from Theorem 11.4.22 it has the same determinant as \(A\text{.}\) Now using other row operations,\(\det (B) = \frac{-1}{3} \det (C)\) where
\begin{equation*} C = \begin{pmatrix} 1 & 2 & 3 & 4\\ 0 & 0 & 11 & 22\\ 0 & -3 & -8 & -13\\ 0 & 6 & 30 & 9 \end{pmatrix} \end{equation*}
The second row of \(B\) was replaced by \((-3)\) times the third row added to the second row. By Theorem 11.4.22 this didn’t change the value of the determinant. Then the last row was multiplied by \((-3)\) . By Theorem 11.4.20 the resulting matrix has a determinant which is \((-3)\) times the determinant of the un-multiplied matrix. Therefore, we multiplied by \(\frac{-1}{3}\) to retain the correct value. Now replace the last row with 2 times the third added to it. This does not change the value of the determinant by Theorem 11.4.22. Finally switch the third and second rows. This causes the determinant to be multiplied by\((-1)\) . Thus \(\det (C) = - \det (D)\) where
\begin{equation*} D = \begin{pmatrix} 1 & 2 & 3 & 4\\ 0 & -3 & -8 & -13\\ 0 & 0 & 11 & 22\\ 0 & 0 & 14 & -17 \end{pmatrix} \end{equation*}
You could do more row operations or you could note that this can be easily expanded along the first column followed by expanding the \(3 \times 3\) matrix which results along its first column. Thus
\begin{equation*} \det (D) = 1(-3) \begin{vmatrix} 11 & 22\\ 14 & -17 \end{vmatrix} = 1485 \end{equation*}
and so \(\det (C) = -1485\) and \(\det (A) = \det (B) = \frac{-1}{3}(-1485) = 495\)

Example 11.4.30.

Find the determinant of the matrix
\begin{equation*} \begin{pmatrix} 1 & 2 & 3 & 2\\ 1 & -3 & 2 & 1\\ 2 & 1 & 2 & 5\\ 3 & -4 & 1 & 2\end{pmatrix} \end{equation*}
Solution.
Replace the second row by \((-1)\) times the first row added to it. Next take \(-2\) times the first row and add to the third and finally take \(-3\) times the first row and add to the last row. This yields
\begin{equation*} \begin{pmatrix} 1 & 2 & 3 & 2\\ 0 & -5 & -1 & -1\\ 0 & -3 & -4 & 1\\ 0 & -10 & -8 & -4\end{pmatrix} \end{equation*}
By Theorem 11.4.22 this matrix has the same determinant as the original matrix. Remember you can work with the columns also. Take \(-5\) times the last column and add to the second column. This yields
\begin{equation*} \begin{pmatrix} 1 & -8 & 3 & 2\\ 0 & 0 & -1 & -1\\ 0 & -8 & -4 & 1\\ 0 & 10 & -8 & -4\end{pmatrix} \end{equation*}
By Theorem 11.4.24 this matrix has the same determinant as the original matrix. Now take \((-1)\) times the third row and add to the top row. This gives.
\begin{equation*} \begin{pmatrix} 1 & 0 & 7 & 1\\ 0 & 0 & -1 & -1\\ 0 & -8 & -4 & 1\\ 0 & 10 & -8 & -4\end{pmatrix} \end{equation*}
which by Theorem 11.4.22 has the same determinant as the original matrix. Let’s expand it now along the first column. This yields the following for the determinant of the original matrix.
\begin{equation*} \det \begin{pmatrix} 0 & -1 & -1\\ -8 & -4 & 1\\ 10 & -8 & -4\end{pmatrix} \end{equation*}
which equals
\begin{equation*} 8 \det \begin{pmatrix}-1 & -1\\ -8 & -4\end{pmatrix} + 10 \det \begin{pmatrix}-1 & -1\\ -4 & 1\end{pmatrix} = -82 \end{equation*}
We suggest you do not try to be fancy in using row operations. That is, stick mostly to the one which replaces a row or column with a multiple of another row or column added to it. Also note there is no way to check your answer other than working the problem more than one way. To be sure you have gotten it right you must do this.

Subsection 11.4.5 A Formula For The Inverse

The definition of the determinant in terms of Laplace expansion along a row or column also provides a way to give a formula for the inverse of a matrix. Recall the definition of the inverse of a matrix in Definition 11.3.1. Also recall the definition of the cofactor matrix given in Definition 11.4.12. This cofactor matrix was just the matrix which results from replacing the \(ij^{th}\) entry of the matrix with the \(ij^{th}\) cofactor.
The following theorem says that to find the inverse, take the transpose of the cofactor matrix and divide by the determinant. The transpose of the cofactor matrix is called the adjugate or sometimes the classical adjoint of the matrix \(A\text{.}\) In other words, \(A^{-1}\) is equal to 1 divided by the determinant of \(A\) times the adjugate matrix of \(A\text{.}\) This is what the following theorem says with more precision.

Proof.

From the definition of the determinant in terms of expansion along a column, and letting \((a_{ir}) = A\text{,}\) if \(\det (A) \neq 0\text{,}\)
\begin{equation*} \sum_{i=1}^n a_{ir} \text{cof} (A)_{ir}\det (A)^{-1} = \det (A)\det (A)^{-1} = 1. \end{equation*}
Now consider
\begin{equation*} \sum_{i=1}^n a_{ir} \text{cof} (A)_{ik}\det (A)^{-1} \end{equation*}
when \(k \neq r\text{.}\) Replace the \(k^{th}\) column with the \(r^{th}\) column to obtain a matrix \(B_k\) whose determinant equals zero by Theorem 11.4.18. However, expanding this matrix \(B_k\) along the \(k^{th}\) column yields
\begin{equation*} 0 = \det (B_k)\det (A)^{-1} = \sum_{i=1}^n a_{ir} \text{cof} (A)_{ik}\det (A)^{-1}. \end{equation*}
Summarizing,
\begin{equation*} \sum_{i=1}^n a_{ir} \text{cof} (A)_{ik}\det (A)^{-1} = \delta_{rk} \equiv \begin{cases}1 & \text{if } r = k\\ 0 & \text{if } r \neq k\end{cases}. \end{equation*}
Now
\begin{equation*} \sum_{i=1}^n a_{ir} \text{cof} (A)_{ik} = \sum_{i=1}^n a_{ir} \text{cof} (A)_{ki}^T \end{equation*}
which is the \(kr^{th}\) entry of \(\text{cof} (A)^T A\text{.}\) Therefore,
\begin{equation*} \frac{\text{cof} (A)^T}{\det (A)} A = I. \end{equation*}
Using the other formula in Definition 11.4.13 and similar reasoning,
\begin{equation*} \sum_{j=1}^n a_{rj} \text{cof} (A)_{kj} \det (A)^{-1} = \delta_{rk}. \end{equation*}
Now,
\begin{equation*} \sum_{j=1}^n a_{rj} \text{cof} (A)_{kj} = \sum_{j=1}^n a_{rj} \text{cof} (A)_{jk}^T \end{equation*}
which is the \(rk^{th}\) entry of \(A\, \text{cof} (A)^T\text{.}\) Therefore,
\begin{equation*} A \frac{\text{cof} (A)^T}{\det (A)} A = I, \end{equation*}
and it follows that \(A^{-1} = (a_{ij}^{-1})\text{,}\) where
\begin{equation*} a_{ij}^{-1} = \text{cof} (A)_{ij} \det (A)^{-1}. \end{equation*}
In other words,
\begin{equation*} A^{-1} = \frac{\text{cof} (A)^T}{\det (A)}. \end{equation*}
Now suppose \(A^{-1}\) exists. Then by Theorem 11.4.25
\begin{equation*} 1 = \det (I) = \det (AA^{-1}) = \det (A)\det (A^{-1}) \end{equation*}
so \(\det (A) \neq 0. \blacksquare\)

Example 11.4.32.

Find the inverse of the matrix
\begin{equation*} A = \begin{pmatrix} 1 & 2 & 3\\ 3 & 0 & 1\\ 1 & 2 & 1 \end{pmatrix} \end{equation*}
Solution.
First, find the determinant of this matrix. Using row operations (Theorem 11.4.22 - Theorem 11.4.24), the determinant of this matrix equals the determinant of the matrix:
\begin{equation*} \begin{pmatrix} 1 & 2 & 3\\ 0 & -6 & -8\\ 0 & 0 & -2 \end{pmatrix} \end{equation*}
which equals 12.
Next, find the cofactor matrix of \(A\text{.}\)
\begin{equation*} \text{cof}(A) = \begin{pmatrix} -2 & -2 & 6\\ 4 & -2 & 0\\ 2 & 8 & -6 \end{pmatrix} \end{equation*}
Each entry of \(A\) was replaced by its cofactor. Therefore, from the above theorem, the inverse of \(A\) should equal
\begin{equation*} \frac{1}{12} \begin{pmatrix} -2 & -2 & 6\\ 4 & -2 & 0\\ 2 & 8 & -6 \end{pmatrix}^T = \begin{pmatrix} -\frac{1}{6} & \frac{1}{3} & \frac{1}{6}\\ -\frac{1}{6} & -\frac{1}{6} & \frac{2}{3}\\ \frac{1}{2} & 0 & -\frac{1}{2} \end{pmatrix}. \end{equation*}
Does it work? You should check to see if it does. When the matrices are multiplied
\begin{equation*} \begin{pmatrix} -\frac{1}{6} & \frac{1}{3} & \frac{1}{6}\\ -\frac{1}{6} & -\frac{1}{6} & \frac{2}{3}\\ \frac{1}{2} & 0 & -\frac{1}{2} \end{pmatrix}\begin{pmatrix} 1 & 2 & 3\\ 0 & -6 & -8\\ 0 & 0 & -2 \end{pmatrix} = \begin{pmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 1 \end{pmatrix} \end{equation*}
and so it is correct.

Example 11.4.33.

Find the inverse of the matrix
\begin{equation*} A = \begin{pmatrix} \frac{1}{2} & 0 & \frac{1}{2}\\ -\frac{1}{6} & \frac{1}{3} & -\frac{1}{2}\\ -\frac{5}{6} & \frac{2}{3} & -\frac{1}{2} \end{pmatrix} \end{equation*}
Solution.
First find its determinant. This determinant is \(\frac{1}{6}\) . The inverse is therefore equal to
\begin{equation*} 6 \begin{pmatrix} \begin{vmatrix} \frac{1}{3} & -\frac{1}{2}\\ \frac{2}{3} & -\frac{1}{2} \end{vmatrix} & -\begin{vmatrix} -\frac{1}{6} & -\frac{1}{2}\\ -\frac{5}{6} & -\frac{1}{2} \end{vmatrix} & \begin{vmatrix} -\frac{1}{6} & \frac{1}{3}\\ -\frac{5}{6} & \frac{2}{3} \end{vmatrix}\\ -\begin{vmatrix} 0 & \frac{1}{2}\\ \frac{2}{3} & -\frac{1}{2} \end{vmatrix} & \begin{vmatrix} \frac{1}{2} & \frac{1}{2}\\ -\frac{5}{6} & -\frac{1}{2} \end{vmatrix} & -\begin{vmatrix} \frac{1}{2} & 0\\ -\frac{5}{6} & \frac{2}{3} \end{vmatrix}\\ \begin{vmatrix} 0 & \frac{1}{2}\\ \frac{1}{3} & -\frac{1}{2} \end{vmatrix} & -\begin{vmatrix} \frac{1}{2} & \frac{1}{2}\\ -\frac{1}{6} & -\frac{1}{2} \end{vmatrix} & \begin{vmatrix} \frac{1}{2} & 0\\ -\frac{1}{6} & \frac{1}{3} \end{vmatrix}\\ \end{pmatrix}^T \end{equation*}
Expanding all the \(2 \times 2\) determinants this yields
\begin{equation*} 6\begin{pmatrix} \frac{1}{6} & \frac{1}{3} & \frac{1}{6}\\ \frac{1}{3} & \frac{1}{6} & -\frac{1}{3}\\ -\frac{1}{6} & \frac{1}{6} & \frac{1}{6} \end{pmatrix}^T = \begin{pmatrix} 1 & 2 & -1\\ 2 & 1 & 1\\ 1 & -2 & 1 \end{pmatrix} \end{equation*}
Always check your work.
\begin{equation*} \begin{pmatrix} 1 & 2 & -1\\ 2 & 1 & 1\\ 1 & -2 & 1 \end{pmatrix} \begin{pmatrix} \frac{1}{2} & 0 & \frac{1}{2}\\ -\frac{1}{6} & \frac{1}{3} & -\frac{1}{2}\\ -\frac{5}{6} & \frac{2}{3} & -\frac{1}{2} \end{pmatrix} = \begin{pmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 1 \end{pmatrix} \end{equation*}
and so we got it right. If the result of multiplying these matrices had been something other than the identity matrix, you would know there was an error. When this happens, you need to search for the mistake if you are interested in getting the right answer. A common mistake is to forget to take the transpose of the cofactor matrix.
This way of finding inverses is especially useful in the case where it is desired to find the inverse of a matrix whose entries are functions.

Example 11.4.34.

Suppose
\begin{equation*} A(t) = \begin{pmatrix} e^t & 0 & 0\\ 0 & \cos t & \sin t\\ 0 & -\sin t & \cos t \end{pmatrix} \end{equation*}
Show that \(A(t)^{-1}\) exists and then find it.
Solution.
First note \(\det(A(t)) = e^t \neq 0,\) so \(A(t)^{-1}\) exists. The cofactor matrix is
\begin{equation*} C(t) = \begin{pmatrix} 1 & 0 & 0\\ 0 & e^t \cos t & e^t \sin t\\ 0 & -e^t\sin t & e^t\cos t \end{pmatrix} \end{equation*}
so the inverse is
\begin{equation*} \frac{1}{e^t} \begin{pmatrix} 1 & 0 & 0\\ 0 & e^t \cos t & e^t \sin t\\ 0 & -e^t\sin t & e^t\cos t \end{pmatrix}^T = \begin{pmatrix} e^{-t} & 0 & 0\\ 0 & \cos t & -\sin t\\ 0 & \sin t & \cos t \end{pmatrix} \end{equation*}

Subsection 11.4.6 Cramer’s Rule

This formula for the inverse also implies a famous procedure known as Cramer’s rule. Cramer’s rule gives a formula for the solutions, \(\mathbf{x}\text{,}\) to a system of equations, \(A\mathbf{x} = \mathbf{y}\) in the special case that \(A\) is a square matrix. Note this rule does not apply if you have a system of equations in which there is a different number of equations than variables.
In case you are solving a system of equations, \(A\mathbf{x} = \mathbf{y}\) for \(\mathbf{x}\text{,}\) it follows that if \(A^{-1}\) exists,
\begin{equation*} \mathbf{x} = (A^{-1}A)\mathbf{x} = A^{-1}(A\mathbf{x}) = A^{-1}\mathbf{y} \end{equation*}
thus solving the system. Now in the case \(A^{-1}\) exists, Theorem 11.4.31 is a formula for \(A^{-1}\text{.}\) Using this formula,
\begin{equation*} x_i = \sum_{j=1}^n a_{ij}^{-1} y_{j} = \sum_{j=1}^n\frac{1}{\det(A)} \text{cof} (A)_{ji}y_j. \end{equation*}
By Definition 11.4.7. the formula for the expansion of a determinant along a column,
\begin{equation*} x_i = \frac{1}{\det(A)}\det \begin{pmatrix}\cdot & \cdots & y_1 & \cdots \cdot \\ \vdots && \vdots & & \vdots\\ \cdot & \cdots & y_n & \cdots & \cdot \end{pmatrix} \end{equation*}
where here the \(i^{th}\) column of \(A\) is replaced by the column vector \((y_1, \cdots, y_n)^T\text{,}\) and the determinant of this modified matrix is taken and divided by \(\det(A).\) This formula is known as Cramer’s rule.

Definition 11.4.35. Cramer’s Rule.

Suppose \(A\) is an \(n \times n\) matrix and it is desired to solve the system \(A\mathbf{x} = \mathbf{y}\text{,}\) \(\mathbf{y} = (y_1, \cdots , y_n )^T\) for \(\mathbf{x} = (x_1, \cdots , x_n )^T\text{.}\) Then Cramer’s rule says
\begin{equation*} x_i = \frac{\det A_i}{\det A} \end{equation*}
where \(A_i\) is obtained by replacing the \(i^{th}\) column of \(A\) with the column \((y_1, \cdots , y_n )^T\)

Example 11.4.36.

Find \(x, y, z\) if
\begin{equation*} \begin{pmatrix} 1 & 2 & 1\\ 3 & 2 & 1\\ 2 & -3 & 2 \end{pmatrix} \begin{pmatrix}x \\ y \\ z \end{pmatrix} = \begin{pmatrix}1 \\ 2 \\ 3 \end{pmatrix} \end{equation*}
Solution.
Using Cramer’s rule, solve for \(x\) by replacing column 1 with \((y_1, \cdots , y_n )^T = \begin{pmatrix}1 \\ 2 \\ 3 \end{pmatrix}\) and dividing the determinant of the new matrix by the determinant of the original matrix.
\begin{equation*} x = \frac{\begin{vmatrix}1 & 2 & 1\\ 2 & 2 & 1\\ 3 & -3 & 2\end{vmatrix}}{\begin{vmatrix}1 & 2 & 1\\ 3 & 2 & 1\\ 2 & -3 & 2\end{vmatrix}} = \frac{1}{2} \end{equation*}
Now to find \(y,\)
\begin{equation*} y = \frac{\begin{vmatrix}1 & 1 & 1\\ 3 & 2 & 1\\ 2 & 3 & 2\end{vmatrix}}{\begin{vmatrix}1 & 2 & 1\\ 3 & 2 & 1\\ 2 & -3 & 2\end{vmatrix}} = -\frac{1}{7} \end{equation*}
and \(z,\)
\begin{equation*} z = \frac{\begin{vmatrix}1 & 2 & 1\\ 3 & 2 & 2\\ 2 & -3 & 3\end{vmatrix}}{\begin{vmatrix}1 & 2 & 1\\ 3 & 2 & 1\\ 2 & -3 & 2\end{vmatrix}} = -\frac{11}{14} \end{equation*}
For large systems Cramer’s rule is less than useful because to use it you must evaluate determinants. However, you have no practical way to evaluate determinants for large matrices other than row operations and if you are using row operations, you might just as well use them to solve the system to begin with. It will be a lot less trouble. Nevertheless, there are situations in which Cramer’s rule is useful.

Example 11.4.37.

Solve for \(z\) if
\begin{equation*} \begin{pmatrix} 1 & 0 & 0\\ 0 & e^t \cos t & e^t \sin t\\ 0 & -e^t\sin t & e^t \cos t \end{pmatrix} \begin{pmatrix}x \\ y \\ z \end{pmatrix} = \begin{pmatrix}1 \\ t \\ t^2 \end{pmatrix} \end{equation*}
Solution.
You could do it by row operations but it might be easier in this case to use Cramer’s rule because the matrix of coefficients do not consist of numbers but of functions. Thus
\begin{equation*} z = \frac{\begin{vmatrix}1 & 0 & 1\\ 0 & e^t \cos t & t\\ 0 & -e^t\sin t & t^2\end{vmatrix}}{\begin{vmatrix}1 & 0 & 0\\ 0 & e^t \cos t & e^t \sin t\\ 0 & -e^t\sin t & e^t \cos t\end{vmatrix}} = t((\cos t)t + \sin t)e^{-t}. \end{equation*}

Exercises 11.4.7 Exercises

1.

Find the determinants of the following matrices.
  1. \begin{equation*} \begin{pmatrix} 1 & 2 & 3\\ 3 & 2 & 2\\ 0 & 9 & 8 \end{pmatrix} \end{equation*}
  2. \begin{equation*} \begin{pmatrix} 4 & 3 & 2\\ 1 & 7 & 8\\ 3 & -9 & 3 \end{pmatrix} \end{equation*}
  3. \begin{equation*} \begin{pmatrix} 1 & 2 & 3 & 2\\ 1 &3 & 2 & 3\\ 4 & 1 & 5 & 0\\ 1 & 2 & 1 & 2 \end{pmatrix} \end{equation*}
Solution.
  1. Using the "short cut" shown in class.
    \begin{equation*} \begin{vmatrix} 1 & 2 & 3\\ 3 & 2 & 2\\ 0 & 9 & 8 \end{vmatrix} \end{equation*}
    \begin{equation*} = (1\cdot 2 \cdot 8) + (3 \cdot 9 \cdot 3) + (0\cdot 2 \cdot 2) - (0 \cdot 2 \cdot 3 ) - (2 \cdot 9 \cdot 1) - (3 \cdot 2 \cdot 8)\\ \end{equation*}
    \begin{equation*} = 31\\ \end{equation*}
  2. Expanding along row 1.
    \begin{equation*} \begin{vmatrix} 4 & 3 & 2\\ 1 & 7 & 8\\ 3 & -9 & 3 \end{vmatrix} \end{equation*}
    \begin{equation*} = 4(-1)^{1+1}\begin{vmatrix} 7 & 8\\ -9 & 3\end{vmatrix} + 3(-1)^{1+2}\begin{vmatrix} 1 & 8\\ 3 & 3\end{vmatrix} + 2(-1)^{1+3}\begin{vmatrix} 1 & 7\\ 3 & -9 \end{vmatrix} \end{equation*}
    \begin{equation*} = 4((7\cdot3)-(8\cdot -9)) - 3((1\cdot 3) - (3 \cdot 8)) + 2((1\cdot 9) - (3 \cdot 7)) \end{equation*}
    \begin{equation*} = 372 + 63 - 60 \end{equation*}
    \begin{equation*} = 375 \end{equation*}
  3. Using row operations to make a triangular matrix.
    \begin{equation*} \begin{pmatrix} 1 & 2 & 3 & 2\\ 1 &3 & 2 & 3\\ 4 & 1 & 5 & 0\\ 1 & 2 & 1 & 2 \end{pmatrix} \end{equation*}
    Subtracting row 1 from rows 2 and 4, and 4 times row 1 from row 3 gives
    \begin{equation*} \begin{pmatrix} 1 & 2 & 3 & 2\\ 0 &1 & -1 & 1\\ 0 & -7 & -7 & -8\\ 0 & 0 & -2 & 0 \end{pmatrix} \end{equation*}
    Add 7 times row 2 to row 3 gives
    \begin{equation*} \begin{pmatrix} 1 & 2 & 3 & 2\\ 0 &1 & -1 & 1\\ 0 & 0 & -14 & -1\\ 0 & 0 & -2 & 0 \end{pmatrix} \end{equation*}
    Subtract 1/7 times row 3 from row 4 gives
    \begin{equation*} \begin{pmatrix} 1 & 2 & 3 & 2\\ 0 &1 & -1 & 1\\ 0 & 0 & -14 & -1\\ 0 & 0 & 0 & \frac{1}{7} \end{pmatrix} \end{equation*}
    Taking the product of the diagonal
    \begin{equation*} 1 \cdot 1 \cdot -14 \cdot \frac{1}{7} = -2 \end{equation*}

2.

Find the following determinant by expanding along the first row.
\begin{equation*} \begin{vmatrix} 1 & 2 & 1\\ 2 & 1 & 3\\ 2 & 1 & 1 \end{vmatrix} \end{equation*}

3.

Find the following determinant by expanding along the first column.
\begin{equation*} \begin{vmatrix} 1 & 2 & 1\\ 1 & 0 & 1\\ 2 & 1 & 1 \end{vmatrix} \end{equation*}
Solution.
\begin{equation*} \begin{vmatrix} 1 & 2 & 1\\ 1 & 0 & 1\\ 2 & 1 & 1 \end{vmatrix} = 1(-1)^{1+1}\begin{vmatrix} 0 & 1\\1 & 1 \end{vmatrix} + 1(-1)^{1+2}\begin{vmatrix} 2 & 1\\1 & 1 \end{vmatrix} + 2(-1)^{1+3}\begin{vmatrix} 2 & 1\\0 & 1 \end{vmatrix} \end{equation*}
\begin{equation*} = 2 \end{equation*}

4.

Find the following determinant by expanding along the second row.
\begin{equation*} \begin{vmatrix} 1 & 2 & 1\\ 2 & 1 & 3\\ 2 & 1 & 1 \end{vmatrix} \end{equation*}

5.

Compute the determinant by cofactor expansion. Pick the easiest row or column to use.
\begin{equation*} \begin{vmatrix} 1 & 0 & 0 & 1\\ 2 & 1 & 1 & 0\\ 0 & 0 & 0 & 2\\ 2 & 1 & 3 & 1 \end{vmatrix} \end{equation*}
Solution.
This would normally take a lot of time because the matrix is a \(4\times 4\text{,}\) but row three only has one non-zero entry so we will expand along row 3. The only term is the one for column 4:
\begin{equation*} \begin{vmatrix} 1 & 0 & 0 & 1\\ 2 & 1 & 1 & 0\\ 0 & 0 & 0 & 2\\ 2 & 1 & 3 & 1 \end{vmatrix} = 2(-1)^{3+4} \begin{vmatrix} 1 & 0 & 0\\ 2 & 1 & 1\\ 2 & 1 & 3\end{vmatrix}\text{.} \end{equation*}
Now we must find the determinant of the \(3\times 3\) matrix (the \(34^{th}\) minor). Again, this isn’t that terrible because the first row only has one non-zero entry. So choosing to expand around row 1, we have only a column 1 term.
\begin{equation*} 2(-1)^{3+4} (1(-1)^{1+1}\begin{vmatrix} 1 & 1\\ 1 & 3\end{vmatrix}) \end{equation*}
Now using the formula for the determinant of a \(2\times 2\) matrix we end up with
\begin{equation*} 2(-1)^{3+4} (1(-1)^{1+1}((1\cdot 3) - (1\cdot1))) = -2 \cdot 2 = -4 \end{equation*}

6.

Find the determinant using row operations.
\begin{equation*} \begin{vmatrix} 1 & 2 & 1\\ 2 & 3 & 2\\ -4 & 1 & 2 \end{vmatrix} \end{equation*}

7.

Find the determinant using row operations.
\begin{equation*} \begin{vmatrix} 2 & 1 & 3\\ 2 & 4 & 2\\ 1 & 4 & -5 \end{vmatrix} \end{equation*}
Solution.
Here is one way to go about this: Subtracting row 1 from row 2 and then \(\frac{1}{2}\) row 1 from row 3.
\begin{equation*} \begin{vmatrix} 2 & 1 & 3\\ 0 & 3 & -1\\ 0 & \frac{7}{2} & -\frac{13}{2} \end{vmatrix} \end{equation*}
Then subracting \(\frac{7}{6}\) row 2 from row 3
\begin{equation*} \begin{vmatrix} 2 & 1 & 3\\ 0 & 3 & -1\\ 0 & 0 & -\frac{32}{6} \end{vmatrix} \end{equation*}
So our determinant is:
\begin{equation*} 2\cdot 3\cdot -\frac{32}{6} = - 32 \end{equation*}

8.

Find the determinant using row operations.
\begin{equation*} \begin{vmatrix} 1 & 2 & 1 & 2\\ 3 & 1 & -2 & 3\\ -1 & 0 & 3 & 1\\ 2 & 3 & 2 & -2\end{vmatrix} \end{equation*}

9.

Find the determinant using row operations.
\begin{equation*} \begin{vmatrix} 1 & 4 & 1 & 2\\ 3 & 2 & -2 & 3\\ -1 & 0 & 3 & 3\\ 2 & 1 & 2 & -2\end{vmatrix} \end{equation*}
Solution.
One way to do this is: Zeroing everything under row 1 in column 1. Subtract 3 times row 1 from row 2, add row 1 to row 3 and subtract 2 times row 1 from row 4.
\begin{equation*} \begin{vmatrix} 1 & 4 & 1 & 2\\ 0 & -10 & -5 & -3\\ 0 & 4 & 4 & 5\\ 0 & -7 & 0 & -6\end{vmatrix} \end{equation*}
Zeroing everything under row 2 in column 2. Add \(\frac{4}{10}\) times row 2 to row 3 and subtract \(\frac{7}{10}\) times row 2 from row 4.
\begin{equation*} \begin{vmatrix} 1 & 4 & 1 & 2\\ 0 & -10 & -5 & -3\\ 0 & 0 & 2 & \frac{19}{5}\\ 0 & 0 & \frac{7}{2} & \frac{-39}{10}\end{vmatrix} \end{equation*}
Zeroing everything under row 3 in column 3. Subtract \(\frac{7}{4}\) times row 3 from row 4.
\begin{equation*} \begin{vmatrix} 1 & 4 & 1 & 2\\ 0 & -10 & -5 & -3\\ 0 & 0 & 2 & \frac{19}{5}\\ 0 & 0 & 0 & -\frac{211}{20}\end{vmatrix} \end{equation*}
The determinant is the product of the diagonal values:
\begin{equation*} 1 \cdot -10 \cdot 2 \cdot -\frac{211}{20} = 211 \end{equation*}

10.

User Cramer’s rule to find the solution to
\begin{equation*} x + 2y = 1 \end{equation*}
\begin{equation*} 2x - y = 2 \end{equation*}

11.

User Cramer’s rule to find the solution to
\begin{equation*} x + 2y + z = 1 \end{equation*}
\begin{equation*} 2x - y - z = 2 \end{equation*}
\begin{equation*} x + z = 1 \end{equation*}
Solution.
So we have:
\begin{equation*} \begin{pmatrix} 1 &2 &1\\ 2 &-1 &-1\\ 1 &0 &1\\ \end{pmatrix} \begin{pmatrix} x\\ y\\ z\\ \end{pmatrix} = \begin{pmatrix} 1\\ 2\\ 1\\ \end{pmatrix} \end{equation*}
\begin{equation*} x = \dfrac{\begin{vmatrix} 1 &2 &1\\ 2 &-1 &-1\\ 1 &0 &1\\ \end{vmatrix}}{\begin{vmatrix} 1 &2 &1\\ 2 &-1 &-1\\ 1 &0 &1\\ \end{vmatrix}} = 1 \end{equation*}
(The matrices are the same top and bottom)
\begin{equation*} y = \dfrac{\begin{vmatrix} 1 &1 &1\\ 2 &2 &-1\\ 1 &1 &1\\ \end{vmatrix}}{\begin{vmatrix} 1 &2 &1\\ 2 &-1 &-1\\ 1 &0 &1\\ \end{vmatrix}} \end{equation*}
\begin{equation*} = (1\cdot 2\cdot 1)+(1\cdot -1\cdot 1)+(2\cdot 1\cdot 1) - (1\cdot 2\cdot 1) - (2\cdot 1\cdot 1) -(1\cdot -1\cdot 1) \end{equation*}
\begin{equation*} / ((1\cdot -1\cdot 1) + (2\cdot -1\cdot 1) + (1\cdot 2\cdot 0) - (1\cdot -1\cdot 1) - (2\cdot 2\cdot 1) - (1\cdot 0\cdot -1) \end{equation*}
\begin{equation*} = (2 -1 + 2 - 2 -2 + 1 )/(-1 -2 + 1 - 4) \end{equation*}
\begin{equation*} = 0 \end{equation*}
\begin{equation*} z = \dfrac{\begin{vmatrix} 1 &2 &1\\ 2 &-1 &2\\ 1 &0 &1\\ \end{vmatrix}}{\begin{vmatrix} 1 &2 &1\\ 2 &-1 &-1\\ 1 &0 &1\\ \end{vmatrix}} \end{equation*}
\begin{equation*} = (1\cdot -1\cdot 1) + (2\cdot 0\cdot 1) + (2\cdot 2\cdot 1) - (1\cdot -1\cdot 1) - (2\cdot 2\cdot 1) - (2\cdot 0\cdot 1) \end{equation*}
\begin{equation*} / ((1\cdot -1\cdot 1) + (2\cdot -1\cdot 1) + (1\cdot 2\cdot 0) - (1\cdot -1\cdot 1) - (2\cdot 2\cdot 1) - (1\cdot 0\cdot -1) \end{equation*}
\begin{equation*} = (-1 + 4 + 1 -4)/(-1 -2 + 1 - 4) \end{equation*}
\begin{equation*} = 0 \end{equation*}
\begin{equation*} \begin{pmatrix} x = 1\\ y = 0\\ z = 0\\ \end{pmatrix} \end{equation*}

12.

Here is a matrix,
\begin{equation*} \begin{pmatrix} 1 &2 &3\\ 0 &2 &1\\ 3 &1 &0\\ \end{pmatrix}. \end{equation*}
Determine whether the matrix has an inverse by finding whether the determinant is non-zero. If the determinant is non-zero, find the inverse using the formula Theorem 11.4.31 for the inverse which involves the cofactor matrix

13.

Here is a matrix,
\begin{equation*} \begin{pmatrix} 1 &2 &0\\ 0 &2 &1\\ 3 &1 &1\\ \end{pmatrix}. \end{equation*}
Determine whether the matrix has an inverse by finding whether the determinant is non-zero. If the determinant is non-zero, find the inverse using the formula Theorem 11.4.31 for the inverse which involves the cofactor matrix
Solution.
\begin{equation*} \begin{vmatrix} 1 & 2 & 0\\ 0 & 2 & 1\\ 3 & 1 & 1\\ \end{vmatrix} = (1\cdot 2\cdot 1) + (0\cdot 1\cdot 0) + (3\cdot 2\cdot 1) - (0\cdot 2\cdot 3) - (2\cdot 0\cdot 1) - (1\cdot 1\cdot 1) = 7 \end{equation*}
The determinant is 7 so there is an inverse. The inverse is then equal to:
\begin{equation*} 1/7 \begin{pmatrix} (-1)^{1+1}\begin{vmatrix} 2 & 1\\ 1 & 1\\ \end{vmatrix} &(-1)^{1+2} \begin{vmatrix} 0 & 1\\ 3 & 1\\ \end{vmatrix} & (-1)^{1+3}\begin{vmatrix} 0 & 2\\ 3 & 1\\ \end{vmatrix}\\&&\\ (-1)^{2+1}\begin{vmatrix} 2 & 0\\ 1 & 1\\ \end{vmatrix} & (-1)^{2+2}\begin{vmatrix} 1 & 0\\ 3 & 1\\ \end{vmatrix} &(-1)^{2+3}\begin{vmatrix} 1 & 2\\ 3 & 1\\ \end{vmatrix}\\& &\\ (-1)^{3+1}\begin{vmatrix} 2 & 0\\ 2 & 1\\ \end{vmatrix} & (-1)^{3+2}\begin{vmatrix} 1 & 0\\ 0 & 1\\ \end{vmatrix} & (-1)^{3+3}\begin{vmatrix} 1 & 2\\ 0 & 2\\ \end{vmatrix}\\ \end{pmatrix}^T \end{equation*}
\begin{equation*} = 1/7 \begin{pmatrix} 1 & 3 & -6\\ -2 & 1 & 5\\ 2 & -1 & 2\\ \end{pmatrix}^T \end{equation*}
\begin{equation*} = \begin{pmatrix} 1/7 & -2/7 & 2/7\\ 3/7 & 1/7 & -1/7\\ -6/7 & 5/7 & 2/7\\ \end{pmatrix} \end{equation*}

14.

Here is a matrix,
\begin{equation*} \begin{pmatrix} 1 &3 &3\\ 2 &4 &1\\ 0 &1 &1\\ \end{pmatrix}. \end{equation*}
Determine whether the matrix has an inverse by finding whether the determinant is non-zero. If the determinant is non-zero, find the inverse using the formula Theorem 11.4.31 for the inverse which involves the cofactor matrix

15.

Here is a matrix,
\begin{equation*} \begin{pmatrix} 1 &2 &3\\ 0 &2 &1\\ 2 &6 &7\\ \end{pmatrix}. \end{equation*}
Determine whether the matrix has an inverse by finding whether the determinant is non-zero. If the determinant is non-zero, find the inverse using the formula Theorem 11.4.31 for the inverse which involves the cofactor matrix
Solution.
\begin{equation*} \begin{vmatrix} 1 &2 &3\\ 0 &2 &1\\ 2 &6 &7\\ \end{vmatrix} \end{equation*}
\begin{equation*} = (1\cdot 2\cdot 7) + (2\cdot 1 \cdot2) +(0 \cdot 6 \cdot3) - (2\cdot2\cdot 3) -(2\cdot 0 \cdot 7) - (6 \cdot 1 \cdot 1) \end{equation*}
\begin{equation*} = 18 - 18 = 0 \end{equation*}
This matrix doesn’t have an inverse.

16.

Here is a matrix,
\begin{equation*} \begin{pmatrix} 1 &0 &3\\ 1 &0 &1\\ 3 &1 &0\\ \end{pmatrix}. \end{equation*}
Determine whether the matrix has an inverse by finding whether the determinant is non-zero. If the determinant is non-zero, find the inverse using the formula Theorem 11.4.31 for the inverse which involves the cofactor matrix.