Gaussian elimination with augmented matrix

chiqititaa

New member
Joined
Mar 12, 2024
Messages
1
Hi all!

So I'm trying to wrap my head around gaussian elimination and found myself stuck on the very first problem I encountered, I was hoping to get some help to clear it up.

Solve the system of equations:
[math]\begin{cases} x_1+2x_2-x_3 = 6\\ 2x_1-x_2+x_3 = 1\\ -x_1+x_2-2x_3 = 3 \end{cases}[/math]
After writing this as a augmented matrix I multiply row 1 with -2 and 1, and add that to row 2 and 3 respectively, giving me:

[math]\left( \begin{array}{ccc|c} 1 & 2 & -3 & 6 \\ 0 & -5 & 3 & -11\\ 0 & 3 & -3 & 9 \end{array} \right)[/math]
I then multiply row 2 with -1/5 and add it to itself to make -5 (middle, row 2) into 1. I also multiply row 3 with -1 and add it to itself to make 3 (middle, row 3) into 0. This gives me the matrix:

[math]\left( \begin{array}{ccc|c} 1 & 2 & -1 & 6\\ 0 & 1 & -3/5 & -11/5\\ 0 & 0 & 3 & -9 \end{array} \right)[/math]
When trying to solve for x3 though, I get x3=-3 when it should be x3=-2. I would be very grateful for any help, thank you!
 
Check your first row of your matrix. Your -3 should be -1.

Also in your second matrix your -11/5 should be positive. This will then affect your third row.
 
So I'm trying to wrap my head around gaussian elimination and found myself stuck on the very first problem I encountered, I was hoping to get some help to clear it up.

Solve the system of equations:
[math]\begin{cases} x_1+2x_2-x_3 = 6\\ 2x_1-x_2+x_3 = 1\\ -x_1+x_2-2x_3 = 3 \end{cases}[/math]
[math]\left( \begin{array}{ccc|c} 1 & 2 & -3 & 6 \\ 0 & -5 & 3 & -11\\ 0 & 3 & -3 & 9 \end{array} \right)[/math]

Is there a typo in the first row? Shouldn't it be [imath]x_1 + 2x_2 - x_3 = 6[/imath]?

I then multiply row 2 with -1/5 and add it to itself to make -5 (middle, row 2) into 1.

You can either operate *with* a row or else *on* a row, but you can't do both. And it appears that what you did was operate *on* the row, by multiplying by [imath]-\frac{1}{5}[/imath], which is fine.

I also multiply row 3 with -1 and add it to itself to make 3 (middle, row 3) into 0.

I'm not sure what you did here, but it does not yield a valid result.

(Thank you, by the way, for showing your work so nicely!)

After the first row operation, you had this:

[imath]\qquad \left[\begin{array}{ccc|c} 1&2&-1&6\\0&-5&3&-11\\0&3&-3&9 \end{array}\right][/imath]

At this stage, I would multiply the third row by [imath]\frac{1}{3}[/imath] to get:

[imath]\qquad \left[\begin{array}{ccc|c} 1&2&-1&6\\0&-5&3&-11\\0&1&-1&3 \end{array}\right][/imath]

(Note: I am much more interested in avoiding fractions for as long as possible, than I am in having the leading zeroes line up the "right" way. I can always swap rows later. I'll clear out columns first.)

With this, I can multiply the third row ([imath]R_3[/imath] by [imath]-2[/imath] and add to the first row ([imath]R_1[/imath]. Similarly, I can multiply [imath]R_3[/imath] by [imath]5[/imath] and add to [imath]R_2[/imath]. My result then is:

[imath]\qquad \left[\begin{array}{ccc|c} 1&0&1&0\\0&0&-2&4\\0&1&-1&3\end{array}\right][/imath]

From this point, I would multiply [imath]R_2[/imath] by [imath]-\frac{1}{2}[/imath]. Then I'd clear out the third columns of [imath]R_1[/imath] and [imath]R_3[/imath], or else I'd just start solving, working from [imath]x_2 = -2[/imath] onwards.
 
Regardless of what your teacher and/or textbook says, there is no need to get 1 on the diagonal until the very last step as stapel mentioned in an earlier post. Otherwise, you'll create fractions which makes these row reductions more complicated.
 
Top