# Finding a Determinant (Part 1)

In Does that Matrix have an Inverse?, we saw that a matrix has an inverse if and only if its determinant is non-zero. In this post, we will actually work through an example of finding a determinant of a $$3 \times 3$$ matrix.

## Find the determinant

Find the determinant of
$A=\begin{bmatrix} 1 & 2 & 1 & -1 \\ 0 & 1 & 0 & 2 \\ 0 & 3 & -1 & 1\\ 1 & 2 & 5 & 0 \end{bmatrix}.$

In order to find the determinant, recall that we must find
\begin{align*}
|A|&=\sum_{i=1}^{n}(-1)^{i+j}a_{ij}|M_{ij}| \\
&=\sum_{j=1}^{n}(-1)^{i+j}a_{ij}|M_{ij}|,
\end{align*}
for some $$i$$ or $$j$$. That is, we will pick a row, or column, and multiply the entries by the determinant of the matrices resulting from the matrix obtained by deleting the row or column of that entry. We then multiply by 1 or $$-1$$ depending on the sum of the row and column and take the sum of these values.

Note that it is helpful to pick a row or column with multiple zeroes in it, since this will result in less work. Therefore, we will choose to work with the first column.

### First Column

As we work with the first column, we begin by writing out the sum as we have above filling in what we know. In particular, we get that the entry in the first row first column is 1, and the entries in the second and third row are 0, and the entry in the fourth row is 1. Therefore,
\begin{align*}
|A|&=\sum_{i=1}^{4}(-1)^{i+j}a_{i1}|M_{i1}| \\
&=1|M_{11}|-0|M_{21}|+0|M_{31}|-1|M_{41}|.
\end{align*}

In order to finish calculating this, we will need to find the determinants of the remaining matrices.

### $$|M_{11}|$$

Note that $$M_{11}$$ the matrix obtained from our original matrix by deleting the first row and the first column. If we do this, we get
\begin{align*}A&=\begin{bmatrix}
1 | & 2 & 1 & -1 \\ \hline
0 |& 1 & 0 & 2 \\
0 |& 3 & -1 & 1\\
1 |& 2 & 5 & 0
\end{bmatrix}, \text{ so } \\
M_{11}&=\begin{bmatrix}
1 & 0 & 2 \\
3 & -1 & 1\\
2 & 5 & 0
\end{bmatrix}\end{align*}

We now have to find the determinant if $$M_{11}$$. In order to do so, we should pick a row or a column (preferably with some zeroes in it) to continue our process. In this case, we will go with the third column.

#### Third column of $$M_{11}$$

In order to keep the notation clear, we will let the entries of $$M_{11}$$ be $$b_{ij}$$ and the matrices determined by deleting the rows and columns of $$M_{11}$$ will be written as $$M’_{ij}$$. We now get that
\begin{align*}
|M_{11}|&=\sum_{i=1}^{3}(-1)^{i+j}b_{ij}|M’_{ij}| \\
&=2|M’_{13}|-1|M’_{23}|+0|M’_{31}|.
\end{align*}

Now we need to find $$|M’_{13}|$$ and $$|M’_{23}|$$ if we want to finish calculating this. At this point, we can refer to our last post to see that the determinant of a $$2 \times 2$$ matrix was given as $$a_{11}a_{22}-a_{12}a_{21}$$. Using this, we see that
\begin{align*}
|M’_{13}|&=|\begin{bmatrix} 3 & -1 \\ 2 & 5 \end{bmatrix}|=3*5-(-1)*2=17, \\
|M’_{23}|&=|\begin{bmatrix} 1 & 0 \\ 2 & 5 \end{bmatrix}|=1*5-0*2=5.
\end{align*}

Therefore, we now get that
\begin{align*}
|M_{11}|&=\sum_{i=1}^{3}(-1)^{i+j}b_{ij}|M’_{ij}| \\
&=2|M’_{13}|-1|M’_{23}|+0|M’_{31}| \\
&=2(17)-1(5)+0 \\
&=29.
\end{align*}

### $$|M_{41}|$$

Now that we’ve found the determinant of $$M_{11}$$, the last piece we need to calculate is the determinant of $$M_{41}$$. Similar to what we did with $$M_{11}$$, we will first find the matrix $$M_{41}$$. Here we would get
\begin{align*}A&=\begin{bmatrix}
1 | & 2 & 1 & -1 \\
0 |& 1 & 0 & 2 \\
0 |& 3 & -1 & 1\\ \hline
1 |& 2 & 5 & 0
\end{bmatrix}, \text{ so } \\
M_{41}&=\begin{bmatrix}
2 & 1 & -1\\
1 & 0 & 2 \\
3 & -1 & 1
\end{bmatrix}\end{align*}

With the matrix determined, we now need to calculate its determinant. In this case, we will use the second row to determinant of the matrix. In the same way we did last time, we will denote the terms in $$M_{41}$$ as $$b_{ij}$$ and the resulting matrices as $$M’_{ij}$$.
That is, we will find that
\begin{align*}
|M_{41}|&=\sum_{j=1}^{3}(-1)^{i+j}(b_{2j})|M_{2j}| \\
&=-1|M’_{21}|+0|M_{22}|-2|M’_{23}|.
\end{align*}

Next, we need the determinant of the remaining $$2 \times 2$$ matrices. In this case, we get
\begin{align*}
|M’_{21}|&=|\begin{bmatrix} 1 & -1 \\ -1 & 1 \end{bmatrix}|=1*1-(-1)(-1)=0 \\
|M’_{23}|&=|\begin{bmatrix} 2 & 1 \\ 3 & -1 \end{bmatrix}|=2*(-1)-3*1=-5.
\end{align*}

Hence, we get that
\begin{align*}
|M_{41}|&=\sum_{j=1}^{3}(-1)^{i+j}(b_{2j})|M_{2j}| \\
&=-1|M’_{21}|+0|M_{22}|-2|M’_{23}| \\
&=-1(0)+0-2(-5)=10.
\end{align*}

### Putting it all together

Now that we have all the pieces we need calculated, we are ready to find $$|A|$$. Substituting in what we know, we now get
\begin{align*}
|A|&=\sum_{i=1}^{4}(-1)^{i+j}a_{i1}|M_{i1}| \\
&=1|M_{11}|-0|M_{21}|+0|M_{31}|-1|M_{41}| \\
&=1*(29)-0+0-1(10) \\
&=19.
\end{align*}

Hence, the determinant of the matrix is $$19$$. As a further note, we know that $$-19 \neq 0$$, so this matrix would be invertible.

## Conclusion

I hope that working through this problem helped you to get comfortable with the process of finding determinant. We should note that there were a significant number of calculations here, and there could be many more if we had an even larger matrix. The important thing to remember is that it is easy to make mistakes when performing so many calculations. Therefore, takes things one step at a time and make sure to be careful each step of the way.

If you found this helpful, make sure to share it with someone else that may need the help with linear algebra. Also, be sure to subscribe to our YouTube channel to see the videos that accompany these posts.

## 3 thoughts on “Finding a Determinant (Part 1)”

This site uses Akismet to reduce spam. Learn how your comment data is processed.