Calculating Determinants: Using Laplace Expansion or Echelon Form?

  • MHB
  • Thread starter mathmari
  • Start date
  • Tags
    Determinants
  • #1
mathmari
Gold Member
MHB
5,049
7
Hey! :eek:

I want to calculate the determinants of the matrices $a=\begin{pmatrix}1 & 2 & 3 & 4 & 5 \\ 2 & 3 & 4 & 5 & 1 \\ 3 & 4 & 5 & 1 & 2 \\ 4 & 5 & 1 & 2 & 3 \\ 5 & 1 & 2 & 3 & 4\end{pmatrix}$ and $b=\begin{pmatrix}2 & 1 & -2 & 1 & 7 & 3 \\ 3 & 4 & 1 & 9 & -1 & 2 \\ 0 & 0 & 1 & 1 & 1 & 0 \\ 0 & 0 & 1 & 2 & 1 & 6 \\ 0 & 0 & 0 & 1 & 1 & -1 \\ 0 & 0 & 0 & 0 & 0 & 3\end{pmatrix}$

For that do we use the Laplace expansion theorem or can we transform these matrices firstly in echelon form and calculate the determinant then? But is the determinant of the initial matrix equal to the determinant of the matrix in echelon form? (Wondering)
 
Physics news on Phys.org
  • #2
Hey mathmari!

We can do both. (Nod)

If we choose the echelon form, there are a couple of special rules for determinants though.
1. We can add a multiple of a row to another.
2. If we swap 2 rows, then the sign of the determinant swaps as well.
3. If we multiply a row by a factor, then the determinant is multiplied by that factor as well.
4. We can do the same with columns instead of rows.
(Thinking)
 
  • #3
Klaas van Aarsen said:
We can do both. (Nod)

If we choose the echelon form, there are a couple of special rules for determinants though.
1. We can add a multiple of a row to another.
2. If we swap 2 rows, then the sign of the determinant swaps as well.
3. If we multiply a row by a factor, then the determinant is multiplied by that factor as well.
4. We can do the same with columns instead of rows.
(Thinking)

Ok! Which of the two ways do you suggest to use in this case? (Wondering)
 
  • #4
mathmari said:
Ok! Which of the two ways do you suggest to use in this case? (Wondering)

A combination! (Happy)

Start with working towards echelon form or some such until Laplace expansion becomes easy enough.

If you reach echelon form, the Laplace expansion is just the product of the elements on the diagonal. (Thinking)
 
  • #5
Klaas van Aarsen said:
If we choose the echelon form, there are a couple of special rules for determinants though.
1. We can add a multiple of a row to another.

How does the determinant change in this case? Do we multiply also the determinant by this factor? Or doesn't the determinant change by using this rule? (Wondering)
 
  • #6
mathmari said:
How does the determinant change in this case? Do we multiply also the determinant by this factor? Or doesn't the determinant change by using this rule?

The determinant does not change if we add a multiple of a row to a different row. (Emo)
 
  • #7
Klaas van Aarsen said:
The determinant does not change if we add a multiple of a row to a different row. (Emo)

