# Thread: Matrix - Gaussian elimination

1. ## Matrix - Gaussian elimination

Hi

Having trouble with solving the equations using Gaussian elimination

1) Solve the following system of equations using Gaussian elimination

$5x-2y+z=-6$
$-2x+z=-4$
$-x-2y+2z=3$

Show the final tableau (augmented matrix) of the elimination and the values of x, y and z.

This is what i have done but it is incorrect according the book's answer.

$\begin{bmatrix}
5 & -2 & 1 & | & -6 \\
-2 & 0 & 1 & | & -4 \\
-1 & -2 & 2 & | & 3 \\
\end{bmatrix}
$

$\begin{bmatrix}
5 & -2 & 1 & | & -6 \\
0 & -4 & -3 & | & -10 \\
-1 & -2 & 2 & | & 3 \\
\end{bmatrix}
$

R2-2R3

$\begin{bmatrix}
1 & \frac{-2}{5} & \frac{1}{5} & | & \frac{-6}{5} \\
0 & -4 & 3 & | & -10 \\
-1 & -2 & 2 & | & 3 \\
\end{bmatrix}
$

$\frac{1}{5}R1$

$\begin{bmatrix}
1 & \frac{-2}{5} & \frac{1}{5} & | & \frac{-6}{5} \\
0 & -4 & 3 & | & -10 \\
0 & \frac{-12}{5} & \frac{11}{5} & | & \frac{9}{5} \\
\end{bmatrix}
$

$R1+R3$

$\begin{bmatrix}
1 & \frac{-2}{5} & \frac{1}{5} & | & \frac{-6}{5} \\
0 & -4 & 3 & | & -10 \\
0 & \frac{-10}{5} & \frac{11}{5} & | & \frac{9}{5} \\
\end{bmatrix}
$

$\frac{1}{4}R2$

$\begin{bmatrix}
1 & \frac{-2}{5} & \frac{1}{5} & | & \frac{-6}{5} \\
0 & -4 & 3 & | & -10 \\
0 & 0 & \frac{7}{10} & | & \frac{-16}{5} \\
\end{bmatrix}
$

$\frac{10}{5}R2+R3$

P.S

2. Would the answer perhaps be:

x = 2-t
y = 1/2t - 8
z = 2t

If not, then I should take another look at the question If it is, or close, I can post my solution.

3. Originally Posted by Paymemoney
Hi

Having trouble with solving the equations using Gaussian elimination

1) Solve the following system of equations using Gaussian elimination

$5x-2y+z=-6$
$-2x+z=-4$
$-x-2y+2z=3$

Show the final tableau (augmented matrix) of the elimination and the values of x, y and z.

This is what i have done but it is incorrect according the book's answer.

$\begin{bmatrix}
5 & -2 & 1 & | & -6 \\
-2 & 0 & 1 & | & -4 \\
-1 & -2 & 2 & | & 3 \\
\end{bmatrix}
$

$\begin{bmatrix}
5 & -2 & 1 & | & -6 \\
0 & -4 & -3 & | & -10 \\
-1 & -2 & 2 & | & 3 \\
\end{bmatrix}
$

R2-2R3

$\begin{bmatrix}
1 & \frac{-2}{5} & \frac{1}{5} & | & \frac{-6}{5} \\
0 & -4 & 3 & | & -10 \\
-1 & -2 & 2 & | & 3 \\
\end{bmatrix}
$

$\frac{1}{5}R1$

$\begin{bmatrix}
1 & \frac{-2}{5} & \frac{1}{5} & | & \frac{-6}{5} \\
0 & -4 & 3 & | & -10 \\
0 & \frac{-12}{5} & \frac{11}{5} & | & \frac{9}{5} \\
\end{bmatrix}
$

$R1+R3$

