Determinant of a 4×4 matrix

We explain how to solve the determinant of a 4×4 matrix with an example. Also, you will find solved exercises so that you can practice and perfectly understand how to compute the determinant of a 4×4 matrix.

How to find the determinant of a 4×4 matrix using row operations and cofactor expansion

Let’s see how to compute the determinant of a 4×4 matrix solving an example:

\begin{vmatrix} 1 & 4 & 2 & 1 \\[1.1ex] -1 & -1 & 3 & 2 \\[1.1ex] 0 & 5 & 7 & -4 \\[1.1ex] 2 & 1 & -3 & 2 \end{vmatrix}

The first step in computing the determinant of a 4×4 matrix is to make zero all the elements of a column except one using elementary row operations.

We can perform elementary row operations thanks to the properties of determinants.

In this case, the first column already has a zero. Thus, we are going to transform all the entries in the first column to 0 except for the number 1 (since it is easier to do calculations with the row that has a 1). To do so, we add the first row to the second row, and we subtract the first row multiplied by 2 from the fourth row:

\begin{vmatrix} 1 & 4 & 2 & 1 \\[1.1ex] -1 & -1 & 3 & 2 \\[1.1ex] 0 & 5 & 7 & -4 \\[1.1ex] 2 & 1 & -3 & 2 \end{vmatrix} \begin{matrix} \\[1.1ex] \xrightarrow{R_2+R_1} \\[1.1ex] \\[1.1ex] \xrightarrow{R_4-2R_1} \end{matrix} \begin{vmatrix} 1 & 4 & 2 & 1 \\[1.1ex] 0 & 3 & 5 & 3 \\[1.1ex] 0 & 5 & 7 & -4 \\[1.1ex] 0 & -7 & -7 & 0 \end{vmatrix}

Once we have transformed to 0 all the elements except one of the chosen column, we compute the determinant of the 4×4 matrix using cofactor expansion.

The cofactor expansion is a method to find determinants which consists in adding the products of the elements of a column by their respective cofactors.

Being the i, j cofactor of the matrix defined by:

C_{i,j}=(-1)^{i+j}\cdot M_{ij}

Where Mij is the i, j minor of the matrix, that is, the determinant that results from deleting the i-th row and the j-th column of the matrix.

So, we add the products of the elements in the first column by their respective cofactors:

\begin{vmatrix}1&4&2&1\\[1.1ex]0&3&5&3\\[1.1ex]0&5&7&-4\\[1.1ex]0&-7&-7&0\end{vmatrix} \displaystyle = 1\cdot C_{1,1}+0\cdot C_{2,1}+0\cdot C_{3,1}+0\cdot C_{4,1}

The terms multiplied by 0 cancel out, so we simplify them:

\begin{vmatrix}1&4&2&1\\[1.1ex]0&3&5&3\\[1.1ex]0&5&7&-4\\[1.1ex]0&-7&-7&0\end{vmatrix} \displaystyle = 1\cdot C_{1,1}

\begin{vmatrix}1&4&2&1\\[1.1ex]0&3&5&3\\[1.1ex]0&5&7&-4\\[1.1ex]0&-7&-7&0\end{vmatrix} \displaystyle =C_{1,1}

So we have to compute the cofactor of the first row and the first column, that is, (-1) raised to 1+1 (1st row and 1st column) multiplied by the determinant that results from deleting the first row and the first column of the 4×4 matrix.

\displaystyle \begin{vmatrix}1&4&2&1\\[1.1ex]0&3&5&3\\[1.1ex]0&5&7&-4\\[1.1ex]0&-7&-7&0\end{vmatrix}= (-1)^{1+1} \cdot \begin{vmatrix}  3 & 5 & 3 \\[1.1ex] 5 & 7 & -4 \\[1.1ex] -7 & -7 & 0 \end{vmatrix}

And, finally, we simply have to find the determinant of a 3×3 matrix:

\displaystyle\begin{vmatrix}1&4&2&1\\[1.1ex]0&3&5&3\\[1.1ex]0&5&7&-4\\[1.1ex]0&-7&-7&0\end{vmatrix}=1\cdot \begin{vmatrix}  3 & 5 & 3 \\[1.1ex] 5 & 7 & -4 \\[1.1ex] -7 & -7 & 0 \end{vmatrix}=98

Thus, we have solved the determinant of a 4×4 matrix using row operations and the cofactor expansion.

Practice problems on finding the determinant of a 4×4 matrix

Problem 1

Find the determinant of the following square matrix of order 4:

 \displaystyle \begin{pmatrix} 2 & 3 & -1 & 0 \\[1.1ex] 0 & 1 & 1 & 1 \\[1.1ex] 2 & 3 & 1 & -1 \\[1.1ex] 4 & 1 & 2 & 0 \end{pmatrix}

