1. ## Gaussian Elimination Help!

Hi guys,
I've been given a question that asks me to use Gaussian elimination to reduce the following system of equation to row echelon form, hence solving for x, y, z and w
x+2y+z+w=1
2x+y-z-w=2
x+2y-3z+w=-3
x-y+z-w=3

I'm not really too comfortable with Gaussian elimination but so far I've managed to put it into matrix form and I've managed to get zeros in every place they need to be bar one:

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

But I don't know how to continue on with my 4th row because the -3 is where it's meant to be zero.
I'm just super confused and any help would be appreciated!

Also sorry my matrix is dodgey, I don't know how to post it correctly!

2. ## Re: Gaussian Elimination Help!

I haven't checked your calculation so far but what problem are you encountering now? The idea is like this: Use row 1 to make the first column all zeros (except in row 1). Use row 2 to introduce zeros in the second column below row 2 and so on. That is, use the kth row to introduce zeros in the kth column below the kth row. You have introduced zeros in the 1st colums already. Now do it for the second (using the second row). You have introduced a 0 in the 3rd row but just do the same for the 4th row as well. Then use the 3rd row.

At any point, if you find that the leading element of the kth row i.e element k,k has become 0 when you want to use the kth row, then exchange it with any other row which does not have a 0 as its leading element. (Usually when this is done on computers it is exchanged with the row with the highest magnitude leading element (its called partial pivoting). Anyway, you don't have such issues. You are in the 2nd step and the second row does not have a 0 as its leading element. So just keep continuing what you are doing. If you are confused because you have already introduced a 0 in the 4th row (4,3), don't worry about it. You might have to make it non-zero and zero it out using the 3rd row in the next step.

3. ## Re: Gaussian Elimination Help!

I just don't understand what row I'm meant to use now. Like do I use the 2nd row and just continue down that row and then 3rd?

4. ## Re: Gaussian Elimination Help!

Hello, mandarep!

$\displaystyle \begin{array}{ccc}x+2y+z+w&=&1 \\ 2x+y-z-w&=&2 \\ x+2y-3z+w&=&\text{-}3 \\ x-y+z-w&=&3\end{array}$

$\displaystyle \text{We have: }\:\left|\begin{array}{cccc|c}1&2&1&1&1 \\ 2&1&\text{-}1\;&\text{-}1\;&2 \\ 1&2&\text{-}3\;&1&\text{-}3\; \\ 1&\text{-}1\; & 1 & \text{-}1\; & 3 \end{array}\right|$

$\displaystyle \begin{array}{c}\\ R_2-2R_1 \\ R_3-R_1 \\ R_4-R_1\end{array}\left|\begin{array}{cccc|c}1&2&1&1&1 \\ 0&\text{-}3\;&\text{-}3\;&\text{-}3\;&0 \\ 0&0&\text{-}4\;&0&\text{-}4\; \\ 0&\text{-}3\;&0&\text{-}2\;&2 \end{array}\right|$

. . $\displaystyle \begin{array}{c} \\ \text{-}\frac{1}{3}R_2 \\ \text{-}\frac{1}{4}R_3 \\ \\ \end{array}\left|\begin{array}{cccc|c} 1&2&1&1&1 \\0&1&1&1&0 \\ 0&0&1&0&1 \\ 0&\text{-}3\;&0&\text{-}2\;&2\end{array}\right|$

$\displaystyle \begin{array}{c}R_1-2R_2 \\ \\ \\ R_4+3R_2 \end{array} \left|\begin{array}{cccc|c}1&0&\text{-}1\;&\text{-}1\;&1 \\ 0&1&1&1&0 \\ 0&0&1&0&1 \\ 0&0&3&1&2 \end{array}\right|$

$\displaystyle \begin{array}{c}R_1+R_3 \\ R_2-R_3 \\ \\ R_4-3R_3 \end{array}\left|\begin{array}{cccc|c}1&0&0&\text{-}1\;&2 \\ 0&1&0&1&\text{-}1\; \\ 0&0&1&0&1 \\ 0&0&0&1&\text{-}1\; \end{array}\right|$

$\displaystyle \begin{array}{c}R_1+R_4 \\ R_2-R_4 \\ \\ \\ \end{array}\left|\begin{array}{cccc|c}1&0&0&0&1 \\ 0&1&0&0&0 \\ 0&0&1&0&1 \\ 0&0&0&1&\text{-}1\; \end{array}\right|$

$\displaystyle \text{Therefore: }\:\begin{bmatrix}x\\y\\z\\w \end{bmatrix} \;=\;\begin{bmatrix}1 \\0\\1\\\text{-}1\; \end{bmatrix}$