# Math Help - [SOLVED] Triangular matrix/determinant

1. ## [SOLVED] Triangular matrix/determinant

The problem says "Reduce the following matrix into an upper triangular one in order to find its determinant".
I wonder why they ask me to reduce it since the calculus would only get more complicated.
So here is the matrix $\left( \begin{array}{ccc}\\ -1 & 3 & 1 \\ 2 & 5 & 3 \\ 1 & -2 & 1 \end{array}\right)$ I call it $A$. I reduced it to this one : $\left( \begin{array}{ccc}\\ 1 & -2 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & 1 \end{array} \right)$ I call it $Z$. I calculate the determinant of $Z$ which is $1$. By curiosity I calculated the one from $A$ and surprisingly I got $-17$... So my guess is that I made an error when I reducted $A$ into $Z$. Am I right saying this? Because I think the determinant of $A$ and $Z$ must be the same, right?
Last question : why do they wanted me to reduce $A$? It's much more simple to directly calculate $\det (A)$ without passing by a reduction of matrix and then calculating $\det (Z)$.

2. Hello,

I'll do it quickly because it's becoming to be late here...

r1=r1+r3
r2=r2-2r3

then reverse r1 and r3.

after that, there's just an operation left to get an upper triangular matrice. (and it's not the one you got)

it's easier because it reduces to compute the determinant of a 2x2 matrix, instead of doing "long" calculations ^^'

3. Ok Moo, I have no problem if you come back tomorrow explaining me this problem.
I don't know what
r1=r1+r3
r2=r2-2r3

then reverse r1 and r3.
means, but I'll take time to think about it.
it's easier because it reduces to compute the determinant of a 2x2 matrix, instead of doing "long" calculations ^^'
Ah ok! Well the determinant of a $3\times 3$ matrix is the sum of the determinant of $3$ $2\times 2$ matrices which ain't much calculus (to me), while reducing a matrix into triangular to save the calculus of a determinant of a $2\times 2$ matrix only complicates things.

4. Hi again

Sorry for yesterday, I was not in good condition ^-^
Also note the code for a matrix : \begin{pmatrix} ... \end{pmatrix}

$\begin{pmatrix} -1 & 3 & 1 \\ 2&5&3 \\ 1&-2&1 \end{pmatrix}$

If you do any basic operations (actually any linear combination of 2 or 3 rows), the determinant won't be changed.
The best way to reduce the matrix is to get 2 0's on the first column.
(r for row)

1st operation : r2=r2+2r1 (basically it means that r2 becomes r2+r1), because one can see that 2+2(-1)=0
$\substack{\longleftrightarrow \\ r_2 \rightarrow r_2+2r_1} \begin{pmatrix} -1&3&1 \\ 0&11&5 \\ 1&-2&1 \end{pmatrix}$

2nd operation : r3=r3+r1, because one can see that 1+(-1)=0
$\substack{\longleftrightarrow \\ r_3 \rightarrow r_3+r_1} \begin{pmatrix} -1&3&1 \\ 0&11&5 \\ 0&1&2 \end{pmatrix}$

3rd operation : r3=r3-r2/11, because 1-11/11=0

$\substack{\longleftrightarrow \\ r_3 \rightarrow r_3-\frac{r_1}{11}} \begin{pmatrix} -1&3&1 \\ 0&11&5 \\ 0&0&\frac{17}{11} \end{pmatrix}$

You're done.

5. Thank you Moo for the matrix code.
Ah ok, now I understand you notation. I did almost the same calculus but I made an error! So now I understand why the determinant is not $-17$!
Just before to put this thread as solved, can you explain a little more what you mean by
If you do any basic operations (actually any linear combination of 2 or 3 rows), the determinant won't be changed.
? I'd be grateful.
Do you mean "if you multiply an elemental matrix by the original matrix the determinant won't be changed but it only works for $2\times 2$ and $3\times 3$ matrices"?
I mean by an elemental matrix a matrix such that if multiplied by the original matrix, it will have the effect of exchenging two rows for example, or multiply a row by a scalar.

6. If you do any basic operations (actually any linear combination of 2 or 3 rows), the determinant won't be changed.
? I'd be grateful.
Do you mean "if you multiply an elemental matrix by the original matrix the determinant won't be changed but it only works for 2\times 2 and 3\times 3 matrices"?
Actually no. Sorry for not being clear... In fact, I meant "basic operations on rows", that is to say if you add a row to twice another row for example, the determinant doesn't change.

