Gaussian Elimination Example by Cristal Jimenez

Gaussian Elimination

Here is the System of Equations:

x+ y+ z+ w=4
x- 2y- z- w=3
2x- y+ z- w=2
x- y+ 2z- 2w=-7

This is the Augmented Matrix:

1 1 1 1 4
1 -2 -1 -1 3
2 -1 1 -1 2
1 -1 2 -2 -7

Step1: We need (2,1) to become 0 so we add (-1*r1) to r2

1 1 1 1 4
0 -3 -2 -2 -1
2 -1 1 -1 2
1 -1 2 -2 -7

Step 2: Make (3,1) a 0 we add (-2*r1) to r3

1 1 1 1 4
0 -3 -2 -2 -1
0 -3 -1 -3 -6
1 -1 2 -2 -7

Step3: Make (4,1) a 0 we add (-1*r1) to r4

1 1 1 1 4
0 -3 -2 -2 -1
0 -3 -1 -3 -6
0 -2 1 -3 -11

Step4: Make (2,2) a pivot by dividing r2 by -3

1 1 1 1 4
0 1 (2/3) (2/3) (1/3)
0 -3 -1 -3 -6
0 -2 1 -3 -11

Step 5: Make (3,2) a 0 by adding (3*r2) to r3

1 1 1 1 4
0 1 (2/3) (2/3) (1/3)
0 0 1 -1 -5
0 -2 1 -3 -11

Step 6: Make (4,2) a 0 by adding (2*r2) to r4

1 1 1 1 4
0 1 (2/3) (2/3) (1/3)
0 0 1 -1 -5
0 0 (7/3) (-5/3) (-31/3)

Step 7: Since (3,3) is a pivot we make (4,3) into a 0 by adding ((-7/3)*r3) to r4

1 1 1 1 4
0 1 (2/3) (2/3) (1/3)
0 0 1 -1 -5
0 0 0 (2/3) (4/3)

Step 8:Make (4,4) into a pivot by dividing r4 by (2/3)

1 1 1 1 4
0 1 (2/3) (2/3) (1/3)
0 0 1 -1 -5
0 0 0 1 2

Step 9: Make (3,4) to a 0 by adding (1*r4) to r3

1 1 1 1 4
0 1 (2/3) (2/3) (1/3)
0 0 1 0 -3
0 0 0 1 2

Step 10: Make (2,4) to a 0 by adding ((-2/3)*r4) to r2

1 1 1 1 4
0 1 (2/3) 0 -1
0 0 1 0 -3
0 0 0 1 2

Step 11: Make (1,4) to a 0 by adding (-1*r4) to r1

1 1 1 0 2
0 1 (2/3) 0 -1
0 0 1 0 -3
0 0 0 1 2

Step 12: Make (2,3) to a 0 by adding ((-2/3)*r3) to r2

1 1 1 0 2
0 1 0 0 1
0 0 1 0 -3
0 0 0 1 2

Step 13: Make (1,3) to a 0 by adding (-1*r3) to r1

1 1 0 0 5
0 1 0 0 1
0 0 1 0 -3
0 0 0 1 2

Step 14: Last make (1,2) to a 0 by adding (-1*r2) to r1

1 0 0 0 4
0 1 0 0 1
0 0 1 0-3
0 0 0 1 2

The solutions would be:
x=4
y=1
z=-3
w=2

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