Ok! So, as for the matrix $b$ we have the following:
\begin{align*}\det b=&\begin{vmatrix}2 & 1 & -2 & 1 & 7 & 3 \\ 3 & 4 & 1 & 9 & -1 & 2 \\ 0 & 0 & 1 & 1 & 1 & 0 \\ 0 & 0 & 1 & 2 & 1 & 6 \\ 0 & 0 & 0 & 1 & 1 & -1 \\ 0 & 0 & 0 & 0 & 0 & 3\end{vmatrix} \ \overset{R_2:R_2-\frac{3}{2}\cdot R_1}{=} \ \begin{vmatrix}2 & 1 & -2 & 1 & 7 & 3 \\ 0 & \frac{5}{2} & 4 & \frac{15}{2} & -\frac{23}{2} & -\frac{5}{2} \\ 0 & 0 & 1 & 1 & 1 & 0 \\ 0 & 0 & 1 & 2 & 1 & 6 \\ 0 & 0 & 0 & 1 & 1 & -1 \\ 0 & 0 & 0 & 0 & 0 & 3\end{vmatrix} \\ & \ \overset{R_4:R_4-R_3}{=} \ \begin{vmatrix}2 & 1 & -2 & 1 & 7 & 3 \\ 0 & \frac{5}{2} & 4 & \frac{15}{2} & -\frac{23}{2} & -\frac{5}{2} \\ 0 & 0 & 1 & 1 & 1 & 0 \\ 0 & 0 & 0 & 1 & 0 & 6 \\ 0 & 0 & 0 & 1 & 1 & -1 \\ 0 & 0 & 0 & 0 & 0 & 3\end{vmatrix} \ \overset{R_5:R_5-R_4}{=} \ \begin{vmatrix}2 & 1 & -2 & 1 & 7 & 3 \\ 0 & \frac{5}{2} & 4 & \frac{15}{2} & -\frac{23}{2} & -\frac{5}{2} \\ 0 & 0 & 1 & 1 & 1 & 0 \\ 0 & 0 & 0 & 1 & 0 & 6 \\ 0 & 0 & 0 & 0 & 1 & -7 \\ 0 & 0 & 0 & 0 & 0 & 3\end{vmatrix} \\ & =2\cdot \frac{5}{2}\cdot 1\cdot 1\cdot 1\cdot 3=15
\end{align*}
Right? (Wondering)
 
  • #8
Yep. (Nod)
 
  • #9
Klaas van Aarsen said:
Yep. (Nod)

And as for matrix $a$ we have:
\begin{align*}\det a&=\begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 2 & 3 & 4 & 5 & 1 \\ 3 & 4 & 5 & 1 & 2 \\ 4 & 5 & 1 & 2 & 3 \\ 5 & 1 & 2 & 3 & 4\end{vmatrix} \ \overset{R_2:R_2-2\cdot R_1}{=} \ \begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -4 \\ 3 & 4 & 5 & 1 & 2 \\ 4 & 5 & 1 & 2 & 3 \\ 5 & 1 & 2 & 3 & 4\end{vmatrix}\\ & \ \overset{R_3:R_3-3\cdot R_1}{=} \ \begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -4 \\ 0 & -2 & -4 & -11 & -13 \\ 4 & 5 & 1 & 2 & 3 \\ 5 & 1 & 2 & 3 & 4\end{vmatrix} \ \overset{R_4:R_4-4\cdot R_1}{=} \ \begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -4 \\ 0 & -2 & -4 & -11 & -13 \\ 0 & -3 & -11 & -14 & -17 \\ 5 & 1 & 2 & 3 & 4\end{vmatrix} \\ & \ \overset{R_5:R_5-5\cdot R_1}{=} \ \begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -4 \\ 0 & -2 & -4 & -11 & -13 \\ 0 & -3 & -11 & -14 & -17 \\ 0 & -9 & -13 & -17 & -21\end{vmatrix} \ \overset{R_3:R_3-2\cdot R_2}{=} \ \begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -4 \\ 0 & 0 & 0 & -5 & -5 \\ 0 & -3 & -11 & -14 & -17 \\ 0 & -9 & -13 & -17 & -21\end{vmatrix} \\ & \ \overset{R_4:R_4-3\cdot R_2}{=} \ \begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -4 \\ 0 & 0 & 0 & -5 & -5 \\ 0 & 0 & -2 & -5 & -5 \\ 0 & -9 & -13 & -17 & -21\end{vmatrix} \ \overset{R_5:R_5-9\cdot R_2}{=} \ \begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -4 \\ 0 & 0 & 0 & -5 & -5 \\ 0 & 0 & -2 & -5 & -5 \\ 0 & 0 & 5 & 10 & 15\end{vmatrix} \\ & \ \overset{R_5:R_5+\frac{5}{2}\cdot R_4}{=} \ \begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -4 \\ 0 & 0 & 0 & -5 & -5 \\ 0 & 0 & -2 & -5 & -5 \\ 0 & 0 & 0 & -\frac{5}{2} & \frac{5}{2}\end{vmatrix} \ \overset{R_5:R_5-\frac{1}{2}\cdot R_3}{=} \ \begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -4 \\ 0 & 0 & 0 & -5 & -5 \\ 0 & 0 & -2 & -5 & -5 \\ 0 & 0 & 0 & 0 & 5\end{vmatrix} \\ & \ \overset{R_3\leftrightarrow R_4}{=} \ -\begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -4 \\ 0 & 0 & -2 & -5 & -5 \\ 0 & 0 & 0 & -5 & -5 \\ 0 & 0 & 0 & 0 & 5\end{vmatrix}=-1\cdot (-1)\cdot (-2)\cdot (-5)\cdot 5=50
\end{align*}

