# 3.1: Basic Techniques

- Page ID
- 14510

## Cofactors and 2 x 2 Determinants

- Evaluate the determinant of a square matrix using either Laplace Expansion or row operations.
- Demonstrate the effects that row operations have on determinants.
- Verify the following:
- The determinant of a product of matrices is the product of the determinants.
- The determinant of a matrix is equal to the determinant of its transpose.

Let \(A\) be an \(n\times n\) matrix. That is, let \(A\) be a square matrix. The **determinant** of \(A\), denoted by \(\det \left( A\right)\) is a very important number which we will explore throughout this section.

If \(A\) is a 2\(\times 2\) matrix, the determinant is given by the following formula.

Let \(A=\left[ \begin{array}{rr} a & b \\ c & d \end{array} \right] .\) Then \[\det \left( A\right) = ad-cb\nonumber \]

The determinant is also often denoted by enclosing the matrix with two vertical lines. Thus \[\det \left[ \begin{array}{rr} a & b \\ c & d \end{array} \right] =\left| \begin{array}{rr} a & b \\ c & d \end{array} \right| =ad - bc\nonumber \]

The following is an example of finding the determinant of a \(2 \times 2\) matrix.

Find \(\det\left(A\right)\) for the matrix \(A = \left[ \begin{array}{rr} 2 & 4 \\ -1 & 6 \end{array} \right] .\)

###### Solution

From Definition \(\PageIndex{1}\), \[\det \left( A\right) = \left( 2\right) \left( 6\right) -\left( -1\right) \left( 4\right) = 12 + 4 = 16\nonumber \]

The \(2 \times 2\) determinant can be used to find the determinant of larger matrices. We will now explore how to find the determinant of a \(3 \times 3\) matrix, using several tools including the \(2 \times 2\) determinant.

We begin with the following definition.

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

In general, if \(A\) is an \(n\times n\) matrix, then the \(ij^{th}\) minor of \(A\) is the determinant of the \(n-1 \times n-1\) matrix which results from deleting the \(i^{th}\) row and the \(j^{th}\) column of \(A\).

Hence, there is a minor associated with each entry of \(A\). Consider the following example which demonstrates this definition.

Let \[A = \left[ \begin{array}{rrr} 1 & 2 & 3 \\ 4 & 3 & 2 \\ 3 & 2 & 1 \end{array} \right]\nonumber \] Find \(minor\left( A\right) _{12}\) and \(minor\left( A\right) _{23}\).

###### Solution

First we will find \(minor\left( A\right) _{12}\). By Definition \(\PageIndex{2}\), this is the determinant of the \(2\times 2\) matrix which results when you delete the first row and the second column. This minor is given by \[minor \left(A\right)_{12} = \det \left[ \begin{array}{rr} 4 & 2 \\ 3 & 1 \end{array} \right]\nonumber \] Using Definition \(\PageIndex{1}\), we see that \[\det \left[ \begin{array}{rr} 4 & 2 \\ 3 & 1 \end{array} \right] = \left(4\right)\left(1\right) - \left(3\right)\left(2\right) = 4 - 6 = -2\nonumber\]

Therefore \(minor \left(A\right)_{12} = -2\).

Similarly, \(minor\left(A\right)_{23}\) 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 \[minor \left(A\right)_{23} = \det \left[ \begin{array}{rr} 1 & 2 \\ 3 & 2 \end{array} \right] = -4\nonumber \] Finding the other minors of \(A\) is left as an exercise.

The \(ij^{th}\) minor of a matrix \(A\) is used in another important definition, given next.

Suppose \(A\) is an \(n\times n\) matrix. The \(ij^{th}\) **cofactor**, denoted by \(\mathrm{cof}\left( A\right) _{ij}\) is defined to be \[\mathrm{cof}\left( A\right) _{ij} = \left( -1\right) ^{i+j} minor\left(A\right)_{ij}\nonumber \]

It is also convenient to refer to the cofactor of an entry of a matrix as follows. If \(a_{ij}\) is the \(ij^{th}\) entry of the matrix, then its cofactor is just \(\mathrm{cof}\left( A\right) _{ij}.\)

Consider the matrix \[A=\left[ \begin{array}{rrr} 1 & 2 & 3 \\ 4 & 3 & 2 \\ 3 & 2 & 1 \end{array} \right]\nonumber \] Find \(\mathrm{cof}\left( A\right) _{12}\) and \(\mathrm{cof}\left( A\right) _{23}\).

