
Originally Posted by
pyrogurl6989
I was taught how to do Gauss-Jordan elimination in school but I don't understand how to do it. Ive been showed a few times but I still cant figure it out.
Hello,
I'm going to show how to do Gauss elimination in (as I hope) small steps. Maybe this will help a little bit further on:
The general aim is to transform the matrix into one where the main diagonal consists of ones. Then you can get directly the solution in the last column.
(By the way: Most calculators use the command rref(matrix) to do this elimination. rref means "reduced row equelon form")
I'll use your problem #2
Code:
x + y + z = 2
2x -3y + z = -11
-x +2y - z = 8
| 1 1 1 | 2 |
| 2 -3 1 | -11 |
| -1 2 -1 | 8 |
| 1 1 1 | 2 |
| 0 -5 -1 | -15 | R2-2*R1
| 0 3 0 | 10 | R3 + R1
| 1 1 1 | 2 |
| 0 1 1/5 | 3 | (R2)/(-5)
| 0 1 0 | 10/3 | (R3)/3
| 1 1 1 | 2 |
| 0 1 1/5 | 3 |
| 0 0 -1/5 | 1/3 | R3 - R2|
| 1 1 1 | 2 |
| 0 1 0 | 10/3 | R2 + R3
| 0 0 -1/5 | 1/3 |
| 1 1 1 | 2 |
| 0 1 0 | 10/3 |
| 0 0 1 | -5/3 | (R3)*(-5) Code:
Now you work back from the last rows to eliminate
the ones in the 1rst row:
| 1 0 0 | 1/3 | R1 - R2 - R3
| 0 1 0 | 10/3 |
| 0 0 1 | -5/3 | So it is the solution c: x = 1/3, y = 10/3 , z = -5/3
A personal remark: It takes some time to do this method error-free and fairly fast. So I'll leave the other problems for you.
EB