Is this correct? And is this the way you meant or is there a better/faster way if we use also the Laplace expansion? (Wondering)
 
  • #10
mathmari said:
And as for matrix $a$ we have:
\begin{align*}\det a&=\begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 2 & 3 & 4 & 5 & 1 \\ 3 & 4 & 5 & 1 & 2 \\ 4 & 5 & 1 & 2 & 3 \\ 5 & 1 & 2 & 3 & 4\end{vmatrix} \ \overset{R_2:R_2-2\cdot R_1}{=} \ \begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -4 \\ 3 & 4 & 5 & 1 & 2 \\ 4 & 5 & 1 & 2 & 3 \\ 5 & 1 & 2 & 3 & 4\end{vmatrix}
\end{align*}

Shouldn't that be
\begin{align*}\det a&=\begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 2 & 3 & 4 & 5 & 1 \\ 3 & 4 & 5 & 1 & 2 \\ 4 & 5 & 1 & 2 & 3 \\ 5 & 1 & 2 & 3 & 4\end{vmatrix} \ \overset{R_2:R_2-2\cdot R_1}{=} \ \begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & {\color{red}\mathbf{-\enclose{circle}{9}}} \\ 3 & 4 & 5 & 1 & 2 \\ 4 & 5 & 1 & 2 & 3 \\ 5 & 1 & 2 & 3 & 4\end{vmatrix}
\end{align*}
(Worried)

mathmari said:
And is this the way you meant or is there a better/faster way if we use also the Laplace expansion?

This is the way yes. I think it is the fastest way to calculate this determinant. (Thinking)
 
  • #11
Klaas van Aarsen said:
Shouldn't that be
\begin{align*}\det a&=\begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 2 & 3 & 4 & 5 & 1 \\ 3 & 4 & 5 & 1 & 2 \\ 4 & 5 & 1 & 2 & 3 \\ 5 & 1 & 2 & 3 & 4\end{vmatrix} \ \overset{R_2:R_2-2\cdot R_1}{=} \ \begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & {\color{red}\mathbf{-\enclose{circle}{9}}} \\ 3 & 4 & 5 & 1 & 2 \\ 4 & 5 & 1 & 2 & 3 \\ 5 & 1 & 2 & 3 & 4\end{vmatrix}
\end{align*}
(Worried)