$\begin{bmatrix}
1 & \frac{-2}{5} & \frac{1}{5} & | & \frac{-6}{5} \\
0 & -4 & 3 & | & -10 \\
0 & \frac{-10}{5} & \frac{11}{5} & | & \frac{9}{5} \\
\end{bmatrix}
$

$\frac{1}{4}R2$

$\begin{bmatrix}
1 & \frac{-2}{5} & \frac{1}{5} & | & \frac{-6}{5} \\
0 & -4 & 3 & | & -10 \\
0 & 0 & \frac{7}{10} & | & \frac{-16}{5} \\
\end{bmatrix}
$

$\frac{10}{5}R2+R3$

P.S
That will give you the correct values for x, y, and z (assuming your arithmetic is correct, I did not check it) but what, exactly, does your text consider the "final tableau"? You have got to "triangular form" and now you can solve for x, y, and z by back substitution. But I notice you got a "1" in the first column but did not get "1"s on the diagonal in the other columns. Some texts, at least, would consider having "1" s all along the diagonal as necessary. Others might expect to see a complete reduction to the identity matrix for the first 3 columns.

4. Originally Posted by HallsofIvy
That will give you the correct values for x, y, and z (assuming your arithmetic is correct, I did not check it) but what, exactly, does your text consider the "final tableau"? You have got to "triangular form" and now you can solve for x, y, and z by back substitution. But I notice you got a "1" in the first column but did not get "1"s on the diagonal in the other columns. Some texts, at least, would consider having "1" s all along the diagonal as necessary. Others might expect to see a complete reduction to the identity matrix for the first 3 columns.
actually the answer is not supplied for this question, but when i used the calculator it gave me what you said '1' on the diagonal

$\begin{bmatrix}
1 & \frac{-2}{5} & \frac{1}{5} & | & \frac{-6}{5} \\
0 & 1 & \frac{-1}{12} & | & \frac{-3}{4} \\
0 & 0 & 1 & | & \frac{-21}{4} \\
\end{bmatrix}$

5. Originally Posted by Paymemoney
Hi

Having trouble with solving the equations using Gaussian elimination

1) Solve the following system of equations using Gaussian elimination

$5x-2y+z=-6$
$-2x+z=-4$
$-x-2y+2z=3$

Show the final tableau (augmented matrix) of the elimination and the values of x, y and z.

This is what i have done but it is incorrect according the book's answer.

$\begin{bmatrix}
5 & -2 & 1 & | & -6 \\
-2 & 0 & 1 & | & -4 \\
-1 & -2 & 2 & | & 3 \\
\end{bmatrix}
$

$\begin{bmatrix}
5 & -2 & 1 & | & -6 \\
0 & -4 & -3 & | & -10 \\
-1 & -2 & 2 & | & 3 \\
\end{bmatrix}
$

R2-2R3
There is an error in this first step. -2 times the second number in R3 is + 4. The second number in R2 now should be 4, not -4.

$\begin{bmatrix}
1 & \frac{-2}{5} & \frac{1}{5} & | & \frac{-6}{5} \\
0 & -4 & 3 & | & -10 \\
-1 & -2 & 2 & | & 3 \\
\end{bmatrix}
$

$\frac{1}{5}R1$

$\begin{bmatrix}
1 & \frac{-2}{5} & \frac{1}{5} & | & \frac{-6}{5} \\
0 & -4 & 3 & | & -10 \\
0 & \frac{-12}{5} & \frac{11}{5} & | & \frac{9}{5} \\
\end{bmatrix}
$

$R1+R3$

$\begin{bmatrix}
1 & \frac{-2}{5} & \frac{1}{5} & | & \frac{-6}{5} \\
0 & -4 & 3 & | & -10 \\
0 & \frac{-10}{5} & \frac{11}{5} & | & \frac{9}{5} \\
\end{bmatrix}
$

$\frac{1}{4}R2$

