# How to find the determinant of this $5 \times 5$ matrix?

How can I find the determinant of this matrix?

I know in matrix $3 \times 3$

$$A= 1(5\cdot 9-8\cdot 6)-2 (4\cdot 9-7\cdot 6)+3(4\cdot 8-7\cdot 5)$$

but how to work with a $5\times 5$ matrix?

• The 3rd row looks good. Expand along it. Like this – user147263 Oct 28 '15 at 18:00
• The suggestions to use Laplace expansion or row-and-column reduction are generally better than the "signed sum over all permutations" formula, because, for a $5\times5$ matrix, there are $5!=120$ permutations. In this case, though, only $8$ permutations contribute non-zero terms to the sum, so even that horrible permutation formula wouldn't be all that bad. – Andreas Blass Oct 28 '15 at 19:53

Once the matrix starts getting large, it can be easier to use row- or column-reduction to find the determinant, especially if there aren’t many sparse rows or columns to take advantage of in iterated Laplace expansions. This technique makes use of the facts that swapping two rows/columns changes the sign of the determinant, multiplying a row/column by a scalar multiplies the determinant by the same amount, and adding a scalar multiple of a row/column to another leaves the determinant unchanged.

For your matrix, we can start by adding $3$ times the first row to the fourth: $$\begin{vmatrix} 1 & 2 & 3 & 4 & 1 \\ 0 & -1 & 2 & 4 & 2 \\ 0 & 0 & 4 & 0 & 0 \\ 0 & 0 & 0 & 0 & 7 \\ 0 & 0 & 1 & 1 & 1 \notag \end{vmatrix}$$ Clear the first and second rows:$$\begin{vmatrix} 1 & 0 & 0 & 0 & 0 \\ 0 & -1 & 0 & 0 & 0 \\ 0 & 0 & 4 & 0 & 0 \\ 0 & 0 & 0 & 0 & 7 \\ 0 & 0 & 1 & 1 & 1 \notag \end{vmatrix}$$ Clear the third and last columns:$$\begin{vmatrix} 1 & 0 & 0 & 0 & 0 \\ 0 & -1 & 0 & 0 & 0 \\ 0 & 0 & 4 & 0 & 0 \\ 0 & 0 & 0 & 0 & 7 \\ 0 & 0 & 0 & 1 & 0 \notag \end{vmatrix}$$ Swap the fourth and fifth rows:$$-1\cdot\begin{vmatrix} 1 & 0 & 0 & 0 & 0 \\ 0 & -1 & 0 & 0 & 0 \\ 0 & 0 & 4 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 7 \notag \end{vmatrix}$$ At this point, we can stop and multiply the diagonal elements together to find the determinant, which is 28.

Update: I should note that I did much more work than necessary above. You don’t need to perform a complete row-reduction—it’s enough to get the matrix into upper-triangular form since the determinant of such a matrix is also the product of its main diagonal elements. After the first step above, we can skip directly to adding $-\frac14$ times the third row to the last: $$\begin{vmatrix} 1 & 2 & 3 & 4 & 1 \\ 0 & -1 & 2 & 4 & 2 \\ 0 & 0 & 4 & 0 & 0 \\ 0 & 0 & 0 & 0 & 7 \\ 0 & 0 & 0 & 1 & 1 \notag \end{vmatrix}$$ and then swap the last two rows$$-1\cdot\begin{vmatrix} 1 & 2 & 3 & 4 & 1 \\ 0 & -1 & 2 & 4 & 2 \\ 0 & 0 & 4 & 0 & 0 \\ 0 & 0 & 0 & 1 & 1 \\ 0 & 0 & 0 & 0 & 7 \notag \end{vmatrix}.$$ This obviously has the same determinant as the result of the full row-reduction above.

• This is a way better explanation than the nonsensical unecesarry rigor filled answer above – Shammy Jul 4 '16 at 15:51

The Laplace expansion of the determinant can be done using any row or column of a square matrix. In each row, we multiply the $a_{ij}$ component of the matrix with the determinant of the matrix formed by deleting the $i$th row and $j$th column of our original matrix. This new matrix is called the $ij$-minor of $A$ and is commonly given the symbol $M_{ij}$. This term is then given a sign that depends on the sum of the two indices of the associated component: $(-1)^{i+j}$. So, in total, each term is $$(-1)^{i+j}a_{ij}M_{ij}$$ We add all of these terms for an entire row, or an entire column. No matter which we choose, we will get the same number, called the determinant of the matrix.