Now I get
\begin{align*}\det a&=\begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 2 & 3 & 4 & 5 & 1 \\ 3 & 4 & 5 & 1 & 2 \\ 4 & 5 & 1 & 2 & 3 \\ 5 & 1 & 2 & 3 & 4\end{vmatrix} \ \overset{R_2:R_2-2\cdot R_1}{=} \ \begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -9 \\ 3 & 4 & 5 & 1 & 2 \\ 4 & 5 & 1 & 2 & 3 \\ 5 & 1 & 2 & 3 & 4\end{vmatrix}\\ & \ \overset{R_3:R_3-3\cdot R_1}{=} \ \begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -9 \\ 0 & -2 & -4 & -11 & -13 \\ 4 & 5 & 1 & 2 & 3 \\ 5 & 1 & 2 & 3 & 4\end{vmatrix} \ \overset{R_4:R_4-4\cdot R_1}{=} \ \begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -9 \\ 0 & -2 & -4 & -11 & -13 \\ 0 & -3 & -11 & -14 & -17 \\ 5 & 1 & 2 & 3 & 4\end{vmatrix} \\ & \ \overset{R_5:R_5-5\cdot R_1}{=} \ \begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -9 \\ 0 & -2 & -4 & -11 & -13 \\ 0 & -3 & -11 & -14 & -17 \\ 0 & -9 & -13 & -17 & -21\end{vmatrix} \ \overset{R_3:R_3-2\cdot R_2}{=} \ \begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -9 \\ 0 & 0 & 0 & -5 & 5 \\ 0 & -3 & -11 & -14 & -17 \\ 0 & -9 & -13 & -17 & -21\end{vmatrix} \\ & \ \overset{R_4:R_4-3\cdot R_2}{=} \ \begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -9 \\ 0 & 0 & 0 & -5 & 5 \\ 0 & 0 & -2 & -5 & 10 \\ 0 & -9 & -13 & -17 & -21\end{vmatrix} \ \overset{R_5:R_5-9\cdot R_2}{=} \ \begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -9 \\ 0 & 0 & 0 & -5 & 5 \\ 0 & 0 & -2 & -5 & 10 \\ 0 & 0 & 5 & 10 & 60\end{vmatrix} \\ & \ \overset{R_5:R_5+\frac{5}{2}\cdot R_4}{=} \ \begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -9 \\ 0 & 0 & 0 & -5 & 5 \\ 0 & 0 & -2 & -5 & 10 \\ 0 & 0 & 0 & -\frac{5}{2} & 85\end{vmatrix} \ \overset{R_5:R_5-\frac{1}{2}\cdot R_3}{=} \ \begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -9 \\ 0 & 0 & 0 & -5 & 5 \\ 0 & 0 & -2 & -5 & 10 \\ 0 & 0 & 0 & 0 & \frac{165}{2}\end{vmatrix} \\ & \ \overset{R_3\leftrightarrow R_4}{=} \ -\begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -9 \\ 0 & 0 & -2 & -5 & 10 \\ 0 & 0 & 0 & -5 & 5 \\ 0 & 0 & 0 & 0 & \frac{165}{2}\end{vmatrix}=-1\cdot (-1)\cdot (-2)\cdot (-5)\cdot \frac{165}{2}=825
\end{align*}

But according to Wolfram the result is $1875$ but I don't see where I could have done something wrong. Do you maybe have an idea? (Wondering)
 
  • #12
mathmari said:
\begin{align*}\begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -9 \\ 0 & 0 & 0 & -5 & 5 \\ 0 & -3 & -11 & -14 & -17 \\ 0 & -9 & -13 & -17 & -21\end{vmatrix} & \ \overset{R_4:R_4-3\cdot R_2}{=} \
\begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -9 \\ 0 & 0 & 0 & -5 & 5 \\ 0 & 0 & -2 & -5 & 10 \\ 0 & -9 & -13 & -17 & -21\end{vmatrix}\end{align*}

But according to Wolfram the result is $1875$ but I don't see where I could have done something wrong. Do you maybe have an idea? (Wondering)

Shouldn't it be:
\begin{align*}\begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -9 \\ 0 & 0 & 0 & -5 & 5 \\ 0 & -3 & -11 & -14 & -17 \\ 0 & -9 & -13 & -17 & -21\end{vmatrix} & \ \overset{R_4:R_4-3\cdot R_2}{=} \
\begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -9 \\ 0 & 0 & 0 & -5 & 5 \\ 0 & 0 & {\color{red}-\enclose{circle}{5}} & -5 & 10 \\ 0 & -9 & -13 & -17 & -21\end{vmatrix}\end{align*}
(Worried)
 
  • #13