Basically, the determinant of a reduced matrix is the same as the original matrix.
If you invert two lines in your working, the determinant will change its sign :

$\begin{vmatrix} 1&2&3 \\ 4&5&6 \\ 7&8&9 \end{vmatrix}={\color{red}-} \begin{vmatrix} 1&2&3 \\ 7&8&9 \\ 4&5&6 \end{vmatrix}$
But it is not needed here ^^'

7. In fact, I meant "basic operations on rows", that is to say if you add a row to twice another row for example, the determinant doesn't change.
Ah ok, how strange. There are at least 3 types of basic operations on rows which are in fact the same as to multiply an elemental matrix by the original matrix. But I didn't know that one of them (and problably another one too. The one that multiply a row by a scalar) would have an effect on the determinant... Thanks so much for the info.
So if I understood well, when I have to reduce a matrix into a triangular one, I better use the operation "multiply a row by a scalar and add it to another row" and not the other two ones so that the determinant is not changed.

8. Originally Posted by arbolis
Ah ok, how strange. There are at least 3 types of basic operations on rows which are in fact the same as to multiply an elemental matrix by the original matrix. But I didn't know that one of them (and problably another one too. The one that multiply a row by a scalar) would have an effect on the determinant... Thanks so much for the info.
So if I understood well, when I have to reduce a matrix into a triangular one, I better use the operation "multiply a row by a scalar and add it to another row" and not the other two ones so that the determinant is not changed.
Hmmm... décidément, ce n'est pas mon jour...

I mean if you substitute a row $r_1$ by $r_1-3r_2+2r_3$, it won't change the determinant. It's operations you use for reducing the matrix. This is why (I'm not sure of the implication) the reduced matrix's determinant is the same as the original one.

This is how I've always been taught to do

9. I think there is a quiproquo between us but I catched the idea. To reduce a matrix you can use 3 operations that are equivalent to multiply an elemental matrix for the one you want to reduce. For example, $E_{3,1,1,c}$ means that this is an elemental matrix $3\times 3$ of type " $1$" (that is it will multiply a row by a scalar), multiplying the row $1$ by the scalar $c$. Explicitly we have that $E_{3,1,1,c}= \begin{pmatrix} c & 0&0 \\ 0 & 1 & 0 \\ 0&0&1 \end{pmatrix}$.
Say we have the identity matrix $I_3= \begin{pmatrix} 1 & 0& 0 \\ 0 & 1&0 \\ 0&0&1 \end{pmatrix}$. What happens if I do $E_{3,1,1,c} \cdot I_{3}$? It produce $\begin{pmatrix} c&0&0 \\ 0&1&0 \\ 0&0&1 \end{pmatrix}$. Hmm, my example is not a good one, it's evident that any matrix multiplied by the identity one will remains the same. Ok, $E_{3,1,1,c}\cdot A$, where $A=\begin{pmatrix} 3&2&0 \\ 1&3&6 \\ 7&1&4 \end{pmatrix}$.
$E_{3,1,1,c}\cdot A= \begin{pmatrix} 3c&2c&0 \\ 1&3&6 \\ 7&1&4 \end{pmatrix}$.
You can do the same with the operation "changing a row by this row + x times another row", it's the same as multiplying an elemental matrix by the matrix we are working with.
But in order to not change the determinant, we are authorized to use only the operation "changing a row by this row + x times another row".
I've tried to calculate the determinant of an equivalent matrix but with having multiplied it with some elementals matrices (of type 1 and 3, which are not allowed) and the result was a different determinant.
To finish, I put an example of what an elemental matrix of type 2 (the one that won't change the determinant of a matrix when we reduce it) :
$E_{4,2,4,2,\sqrt2}\begin{pmatrix} 1&0&0&0 \\ 0&1&0&0 \\ 0&0&1&0 \\ 0& \sqrt2 &0&1 \end{pmatrix}$. It will changes the 4th row by multiplying the second row by $\sqrt2$ and sum it to the fourth row. (That is if you do the operation $E_{4,2,4,2,\sqrt2}\cdot L$ where $L$ is a $4\times 4$ matrix. If you do $L\cdot E_{4,2,4,2,\sqrt2}$ then it will change a column of $L$.