To decrease the amount of terms involved, we usually try to expand along a row or column with the most zeroes. In your matrix, the third row has the most zeroes, with only one non-zero component: $a_{33} = 4$.

So the only non-zero term in the Laplace expansion of the determinant of your matrix is $$(-1)^{3+3}a_{33}\left|\begin{array}{cccc}1&2&4&1\\0&-1&4&2\\-3&-6&-12&4\\0&0&1&1\end{array}\right| = 4\left|\begin{array}{cccc}1&2&4&1\\0&-1&4&2\\-3&-6&-12&4\\0&0&1&1\end{array}\right|$$ Now we do the same exercise for the 4x4 matrix. Let's call it $B$. The 4th row has the most zeroes, so we choose that for our expansion. The only non-zero components are $b_{43} = 1$ and $b_{44} = 1$. So our expansion is: $$4\left((-1)^{4+3}b_{43}\left|\begin{array}{ccc}1&2&1\\0&-1&2\\-3&-6&4\end{array}\right| + (-1)^{4+4}b_{44}\left|\begin{array}{ccc}1&2&4\\0&-1&4\\-3&-6&-12\end{array}\right|\right) = 4\left(-\left|\begin{array}{ccc}1&2&1\\0&-1&2\\-3&-6&4\end{array}\right| + \left|\begin{array}{ccc}1&2&4\\0&-1&4\\-3&-6&-12\end{array}\right|\right)$$ The first column is fine for both of these 3x3 determinant expansions. I'll omit the cofactor symbolism since you already know how to expand 3x3 determinants: $$4\left(-\left(\left|\begin{array}{cc}-1&2\\-6&4\end{array}\right| - 3\left|\begin{array}{cc}2&1\\-1&2\end{array}\right|\right) + \left(\left|\begin{array}{cc}-1&4\\-6&-12\end{array}\right| - 3\left|\begin{array}{cc}2&4\\-1&4\end{array}\right|\right)\right)$$ And finally, we expand the 2x2 determinants: $$4(-((-4-(-12)) - 3(4 - (-1))) + ((12-(-24)) - 3(8-(-4)))) = 28$$

1) First choose the easiest row/column to expand along in order to save work. The third row in your case has only one non-zero entry.

2) Expand along this row. You get,

$$4 \begin{vmatrix} 1 & 2 & 4 & 1 \\ 0 & -1 & 4 & 2 \\ -3 & -6 & -12 & 4 \\ 0 & 0 & 1 & 1 \notag \end{vmatrix},$$ since all other terms are zero. This matrix is obtained by removing the third row and third column.

3) Repeating the process again with this new 4x4 determinant will give you your answer in terms of 3x3 determinants, and by the looks of it, you know how to deal with them...

Multiplying the 1st row by $3$ and then adding it to the 4th row, and then multiplying the 3rd row of the resulting matrix by $-\frac 1 4$ and adding it to the 5th row, we obtain

$$\det \begin{bmatrix} 1 & 2 & 3 & 4 & 1\\ 0 & -1 & 2 & 4 & 2\\ 0 & 0 & 4 & 0 & 0\\ -3 & -6 & -9 & -12 & 4\\ 0 & 0 & 1 & 1 & 1\end{bmatrix} = \det \begin{bmatrix} 1 & 2 & 3 & 4 & 1\\ 0 & -1 & 2 & 4 & 2\\ 0 & 0 & 4 & 0 & 0\\ 0 & 0 & 0 & 0 & 7\\ 0 & 0 & 1 & 1 & 1\end{bmatrix} = \det \begin{bmatrix} 1 & 2 & 3 & 4 & 1\\ 0 & -1 & 2 & 4 & 2\\ 0 & 0 & 4 & 0 & 0\\ 0 & 0 & 0 & 0 & 7\\ 0 & 0 & 0 & 1 & 1\end{bmatrix}$$

We have obtained a block upper triangular matrix. Hence,

$$\det \begin{bmatrix} 1 & 2 & 3 & 4 & 1\\ 0 & -1 & 2 & 4 & 2\\ 0 & 0 & 4 & 0 & 0\\ 0 & 0 & 0 & 0 & 7\\ 0 & 0 & 0 & 1 & 1\end{bmatrix} = \det \begin{bmatrix} 1 & 2 & 3\\ 0 & -1 & 2\\ 0 & 0 & 4\end{bmatrix} \cdot \det \begin{bmatrix} 0 & 7\\ 1 & 1\end{bmatrix} = (-4) \cdot (-7) = 28$$