Klaas van Aarsen said:
Shouldn't it be:
\begin{align*}\begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -9 \\ 0 & 0 & 0 & -5 & 5 \\ 0 & -3 & -11 & -14 & -17 \\ 0 & -9 & -13 & -17 & -21\end{vmatrix} & \ \overset{R_4:R_4-3\cdot R_2}{=} \
\begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -9 \\ 0 & 0 & 0 & -5 & 5 \\ 0 & 0 & {\color{red}-\enclose{circle}{5}} & -5 & 10 \\ 0 & -9 & -13 & -17 & -21\end{vmatrix}\end{align*}
(Worried)

Oh yes! So it must be as follows:
\begin{align*}\det a&=\begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 2 & 3 & 4 & 5 & 1 \\ 3 & 4 & 5 & 1 & 2 \\ 4 & 5 & 1 & 2 & 3 \\ 5 & 1 & 2 & 3 & 4\end{vmatrix} \ \overset{R_2:R_2-2\cdot R_1}{=} \ \begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -9 \\ 3 & 4 & 5 & 1 & 2 \\ 4 & 5 & 1 & 2 & 3 \\ 5 & 1 & 2 & 3 & 4\end{vmatrix}\\ & \ \overset{R_3:R_3-3\cdot R_1}{=} \ \begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -9 \\ 0 & -2 & -4 & -11 & -13 \\ 4 & 5 & 1 & 2 & 3 \\ 5 & 1 & 2 & 3 & 4\end{vmatrix} \ \overset{R_4:R_4-4\cdot R_1}{=} \ \begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -9 \\ 0 & -2 & -4 & -11 & -13 \\ 0 & -3 & -11 & -14 & -17 \\ 5 & 1 & 2 & 3 & 4\end{vmatrix} \\ & \ \overset{R_5:R_5-5\cdot R_1}{=} \ \begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -9 \\ 0 & -2 & -4 & -11 & -13 \\ 0 & -3 & -11 & -14 & -17 \\ 0 & -9 & -13 & -17 & -21\end{vmatrix} \ \overset{R_3:R_3-2\cdot R_2}{=} \ \begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -9 \\ 0 & 0 & 0 & -5 & 5 \\ 0 & -3 & -11 & -14 & -17 \\ 0 & -9 & -13 & -17 & -21\end{vmatrix} \\ & \ \overset{R_4:R_4-3\cdot R_2}{=} \ \begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -9 \\ 0 & 0 & 0 & -5 & 5 \\ 0 & 0 & -5 & -5 & 10 \\ 0 & -9 & -13 & -17 & -21\end{vmatrix} \ \overset{R_5:R_5-9\cdot R_2}{=} \ \begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -9 \\ 0 & 0 & 0 & -5 & 5 \\ 0 & 0 & -5 & -5 & 10 \\ 0 & 0 & 5 & 10 & 60\end{vmatrix} \\ & \ \overset{R_5:R_5+R_4}{=} \ \begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -9 \\ 0 & 0 & 0 & -5 & 5 \\ 0 & 0 & -5 & -5 & 10 \\ 0 & 0 & 0 & 5 & 70\end{vmatrix} \ \overset{R_5:R_5+ R_3}{=} \ \begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -9 \\ 0 & 0 & 0 & -5 & 5 \\ 0 & 0 & -5 & -5 & 10 \\ 0 & 0 & 0 & 0 & 75\end{vmatrix} \\ & \ \overset{R_3\leftrightarrow R_4}{=} \ -\begin{vmatrix}1 & 2 & 3 & 4 & 5 \\ 0 & -1 & -2 & -3 & -9 \\ 0 & 0 & -5 & -5 & 10 \\ 0 & 0 & 0 & -5 & 5 \\ 0 & 0 & 0 & 0 & 75\end{vmatrix}=-1\cdot (-1)\cdot (-5)\cdot (-5)\cdot 75=1875
\end{align*}

Now the result is correct (Malthe)
 
  • #14
mathmari said:
Now the result is correct (Malthe)

Nice! (Cake)
 

Similar threads

Replies
2
Views
2K
Replies
4
Views
1K
Replies
3
Views
1K
Replies
2
Views
1K
Replies
15
Views
2K
Replies
8
Views
2K
Replies
9
Views
3K
Back
Top