$\begin{bmatrix}
1 & \frac{-2}{5} & \frac{1}{5} & | & \frac{-6}{5} \\
0 & -4 & 3 & | & -10 \\
0 & 0 & \frac{7}{10} & | & \frac{-16}{5} \\
\end{bmatrix}
$

$\frac{10}{5}R2+R3$

P.S

6. ok, i have tried again, this is what i got:

$\begin{bmatrix}
5 & -2 & 1 & | & -6 \\
-2 & 0 & 1 & | & -4 \\
-1 & -2 & 2 & | & 3 \\
\end{bmatrix}
$

$\begin{bmatrix}
5 & -2 & 1 & | & -6 \\
0 & 4 & -3 & | & -10 \\
-1 & -2 & 2 & | & 3 \\
\end{bmatrix}
$

R2-2R3

$\begin{bmatrix}
1 & \frac{-2}{5} & \frac{1}{5} & | & \frac{-6}{5} \\
0 & 4 & -3 & | & -10 \\
-1 & -2 & 2 & | & 3 \\
\end{bmatrix}
$

$\frac{1}{5}R1$

$\begin{bmatrix}
1 & \frac{-2}{5} & \frac{1}{5} & | & \frac{-6}{5} \\
0 & 4 & -3 & | & -10 \\
0 & \frac{-12}{5} & \frac{11}{5} & | & \frac{9}{5} \\
\end{bmatrix}
$

R3+R1

$\begin{bmatrix}
1 & \frac{-2}{5} & \frac{1}{5} & | & \frac{-6}{5} \\
0 & 4 & -3 & | & -10 \\
0 & 0 & \frac{2}{10} & | & \frac{-21}{5} \\
\end{bmatrix}
$

$R3+\frac{3}{5}R2$

$z=\frac{-105}{10}$
$y=\frac{-10-\frac{315}{10}}{10}$ $= \frac{-415}{40}$
$x=\frac{-53}{10}$

7. I'm not sure what you are doing, but as I understood it you just have to set Z to t, in my case I set it to 2t to make it more simple counting.

Then it should all fall out, if z = 2t you can find out what x is and then ultimately what y is.

8. Originally Posted by Paymemoney
o
$\begin{bmatrix}
1 & \frac{-2}{5} & \frac{1}{5} & | & \frac{-6}{5} \\
0 & 4 & -3 & | & -10 \\
0 & 0 & \frac{2}{10} & | & \frac{-21}{5} \\
\end{bmatrix}
$

$R3+\frac{3}{5}R2$

$z=\frac{-105}{10}$
$y=\frac{-10-\frac{315}{10}}{10}$ $= \frac{-415}{40}$
$x=\frac{-53}{10}$
Briefly looking at that, you should have a figure of z = -210/10 and not -105/10. Then substitute that value into your other equations to work out the value of y and x.

9. Originally Posted by Paymemoney
$\begin{bmatrix}
1 & \frac{-2}{5} & \frac{1}{5} & | & \frac{-6}{5} \\
0 & 4 & -3 & | & -10 \\
0 & \frac{-12}{5} & \frac{11}{5} & | & \frac{9}{5} \\
\end{bmatrix}
$

R3+R1

$\begin{bmatrix}
1 & \frac{-2}{5} & \frac{1}{5} & | & \frac{-6}{5} \\
0 & 4 & -3 & | & -10 \\
0 & 0 & \frac{2}{10} & | & \frac{-21}{5} \\
\end{bmatrix}
$

$R3+\frac{3}{5}R2$

$z=\frac{-105}{10}$
$y=\frac{-10-\frac{315}{10}}{10}$ $= \frac{-415}{40}$
$x=\frac{-53}{10}$
Everything looks fine until the 3rd column in your final matrix $\frac{3(-3)}{5} = \frac{-9}{5}$

So $\frac{11}{5} + \frac{-9}{5} = \frac{2}{5}$

Take $\frac{2}{5}R3$ and the bottom row becomes 0 0 1 | $\frac{-21}{2}$