###### Solution

We will use Definition \(\PageIndex{3}\) to compute these cofactors.

First, we will compute \(\mathrm{cof}\left( A\right) _{12}\). Therefore, we need to find \(minor\left(A\right)_{12}\). This is the determinant of the \(2\times 2\) matrix which results when you delete the first row and the second column. Thus \(minor\left(A\right)_{12}\) is given by \[\det \left[ \begin{array}{rr} 4 & 2 \\ 3 & 1 \end{array} \right] = -2\nonumber \] Then, \[\mathrm{cof}\left( A\right) _{12}=\left( -1\right) ^{1+2} minor\left(A\right)_{12} =\left( -1\right) ^{1+2}\left( -2\right) =2\nonumber \] Hence, \(\mathrm{cof}\left( A\right) _{12}=2\).

Similarly, we can find \(\mathrm{cof}\left( A\right) _{23}\). First, find \(minor\left(A\right)_{23}\), which 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 \[\det \left[ \begin{array}{rr} 1 & 2 \\ 3 & 2 \end{array} \right] = -4\nonumber \] Hence, \[\mathrm{cof}\left( A\right) _{23}=\left( -1\right) ^{2+3} minor\left(A\right)_{23} =\left( -1\right) ^{2+3}\left( -4\right) =4\nonumber \]

You may wish to find the remaining cofactors for the above matrix. Remember that there is a cofactor for every entry in the matrix.

We have now established the tools we need to find the determinant of a \(3 \times3\) matrix.

Let \(A\) be a \(3\times 3\) matrix. Then, \(\det \left(A\right)\) is calculated by picking a row (or column) and taking the product of each entry in that row (column) with its cofactor and adding these products together.

This process when applied to the \(i^{th}\) row (column) is known as **expanding along the \(i^{th}\) row (column)** as is given by \[\det \left(A\right) = a_{i1}\mathrm{cof}(A)_{i1} + a_{i2}\mathrm{cof}(A)_{i2} + a_{i3}\mathrm{cof}(A)_{i3}\nonumber \]

When calculating the determinant, you can choose to expand any row or any column. Regardless of your choice, you will always get the same number which is the determinant of the matrix \(A.\) This method of evaluating a determinant by expanding along a row or a column is called **Laplace Expansion** or **Cofactor Expansion**.

Consider the following example.

Let \[A=\left[ \begin{array}{rrr} 1 & 2 & 3 \\ 4 & 3 & 2 \\ 3 & 2 & 1 \end{array} \right]\nonumber \] Find \(\det\left(A\right)\) using the method of Laplace Expansion.

###### Solution

First, we will calculate \(\det \left(A\right)\) by expanding along the first column. Using Definition \(\PageIndex{4}\), we take the \(1\) in the first column and multiply it by its cofactor, \[1 \left( -1\right) ^{1+1}\left| \begin{array}{rr} 3 & 2 \\ 2 & 1 \end{array} \right| = (1)(1)(-1) = -1\nonumber \] Similarly, we take the \(4\) in the first column and multiply it by its cofactor, as well as with the \(3\) in the first column. Finally, we add these numbers together, as given in the following equation. \[\det \left(A\right) = 1 \overset{ \mathrm{cof}\left( A\right) _{11}}{\overbrace{\left( -1\right) ^{1+1}\left| \begin{array}{rr} 3 & 2 \\ 2 & 1 \end{array} \right| }}+4 \overset{\mathrm{cof}\left( A\right) _{21}}{\overbrace{\left( -1\right) ^{2+1}\left| \begin{array}{rr} 2 & 3 \\ 2 & 1 \end{array} \right| }}+3 \overset{\mathrm{cof}\left( A\right) _{31}}{\overbrace{\left( -1\right) ^{3+1}\left| \begin{array}{rr} 2 & 3 \\ 3 & 2 \end{array} \right| }}\nonumber \] Calculating each of these, we obtain \[\det \left(A\right) = 1 \left(1\right)\left(-1\right) + 4 \left(-1\right)\left(-4\right) + 3 \left(1\right)\left(-5\right) = -1 + 16 + -15 = 0\nonumber \] Hence, \(\det\left(A\right) = 0\).

