Welcome to our community

Be a part of something great, join today!

Calculate the determinants

mathmari

Well-known member
MHB Site Helper
Apr 14, 2013
4,036
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)
 

Klaas van Aarsen

MHB Seeker
Staff member
Mar 5, 2012
8,739
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)
 

mathmari

Well-known member
MHB Site Helper
Apr 14, 2013
4,036
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)
 

Klaas van Aarsen

MHB Seeker
Staff member
Mar 5, 2012
8,739
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)
 

mathmari

Well-known member
MHB Site Helper
Apr 14, 2013
4,036
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)
 

Klaas van Aarsen

MHB Seeker
Staff member
Mar 5, 2012
8,739
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)
 

mathmari

Well-known member
MHB Site Helper
Apr 14, 2013
4,036
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)
 

Klaas van Aarsen

MHB Seeker
Staff member
Mar 5, 2012
8,739
Yep. (Nod)
 

mathmari

Well-known member
MHB Site Helper
Apr 14, 2013
4,036
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)
 

Klaas van Aarsen

MHB Seeker
Staff member
Mar 5, 2012
8,739
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)

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)
 

mathmari

Well-known member
MHB Site Helper
Apr 14, 2013
4,036
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)
 

Klaas van Aarsen

MHB Seeker
Staff member
Mar 5, 2012
8,739
\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)
 

mathmari

Well-known member
MHB Site Helper
Apr 14, 2013
4,036
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)
 

Klaas van Aarsen

MHB Seeker
Staff member
Mar 5, 2012
8,739