We will find the determinant of the 4×4 matrix with the cofactor expansion method, also called Laplace expansion. But first we do elementary operations with the rows in order to transform to zero all the elements of a column except one :

 \begin{vmatrix} 2 & 3 & -1 & 0 \\[1.1ex] 0 & 1 & 1 & 1 \\[1.1ex] 2 & 3 & 1 & -1 \\[1.1ex] 4 & 1 & 2 & 0 \end{vmatrix} \begin{matrix} \\[1.1ex] \\[1.1ex] \xrightarrow{R_3 + R_2} \\[1.1ex] \ \end{matrix} \begin{vmatrix} 2 & 3 & -1 & 0 \\[1.1ex] 0 & 1 & 1 & 1 \\[1.1ex] 2 & 4 & 2 & 0 \\[1.1ex] 4 & 1 & 2 & 0 \end{vmatrix}

And now we compute the 4×4 determinant using the cofactor expansion:

\displaystyle\begin{vmatrix} 2 & 3 & -1 & 0 \\[1.1ex] 0 & 1 & 1 & 1 \\[1.1ex] 2 & 4 & 2 & 0 \\[1.1ex] 4 & 1 & 2 & 0 \end{vmatrix} = 0\cdot C_{14} +1\cdot C_{24} +0\cdot C_{34}+ 0\cdot C_{44}

We simplify the terms:

\displaystyle\begin{vmatrix} 2 & 3 & -1 & 0 \\[1.1ex] 0 & 1 & 1 & 1 \\[1.1ex] 2 & 4 & 2 & 0 \\[1.1ex] 4 & 1 & 2 & 0 \end{vmatrix}=C_{24}

And finally we perform the cofactor:

 \displaystyle \begin{vmatrix} 2 & 3 & -1 & 0 \\[1.1ex] 0 & 1 & 1 & 1 \\[1.1ex] 2 & 4 & 2 & 0 \\[1.1ex] 4 & 1 & 2 & 0 \end{vmatrix}= (-1)^{2+4} \cdot \begin{vmatrix} 2 & 3 & -1 \\[1.1ex] 2 & 4 & 2 \\[1.1ex]4 & 1 & 2 \end{vmatrix}=1\cdot38=\bm{38}

 

Problem 2

Compute the determinant of the following 4×4 matrix:

 \displaystyle \begin{pmatrix} 1 & 3 & -2 & 2 \\[1.1ex] 2 & 0 & 1 & 4 \\[1.1ex] 1 & 1 & 2 & 3 \\[1.1ex] 5 & -1 & 3 & 1 \end{pmatrix}

We will calculate the determinant of the 4×4 determinant by the cofactor expansion formula. But we first do elementary operations with the rows to convert all the elements of a column except one to zero:

\displaystyle\begin{vmatrix} 1 & 3 & -2 & 2 \\[1.1ex] 2 & 0 & 1 & 4 \\[1.1ex] 1 & 1 & 2 & 3 \\[1.1ex] 5 & -1 & 3 & 1 \end{vmatrix} \begin{matrix} \xrightarrow{R_1 - 3R_3} \\[1.1ex] \\[1.1ex] \\[1.1ex] \xrightarrow{R_4 + R_3} \end{matrix} \begin{vmatrix}-2 & 0 & -8 & -7 \\[1.1ex] 2 & 0 & 1 & 4 \\[1.1ex] 1 & 1 & 2 & 3 \\[1.1ex] 6 & 0 & 5 & 4 \end{vmatrix}

Now we solve the determinant of the 4×4 by cofactor expansion:

\displaystyle\begin{vmatrix} -2 & 0 & -8 & -7 \\[1.1ex] 2 & 0 & 1 & 4 \\[1.1ex] 1 & 1 & 2 & 3 \\[1.1ex] 6 & 0 & 5 & 4\end{vmatrix} = 0\cdot C_{12}+0\cdot C_{22} +1\cdot C_{32}+ 0\cdot C_{42}

We simplify the terms:

\displaystyle\begin{vmatrix} -2 & 0 & -8 & -7 \\[1.1ex] 2 & 0 & 1 & 4 \\[1.1ex] 1 & 1 & 2 & 3 \\[1.1ex] 6 & 0 & 5 & 4\end{vmatrix}=C_{32}

And we compute the cofactor of the third row and the second column:

\displaystyle\begin{vmatrix} -2 & 0 & -8 & -7 \\[1.1ex] 2 & 0 & 1 & 4 \\[1.1ex] 1 & 1 & 2 & 3 \\[1.1ex] 6 & 0 & 5 & 4\end{vmatrix}=(-1)^{3+2} \begin{vmatrix}-2 & -8 & -7 \\[1.1ex] 2 & 1 & 4 \\[1.1ex] 6 & 5 & 4\end{vmatrix}=-1\cdot (-124) =\bm{124}

 

Problem 3

Evaluate the determinant of the following 4×4 matrix:

 \displaystyle \begin{pmatrix} 2 & -2 & -1 & 3 \\[1.1ex] 4 & 3 & 1 & -2 \\[1.1ex] -1 & 2 & 1 & -1 \\[1.1ex] 3 & -2 & -4 & 5 \end{pmatrix}