As mentioned in Definition \(\PageIndex{4}\), we can choose to expand along any row or column. Let’s try now by expanding along the second row. Here, we take the \(4\) in the second row and multiply it to its cofactor, then add this to the \(3\) in the second row multiplied by its cofactor, and the \(2\) in the second row multiplied by its cofactor. The calculation is as follows. \[\det \left(A\right) = 4 \overset{\mathrm{cof}\left( A\right) _{21}}{\overbrace{\left( -1\right) ^{2+1}\left| \begin{array}{rr} 2 & 3 \\ 2 & 1 \end{array} \right| }}+3 \overset{\mathrm{cof}\left( A\right) _{22}}{\overbrace{\left( -1\right) ^{2+2}\left| \begin{array}{rr} 1 & 3 \\ 3 & 1 \end{array} \right| }}+2 \overset{\mathrm{cof}\left( A\right) _{23}}{\overbrace{\left( -1\right) ^{2+3}\left| \begin{array}{rr} 1 & 2 \\ 3 & 2 \end{array} \right| }}\nonumber \]

Calculating each of these products, we obtain \[\det \left(A\right) = 4\left(-1\right)\left(-2\right) + 3\left(1\right)\left(-8\right) + 2 \left(-1\right)\left(-4\right) = 0\nonumber \]

You can see that for both methods, we obtained \(\det \left(A\right) = 0\).

As mentioned above, we will always come up with the same value for \(\det \left(A\right)\) regardless of the row or column we choose to expand along. You should try to compute the above determinant by expanding along other rows and columns. This is a good way to check your work, because you should come up with the same number each time!

We present this idea formally in the following theorem.

Expanding the \(n\times n\) matrix along any row or column always gives the same answer, which is the determinant.

We have now looked at the determinant of \(2 \times 2\) and \(3 \times 3\) matrices. It turns out that the method used to calculate the determinant of a \(3 \times 3\) matrix can be used to calculate the determinant of any sized matrix. Notice that Definition \(\PageIndex{2}\), Definition \(\PageIndex{3}\) and Definition \(\PageIndex{4}\) can all be applied to a matrix of any size.

For example, the \(ij^{th}\) minor of a \(4 \times 4\) matrix is the determinant of the \(3 \times 3\) matrix you obtain when you delete the \(i^{th}\) row and the \(j^{th}\) column. Just as with the \(3 \times 3\) determinant, we can compute the determinant of a \(4 \times 4\) matrix by Laplace Expansion, along any row or column

Consider the following example.

Find \(\det \left( A\right)\) where \[A=\left[ \begin{array}{rrrr} 1 & 2 & 3 & 4 \\ 5 & 4 & 2 & 3 \\ 1 & 3 & 4 & 5 \\ 3 & 4 & 3 & 2 \end{array} \right]\nonumber \]

###### 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. Then, using Laplace Expansion, \[\det \left( A\right) = 3\left( -1\right) ^{1+3}\left\vert \begin{array}{rrr} 5 & 4 & 3 \\ 1 & 3 & 5 \\ 3 & 4 & 2 \end{array} \right\vert +2\left( -1\right) ^{2+3}\left\vert \begin{array}{rrr} 1 & 2 & 4 \\ 1 & 3 & 5 \\ 3 & 4 & 2 \end{array} \right\vert +\nonumber \] \[4\left( -1\right) ^{3+3}\left\vert \begin{array}{rrr} 1 & 2 & 4 \\ 5 & 4 & 3 \\ 3 & 4 & 2 \end{array} \right\vert +3\left( -1\right) ^{4+3}\left\vert \begin{array}{rrr} 1 & 2 & 4 \\ 5 & 4 & 3 \\ 1 & 3 & 5 \end{array} \right\vert\nonumber \]

Now, you can calculate each \(3 \times 3\) determinant using Laplace Expansion, as we did above. You should complete these as an exercise and verify that \(\det \left( A \right)= -12\).

The following provides a formal definition for the determinant of an \(n \times n\) matrix. You may wish to take a moment and consider the above definitions for \(2 \times 2\) and \(3 \times 3\) determinants in context of this definition.

