Welcome to our community

Be a part of something great, join today!

Upper triangular matrix

Jundoe

New member
Nov 23, 2013
10
I want to make an upper triangular matrix. From this:
$\begin{bmatrix}2&0&1\\0&1&1\\3&1&0 \end{bmatrix}$

The first is the correct one. The second is incorrect, yet I fail to understand why.

$\begin{bmatrix}2&0&1\\0&1&1\\3&1&0 \end{bmatrix}$

$\begin{bmatrix}2&0&1\\0&1&1\\0&1&-3/2 \end{bmatrix}$

$\begin{bmatrix}2&0&1\\0&1&1\\0&0&-5/2 \end{bmatrix}$



Second method.

$\begin{bmatrix}2&0&1\\0&1&1\\3&1&0 \end{bmatrix}$

$\begin{bmatrix}1&0&1/2\\0&1&1\\3&1&0 \end{bmatrix}$ As you can see, I've immediately divided the first row by 2 so that I can get a pivot of 1.

$\begin{bmatrix}1&0&1/2\\0&1&1\\0&1&-3/2 \end{bmatrix}$

$\begin{bmatrix}1&0&1/2\\0&1&1\\0&0&-5/2 \end{bmatrix}$


What happened? Is dividing a row by an integer illegal?

[edit.] The reason for the upper triangular matrix, is because I want to find the determinant.
I am aware that switching rows causes the sign to change. No big issue, because I can note this, and at the end adjust the determinant accordingly. But is this similar? Is the returned determinant supposed to be re-multiplied because I had divided it first?
 
Last edited:

Ackbach

Indicium Physicus
Staff member
Jan 26, 2012
4,191

Opalg

MHB Oldtimer
Staff member
Feb 7, 2012
2,702
Re: upper triangular matrix

When you multiply a row (or a column) by a constant, you multiply the determinant by that constant. So when you divided the top row by 2, you were also dividing the determinant by 2.
 

Klaas van Aarsen

MHB Seeker
Staff member
Mar 5, 2012
8,774
Re: upper triangular matrix

The algorithm to calculate a determinant is slightly different from the algorithm to solve a system of equations.
The principle is the same though.
If you divide a row by a number, you also have to divide the result by that number.
 

Petrus

Well-known member
Feb 21, 2013
739
Re: upper triangular matrix

I want to make an upper triangular matrix. From this:
$\begin{bmatrix}2&0&1\\0&1&1\\3&1&0 \end{bmatrix}$

The first is the correct one. The second is incorrect, yet I fail to understand why.

$\begin{bmatrix}2&0&1\\0&1&1\\3&1&0 \end{bmatrix}$

$\begin{bmatrix}2&0&1\\0&1&1\\0&1&-3/2 \end{bmatrix}$

$\begin{bmatrix}2&0&1\\0&1&1\\0&0&-5/2 \end{bmatrix}$



Second method.

$\begin{bmatrix}2&0&1\\0&1&1\\3&1&0 \end{bmatrix}$

$\begin{bmatrix}1&0&1/2\\0&1&1\\3&1&0 \end{bmatrix}$ As you can see, I've immediately divided the first row by 2 so that I can get a pivot of 1.

$\begin{bmatrix}1&0&1/2\\0&1&1\\0&1&-3/2 \end{bmatrix}$

$\begin{bmatrix}1&0&1/2\\0&1&1\\0&0&-5/2 \end{bmatrix}$


What happened? Is dividing a row by an integer illegal?

[edit.] The reason for the upper triangular matrix, is because I want to find the determinant.
I am aware that switching rows causes the sign to change. No big issue, because I can note this, and at the end adjust the determinant accordingly. But is this similar? Is the returned determinant supposed to be re-multiplied because I had divided it first?
Hello,
You could Also use rule of sarrus (would take you only 10-15 sec calculate it out)! You got many zero in the matrix so it would be easy to think out the answer!
Or maybe you wanted to practice with reducing the matrix.
Regards,
\(\displaystyle |\pi\rangle\)
 

Jundoe

New member
Nov 23, 2013
10
Re: upper triangular matrix

Hello,
You could Also use rule of sarrus (would take you only 10-15 sec calculate it out)! You got many zero in the matrix so it would be easy to think out the answer!
Or maybe you wanted to practice with reducing the matrix.
Regards,
\(\displaystyle |\pi\rangle\)
Actually this was an example. I was trying to understand this for a larger matrix seeing as my final will request I find the determinant of a 4x4. *I must've missed that vital information from my textbook–again, thanks EVERYONE for your inputs.

That said, when it comes to finding the determinant for a Cramer's rule application, our finals usually don't go over 3x3, so the rule of Sarrus is awesome for that.
 

Petrus

Well-known member
Feb 21, 2013
739
Re: upper triangular matrix

Actually this was an example. I was trying to understand this for a larger matrix seeing as my final will request I find the determinant of a 4x4. *I must've missed that vital information from my textbook–again, thanks EVERYONE for your inputs.

That said, when it comes to finding the determinant for a Cramer's rule application, our finals usually don't go over 3x3, so the rule of Sarrus is awesome for that.
You can ALWAYS make a 4x4 matrix to 3x3 matrix.

Regards,
\(\displaystyle |\pi\rangle\)
 

Jundoe

New member
Nov 23, 2013
10
Re: upper triangular matrix

You can ALWAYS make a 4x4 matrix to 3x3 matrix.

Regards,
\(\displaystyle |\pi\rangle\)
This is intriguing. How would I proceed?
Would I have to multiply the [4x4]matrix by some [4x3]matrix, then take the new [4x3] result and have it multiplied like so: [3x4][4x3], thus yielding a [3x3]?

...a google search only offered programmer contents.
 

Petrus

Well-known member
Feb 21, 2013
739
Re: upper triangular matrix

This is intriguing. How would I proceed?
Would I have to multiply the [4x4]matrix by some [4x3]matrix, then take the new [4x3] result and have it multiplied like so: [3x4][4x3], thus yielding a [3x3]?

...a google search only offered programmer contents.
Nop, you expand. Here is a explain Expansion by Minors | Introduction to Linear Algebra | FreeText Library
And here you got an exemple of calculatong determinant of 4x4 matrix http://nebula.deanza.edu/~bloom/math43/Determinant4x4Matrix.pdf
Regards,
\(\displaystyle |\pi\rangle\)
 

Jundoe

New member
Nov 23, 2013
10
Re: upper triangular matrix

Nop, you expand. Here is a explain Expansion by Minors | Introduction to Linear Algebra | FreeText Library
And here you got an exemple of calculatong determinant of 4x4 matrix http://nebula.deanza.edu/~bloom/math43/Determinant4x4Matrix.pdf
Regards,
\(\displaystyle |\pi\rangle\)
Just tried it out. This is much better than doing it by reaching an upper triangle. I don't know which is faster, but for my final I'm definitely going with this method. It's less error-prone. :D

Thanks!!
 

Ackbach

Indicium Physicus
Staff member
Jan 26, 2012
4,191
Re: upper triangular matrix

Just tried it out. This is much better than doing it by reaching an upper triangle. I don't know which is faster, but for my final I'm definitely going with this method. It's less error-prone. :D

Thanks!!
So far as I know, the fastest exact method for computing determinants is basically Gaussian row-reduction to an upper-triangular matrix. (They have fancy variants of it like the Bareiss algorithm.)