# Determinant of a 4x4 matrix

#### Petrus

##### Well-known member
Hello MHB,
calculate determinant of:
$$\displaystyle \left| {\begin{array}{cc} 2 & -2 & -3 & 8 \\ 1 & -1 & 2 & -1 \\ -3 & 4 & 1 & -1 \\ -2 & 6 & -4 & 19 \end{array} } \right|$$
so I multiplication -2 row 2 and add it to row 1, multiplication 3 to row 2 and add it to row 3, multiplicate 2 to row 2 and add it to row 4 and get
$$\displaystyle \left| {\begin{array}{cc} 0 & 0 & -5 & -10 \\ 1 & -1 & 2 & -1 \\ 0 & 1 & 7 & -4 \\ 0 & 4 & 0 & 17 \end{array} } \right|$$ and develops in columne 1 and use sarrus rule but I get wrong.

Regards,
$$\displaystyle |\rangle$$

#### Ackbach

##### Indicium Physicus
Staff member
There are several methods to do this. You can just use Jacobi's Rule as is to obtain
\begin{align*}\left| \begin{array}{cccc} 2 & -2 & -3 & 8 \\ 1 & -1 & 2 & -1 \\ -3 & 4 & 1 & -1 \\ -2 & 6 & -4 & 19 \end{array} \right|
=&(+1)(2)\left| \begin{array}{ccc}-1 & 2 & -1 \\ 4 & 1 & -1 \\ 6 & -4 & 19 \end{array} \right|
+(-1)(-2)\left| \begin{array}{ccc} 1 & 2 & -1 \\ -3 & 1 & -1 \\ -2 & -4 & 19 \end{array} \right|\\
+&(+1)(-3)\left| \begin{array}{ccc} 1 & -1 & -1 \\ -3 & 4 & -1 \\ -2 & 6 & 19 \end{array} \right|
+(-1)(8)\left| \begin{array}{ccc} 1 & -1 & 2 \\ -3 & 4 & 1 \\ -2 & 6 & -4 \end{array} \right|,
\end{align*}
and keep drilling down in each matrix.
Alternatively, you can do ERO's on the matrix, keeping track of how each ERO changes the determinant.

You can certainly do the ERO's you did. I get
$$\left| \begin{array}{cccc} 2 & -2 & -3 & 8 \\ 1 & -1 & 2 & -1 \\ -3 & 4 & 1 & -1 \\ -2 & 6 & -4 & 19 \end{array} \right| \to \left| \begin{array}{cccc} 0 & 0 & -7 & 10 \\ 1 & -1 & 2 & -1 \\ 0 & 1 & 7 & -4 \\ 0 & 4 & 0 & 17 \end{array} \right|.$$
If I compare to yours, which is
$$\left| {\begin{array}{cc} 0 & 0 & -5 & -10 \\ 1 & -1 & 2 & -1 \\ 0 & 1 & 7 & -4 \\ 0 & 4 & 0 & 17 \end{array} } \right|,$$
I see that there are some differences. Don't forget, when you actually do the determinant, that the $-1$ in the $2,1$ position has a minus sign associated with it in the Jacobi expansion.

#### Petrus

##### Well-known member
There are several methods to do this. You can just use Jacobi's Rule as is to obtain
\begin{align*}\left| \begin{array}{cccc} 2 & -2 & -3 & 8 \\ 1 & -1 & 2 & -1 \\ -3 & 4 & 1 & -1 \\ -2 & 6 & -4 & 19 \end{array} \right|
=&(+1)(2)\left| \begin{array}{ccc}-1 & 2 & -1 \\ 4 & 1 & -1 \\ 6 & -4 & 19 \end{array} \right|
+(-1)(-2)\left| \begin{array}{ccc} 1 & 2 & -1 \\ -3 & 1 & -1 \\ -2 & -4 & 19 \end{array} \right|\\
+&(+1)(-3)\left| \begin{array}{ccc} 1 & -1 & -1 \\ -3 & 4 & -1 \\ -2 & 6 & 19 \end{array} \right|
+(-1)(8)\left| \begin{array}{ccc} 1 & -1 & 2 \\ -3 & 4 & 1 \\ -2 & 6 & -4 \end{array} \right|,
\end{align*}
and keep drilling down in each matrix.
Alternatively, you can do ERO's on the matrix, keeping track of how each ERO changes the determinant.

You can certainly do the ERO's you did. I get
$$\left| \begin{array}{cccc} 2 & -2 & -3 & 8 \\ 1 & -1 & 2 & -1 \\ -3 & 4 & 1 & -1 \\ -2 & 6 & -4 & 19 \end{array} \right| \to \left| \begin{array}{cccc} 0 & 0 & -7 & 10 \\ 1 & -1 & 2 & -1 \\ 0 & 1 & 7 & -4 \\ 0 & 4 & 0 & 17 \end{array} \right|.$$
If I compare to yours, which is
$$\left| {\begin{array}{cc} 0 & 0 & -5 & -10 \\ 1 & -1 & 2 & -1 \\ 0 & 1 & 7 & -4 \\ 0 & 4 & 0 & 17 \end{array} } \right|,$$
I see that there are some differences. Don't forget, when you actually do the determinant, that the $-1$ in the $2,1$ position has a minus sign associated with it in the Jacobi expansion.
Hello Ackbach,
I am really grateful for the fast responed! Thanks alot! I did not see I start to misscalculate ... I have read about a triangle way, can I also use it?

Regards
$$\displaystyle |\rangle$$

#### Ackbach

##### Indicium Physicus
Staff member
Hello Ackbach,
I am really grateful for the fast responed! Thanks alot! I did not see I start to misscalculate ... I have read about a triangle way, can I also use it?

Regards
$$\displaystyle |\rangle$$
If you make your matrix upper triangular, the determinant of the resulting matrix is the product of the entries on the main diagonal. BUT, you still have to keep track of how your ERO's affect the determinant.

#### Petrus

##### Well-known member
BUT, you still have to keep track of how your ERO's affect the determinant.
Hello Ackbach,
What did you mean with that? If you mean with it will be an multiplicate -1 to the determinant because of well in Swedish my book called it "schedule"?
+ - + -
- + - +
+ - + -
- + - +
Regards,
$$\displaystyle |\rangle$$

#### Ackbach

##### Indicium Physicus
Staff member
No, I mean this:

The ERO that takes a multiple of one row, adds it to another row, and stores it in that row, does not change the determinant.

The ERO that switches two rows multiplies the determinant by $-1$.

The ERO that multiplies a row by a nonzero number $m$ also multiplies the determinant by $m$.

#### Petrus

##### Well-known member
No, I mean this:

The ERO that takes a multiple of one row, adds it to another row, and stores it in that row, does not change the determinant.

The ERO that switches two rows multiplies the determinant by $-1$.

The ERO that multiplies a row by a nonzero number $m$ also multiplies the determinant by $m$.
Thanks again Ackbach!

Regards
$$\displaystyle |\rangle$$