First of all, we will simplify the determinant of the 4×4 using row operations. The objetive is to make zeroes all the entries of a column except one:

 \begin{vmatrix}2 & -2 & -1 & 3 \\[1.1ex] 4 & 3 & 1 & -2 \\[1.1ex] -1 & 2 & 1 & -1 \\[1.1ex] 3 & -2 & -4 & 5 \end{vmatrix} \begin{matrix} \xrightarrow{R_1 + R_2} \\[1.1ex] \\[1.1ex]\xrightarrow{R_3 - R_2} \\[1.1ex] \xrightarrow{R_4 + 4R_2} \end{matrix} \begin{vmatrix}6 & 1 & 0 & 1 \\[1.1ex] 4 & 3 & 1 & -2 \\[1.1ex] -5 & -1 & 0 & 1 \\[1.1ex] 19 & 10 & 0 & -3 \end{vmatrix}

Now we solve the 4×4 determinant using cofactor expansion:

\displaystyle\begin{vmatrix}6 & 1 & 0 & 1 \\[1.1ex] 4 & 3 & 1 & -2 \\[1.1ex] -5 & -1 & 0 & 1 \\[1.1ex] 19 & 10 & 0 & -3 \end{vmatrix}  = 0\cdot C_{13} +1\cdot C_{23} +0\cdot C_{33}+ 0\cdot C_{43}

We simplify all the cofactors multiplied by 0:

\displaystyle\begin{vmatrix}6 & 1 & 0 & 1 \\[1.1ex] 4 & 3 & 1 & -2 \\[1.1ex] -5 & -1 & 0 & 1 \\[1.1ex] 19 & 10 & 0 & -3 \end{vmatrix}=C_{23}

And we find the 4×4 determinant by solving the cofactor:

\displaystyle \begin{vmatrix}6 & 1 & 0 & 1 \\[1.1ex] 4 & 3 & 1 & -2 \\[1.1ex] -5 & -1 & 0 & 1 \\[1.1ex] 19 & 10 & 0 & -3 \end{vmatrix}= (-1)^{2+3} \begin{vmatrix}6&1&1\\[1.1ex]-5&-1&1\\[1.1ex]19&10&-3\end{vmatrix}=-1\cdot (-69)=\bm{69}

 

Problem 4

Calculate the determinant of the following 4×4 dimension matrix:

\displaystyle \begin{pmatrix} 3 & 4 & -2 & -1 \\[1.1ex] 2 & -2 & 5 & -5 \\[1.1ex] -3 & 5 & 2 & 6 \\[1.1ex] -1 & -2 & -1 & 3 \end{pmatrix}

We will calculate the determinant 4×4 by the Laplace’s rule. But first we must do operations with the rows to make zero all the elements of a column except one:

\begin{vmatrix}3 & 4 & -2 & -1 \\[1.1ex] 2 & -2 & 5 & -5 \\[1.1ex] -3 & 5 & 2 & 6 \\[1.1ex] -1 & -2 & -1 & 3\end{vmatrix} \begin{matrix} \xrightarrow{R_1 + 3R_4} \\[1.1ex] \xrightarrow{R_2 +2R_4} \\[1.1ex]\xrightarrow{R_3 - 3R_4} \\[1.1ex] \ \end{matrix} \begin{vmatrix}0 & -2 & -5 & 8 \\[1.1ex]0 & -6 & 3 & 1 \\[1.1ex] 0 & 11 & 5 & -3 \\[1.1ex] -1 & -2 & -1 & 3\end{vmatrix}

Now we find the 4-by-4 determinant by using the cofactors expansion method:

\displaystyle\begin{vmatrix}0 & -2 & -5 & 8 \\[1.1ex]0 & -6 & 3 & 1 \\[1.1ex] 0 & 11 & 5 & -3 \\[1.1ex] -1 & -2 & -1 & 3 \end{vmatrix}=0\cdot C_{11}+0\cdot C_{21}+0\cdot C_{31}-1\cdot C_{41}

We solve the products:

\displaystyle\begin{vmatrix}0 & -2 & -5 & 8 \\[1.1ex]0 & -6 & 3 & 1 \\[1.1ex] 0 & 11 & 5 & -3 \\[1.1ex] -1 & -2 & -1 & 3 \end{vmatrix}=-C_{41}

And we find the cofactor from the first column and the fourth row:

\displaystyle\begin{aligned}\begin{vmatrix}0 & -2 & -5 & 8 \\[1.1ex]0 & -6 & 3 & 1 \\[1.1ex] 0 & 11 & 5 & -3 \\[1.1ex] -1 & -2 & -1 & 3 \end{vmatrix}&=-(-1)^{4+1}\begin{vmatrix}-2&-5&8\\[1.1ex]-6&3&1\\[1.1ex]11&5&-3\end{vmatrix}\\ &=-(-1)\cdot (-441) \\[2ex] &=\bm{-441}\end{aligned}

 

2 thoughts on “Determinant of a 4×4 matrix”

  1. Chase McKinley

    Thanks so much for this! This made determinants substantially less tedious to take for 4×4 matrices. Excellent practice problems/explanations!

Leave a Comment

Your email address will not be published.

Scroll to Top