[Math] Help finding the determinant of a 4×4 matrix

linear algebra

Sorry for the lack of notation but the work should be easy to follow if you know what you are doing. Okay my problem is that the book says it can be done by expanding across any column or row but the only way to get what the book does in their practice example is to choose the row that they chose. This bothers me. As I should be able to do it as I see fit. I will post my work and someone point out the problem in my work. The matrix is as follows:

$$A = \left(
\begin{matrix}
5&-7&2&2\\
0&3&0&-4\\
-5&-8&0&3\\
0&5&0&-6\\
\end{matrix} \right)
$$

I decided to expand across row one and cross out columns as I found the minors. For the first minor obtaining:
$$
\begin{pmatrix}
3 & 0 & -4 \\
-8 & 0 & 3 \\
5 & 0 & -6 \\
\end{pmatrix}
$$

M1 being row one column one we attain $-1^2 = 1$. This is to be multiplied by the determinate of the minor. Now finding the determinant I did:

3 times $$
\begin{pmatrix}
0 & 3 \\
0 & -6 \\
\end{pmatrix}
$$
giving $3(0-0)= 0$
then:

0 times $$
\begin{pmatrix}
-8 & 3\\
5 & -6\\
\end{pmatrix}
$$

giving 0(48-15)=0

Then:
4 times
$$
\begin{pmatrix}
-8 & 0 \\
5 & 0 \\
\end{pmatrix}
$$
giving $4(0-0)=0$
adding the determinants we get $0+0+0=0$
So det M1 $= 0(1) = 0$

M2–> M(1,2)—> $-1^1+2= -1^3 = -1$

$$
\begin{pmatrix}
0 & 0 & -4 \\
-5 & 0 & 3 \\
0 & 0 & -6 \\
\end{pmatrix}
$$

o*
$$
\begin{pmatrix}
0 & 3 \\
0 & -6 \\
\end{pmatrix}
$$
giving $0(0-0)=0$

obviously the next matrix will look the same as the top term in column two is a zero so the determinant for that will be $0$. Now finally

4 times
$$
\begin{pmatrix}
-8 & 0 \\
5 & 0 \\
\end{pmatrix}
$$
giving 4(0-0)= 0

So the Determinant of Minor 2 is (0+0+0)(-1)= 0 Now on to Minor number 3

M3 –> $-1^4 = 1$

$$
\begin{pmatrix}
0 & 3 & -4 \\
-5 & -8 & 3 \\
0 & 5 & -6 \\
\end{pmatrix}
$$

for the determinant:

0 times
$$
\begin{pmatrix}
-8 & 3 \\
5 & -6 \\
\end{pmatrix}
$$
which gives $0(48-15)=0$

-3 times
$$
\begin{pmatrix}
-5& 3 \\
0 & -6 \\
\end{pmatrix}
$$

which gives $-3(30-0)= -90$

it is redundant to go on from here because after the final computation for this minor I get -100 and as a result get det M3 = -190 and get determinant of zeros for the following determinant of M4.
which gives: $0(5)+ 0(-7) + (-90)(2) + (0)(2)$ giving
Det Ax $= -380.$ The book says its $20$ and when I did it in a calculator it got 20 but the problem is that both the book and calculator expand across the row with the most zeros but theoretically speaking NO MATTER WHICH row or column you choose to expand across you should get the same answer. So what is it? Is my computation wrong or is my assumption that you can expand across any row or column wrong? Isn't it only important if the determinant doesn't equal zero? or does the exact value matter in more advanced cases?

Best Answer

Here is how you should write it down in practice. $$ A = \begin{pmatrix} 5 & -7 & 2 & 2 \\ 0 & 3 & 0 & -4 \\ -5 & -8 & 0 & 3 \\ 0 & 5 & 0 & -6 \\ \end{pmatrix} $$ so that $$ \det A = \begin{vmatrix} 5 & -7 & 2 & 2 \\ 0 & 3 & 0 & -4 \\ -5 & -8 & 0 & 3 \\ 0 & 5 & 0 & -6 \\ \end{vmatrix} \\ = 2 \cdot \begin{vmatrix} 0 & 3 & -4 \\ -5 & -8 & 3 \\ 0 & 5 & -6 \\ \end{vmatrix} \\ = 2 \cdot -(-5) \cdot \begin{vmatrix} 3 & -4 \\ 5 & -6 \\ \end{vmatrix} \\ = 2 \cdot 5 \cdot (-18 -(-20)) \\ = 20. $$ I expanded along the third column in the first case and then along the first column, because these are the ones with the most zeros, so it saves a lot of computations. I am assuming that's what's in your book.

If you want to expand along other columns or rows, just keep track of the appropriate minors without making any computation mistakes (I guess that's the hard part ; the only trick is to make it slowly and be careful). So here we go (along the first row): $$ \det A = \begin{vmatrix} 5 & -7 & 2 & 2 \\ 0 & 3 & 0 & -4 \\ -5 & -8 & 0 & 3 \\ 0 & 5 & 0 & -6 \\ \end{vmatrix} = 5 \begin{vmatrix} 3 & 0 & -4 \\ -8 & 0 & 3 \\ 5 & 0 & -6 \\ \end{vmatrix} -(-7) \begin{vmatrix} 0 & 0 & -4 \\ -5 & 0 & 3 \\ 0 & 0 & -6 \\ \end{vmatrix} + 2 \begin{vmatrix} 0 & 3 & -4 \\ -5 & -8 & 3 \\ 0 & 5 & -6 \\ \end{vmatrix} -2 \begin{vmatrix} 0 & 3 & 0 \\ -5 & -8 & 0 \\ 0 & 5 & 0 \\ \end{vmatrix}. $$ I don't know how you defined the determinant, but in any definition you chose it should be obvious that a determinant of a matrix with a column of zeros is zero. (If it is not clear to you, feel free to tell me your definition and I will happily answer in the comments.) So the only non-zero term in this sum is $$ 2 \begin{vmatrix} 0 & 3 & -4 \\ -5 & -8 & 3 \\ 0 & 5 & -6 \\ \end{vmatrix}. $$ Note that this is the same determinant as when I expanded along the third column. So you can finish this computation by looking at what I did before.

A useful trick to remember the signs in the Laplace expansion (that's the name of the trick of expanding along a row or a column) is the following matrix : $$ \begin{vmatrix} + & - & + & - \\ - & + & - & + \\ + & - & + & - \\ - & + & - & + \end{vmatrix} $$ It works for any determinant size, just make sure that the coordinate of the matrix in the top left is a $+$ sign.

Hope that helps,