Gaussian Elimination Example By GilGarza

Considering the following equations:

3x - 2y + 5z = 14
-x + 3y + z = 8
5x - y - 5z = -12

We can created the augmented matrix:

(1)
\begin{align} \left(\begin{array}{cc} 3 & -2 & 5 & 14 \\ -1 & 3 & 1 & 8 \\5 & -1 & -5 & -12\end{array}\right) \end{align}

To make the '3' in the (1,1) entry our pivot we convert it to 1 by
doing the following:

R1 = 1/3R1

(2)
\begin{align} \left(\begin{array}{cc} 1 & -2/3 & 5/3 & 14/3 \\ -1 & 3 & 1 & 8 \\5 & -1 & -5 & -12\end{array}\right) \end{align}

Next we make entry (2,1) equal to zero by:

R2 = 5R2 + R3

(3)
\begin{align} \left(\begin{array}{cc} 1 & -2/3 & 5/3 & 14/3 \\ 0 & 14 & 0 & 28 \\5 & -1 & -5 & -12\end{array}\right) \end{align}

Now to make entry (3,1) zero we do:

R3 = -5R1 + R3

(4)
\begin{align} \left(\begin{array}{cc} 1 & -2/3 & 5/3 & 14/3 \\ 0 & 14 & 0 & 28 \\0 & 7/3 & -40/3 & -106/3\end{array}\right) \end{align}

Finally, to make entry (3,2) also equal to
zero we perform:

R3 = R2 + -6R3

(5)
\begin{align} \left(\begin{array}{cc} 1 & -2/3 & 5/3 & 14/3 \\ 0 & 14 & 0 & 28 \\0 & 0 & 80 & 240\end{array}\right) \end{align}

As you can see we now have a triangular matrix in which
'z' can be solved easily:

80z = 240
z = 3

Also R2 can be solved to find the value of 'y':

14y = 28
y = 2

And lastly using substitution we can find the
value of 'x':

x - (2/3)(2) + (5/3)(3) = (14/3)
x - (4/3) + (15/3) = (14/3)
x + (11/3) = (14/3)
x = 1

Thus having all of our answers:

x = 1
y = 2
z = 3

page revision: 2, last edited: 31 Jan 2012 16:20