Gaussian Elimination Example by Ramiro Cavazos

Example Problem:

x + -3y + z = 4
2x + -8y +8z = -2
-6x + 3y + -15z = 9

Augmented matrix:

1 -3 1 4
2 -8 8 -2
-6 3 -15 9

Now I use -2R1+R2=R2:

1 -3 1 4
0 -2 6 -10
-6 3 -15 9

Then I use 6R1+R3=R3:

1 -3 1 4
0 -2 6 -10
0 -15 -9 33

Then i use (1/2)R2=R2, and (1/3)R3=R3:

1 -3 1 4
0 -1 3 -5
0 -5 -3 11

Then I use -5R2+R3=R3:

1 -3 1 4
0 -1 3 -5
0 0 -18 36

Now I turn my matrix into an equation:

x + -3y +z = 4
-y + 3z = -5
-18z = 36

From this point, I can easily solve for for (x, y, z) by substitution:

From the last equation I solve for z by dividing (36/-18), and i got z=-2.

Then I plug the -2 into the z of the 2nd equation and my new equation is -y -6 = -5.

I then move the -6 to the other side to get -y = 1, so at the end i get y=-1.

Once I have my values for the y and the z, I just plug them into my first equation and solve for x.

So the equation looks like this, x +3 -2 = 4, which is the same as x +1 = 4.

Then i move the 1 to the other side and I get x=3.

The results for my Gaussian elimination example are:

x=3
y=-1
z=-2

- Ramiro Cavazos

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License