Let \(A\) be an \(n\times n\) matrix where \(n\geq 2\) and suppose the determinant of an \(\left( n-1\right) \times \left( n-1\right)\) has been defined. Then \[\det \left( A\right) =\sum_{j=1}^{n}a_{ij}\mathrm{cof}\left( A\right) _{ij}=\sum_{i=1}^{n}a_{ij}\mathrm{cof}\left( A\right) _{ij}\nonumber \] The first formula consists of expanding the determinant along the \(i^{th}\) row and the second expands the determinant along the \(j^{th}\) column.

In the following sections, we will explore some important properties and characteristics of the determinant.

## The Determinant of a Triangular Matrix

There is a certain type of matrix for which finding the determinant is a very simple procedure. Consider the following definition.

A matrix \(A\) is upper triangular if \(a_{ij}=0\) whenever \(i>j\). Thus the entries of such a matrix below the main diagonal equal \(0\), as shown. Here, \(\ast\) refers to any nonzero number. \[ \left[ \begin{array}{cccc} \ast & \ast & \cdots & \ast \\ 0 & \ast & \cdots & \vdots \\ \vdots & \vdots & \ddots & \ast \\ 0 & \cdots & 0 & \ast \end{array} \right]\nonumber \] A lower triangular matrix is defined similarly as a matrix for which all entries above the main diagonal are equal to zero.

The following theorem provides a useful way to calculate the determinant of a triangular matrix.

Let \(A\) be an upper or lower triangular matrix. Then \(\det \left( A\right)\) is obtained by taking the product of the entries on the main diagonal.

The verification of this Theorem can be done by computing the determinant using Laplace Expansion along the first row or column.

Consider the following example.

Let \[A=\left[ \begin{array}{rrrr} 1 & 2 & 3 & 77 \\ 0 & 2 & 6 & 7 \\ 0 & 0 & 3 & 33.7 \\ 0 & 0 & 0 & -1 \end{array} \right]\nonumber \] Find \(\det \left( A\right) .\)

###### Solution

From Theorem \(\PageIndex{2}\), it suffices to take the product of the elements on the main diagonal. Thus \(\det \left( A\right) =1\times 2\times 3\times \left( -1\right) =-6.\)

Without using Theorem \(\PageIndex{2}\), you could use Laplace Expansion. We will expand along the first column. This gives \[\begin{aligned} \det \left(A\right) = &1\left| \begin{array}{rrr} 2 & 6 & 7 \\ 0 & 3 & 33.7 \\ 0 & 0 & -1 \end{array} \right| +0\left( -1\right) ^{2+1}\left| \begin{array}{rrr} 2 & 3 & 77 \\ 0 & 3 & 33.7 \\ 0 & 0 & -1 \end{array} \right| + \\ &0\left( -1\right) ^{3+1}\left| \begin{array}{rrr} 2 & 3 & 77 \\ 2 & 6 & 7 \\ 0 & 0 & -1 \end{array} \right| +0\left( -1\right) ^{4+1}\left| \begin{array}{rrr} 2 & 3 & 77 \\ 2 & 6 & 7 \\ 0 & 3 & 33.7 \end{array} \right|\end{aligned}\] and the only nonzero term in the expansion is \[1\left| \begin{array}{rrr} 2 & 6 & 7 \\ 0 & 3 & 33.7 \\ 0 & 0 & -1 \end{array} \right|\nonumber \] Now find the determinant of this \(3 \times 3\) matrix, by expanding along the first column to obtain \[\det \left(A\right) = 1\times \left( 2\times \left| \begin{array}{rr} 3 & 33.7 \\ 0 & -1 \end{array} \right| +0\left( -1\right) ^{2+1}\left| \begin{array}{rr} 6 & 7 \\ 0 & -1 \end{array} \right| +0\left( -1\right) ^{3+1}\left| \begin{array}{rr} 6 & 7 \\ 3 & 33.7 \end{array} \right| \right)\nonumber \] \[=1\times 2\times \left| \begin{array}{rr} 3 & 33.7 \\ 0 & -1 \end{array} \right|\nonumber \] Next use Definition \(\PageIndex{1}\) to find the determinant of this \(2 \times 2\) matrix, which is just \(3 \times -1 - 0 \times 33.7 = -3\). Putting all these steps together, we have \[\det \left(A\right) = 1\times 2\times 3\times \left( -1\right) =-6\nonumber \] which is just the product of the entries down the main diagonal of the original matrix!

You can see that while both methods result in the same answer, Theorem \(\PageIndex{2}\) provides a much quicker method.

In the next section, we explore some important properties of determinants.