How to solve a linear system when there isn't an exact solution? I've been trying to solve this linear system using Gaussian elimination, but I can't seem to finish it.
$ x +0y - z + w = 0 $
$ 0x + 2y + 2z + 2w = 2 $
$ x + y + 0z + 2w = 1 $
$$ \left[
\begin{array}{cccc|c}
1 & 0 & -1 & 1 & 0 \\
0 & 2 & 2 & 2 & 2 \\
1 & 1 & 0 & 2 & 1
\end{array}
\right] \Rightarrow \left[
\begin{array}{cccc|c}
1 & 0 & -1 & 1 & 2 \\
0 & 1 & 1 & 1 & 1 \\
0 & 1 & 1 & 1 & 1
\end{array}
\right] $$
$$ \\ -R_1\rightarrow R_3 \\ \frac{1}{2} R_2 \\ $$ 
And what then? I couldn't come up with a conventional solution where I just start with finding the rightmost variable and all other variables show themselves easily then. $ -R_2 \rightarrow R_3 $ doesn't end up in anything sensible. Could you please give me a hint on how to move on from here?
p.s. First time using the formatting, pardon my mistakes.
 A: If you continue the elimination process, you get this reduced row echelon form:
$$\left[
\begin{array}{cccc|c}
1 & 0 & -1 & 1 & 0 \\
0 & 1 & 1 & 1 & 1 \\
0 & 0 & 0 & 0 & 0
\end{array}
\right]$$
Since there are no pivots in the $z$ or $w$ columns, this means you can choose $z$ and $w$ freely when constructing a solution. The remaining equations, e.g.
$$ y + 1z+1w = 1 $$
will then allow you to find the corresponding values for $x$ and $y$ that satisfy all the equations.
A: Next you subtract row 2 from row 3 to get a row of all $0$'s.  Thus you have two free variables ($z$ and $w$), whose values are arbitrary; the top two rows tell you what $x$ and $y$ are in terms of $z$ and $w$.
A: From
$\left[
\begin{array}{cccc|c}
1 & 0 & -1 & 1 & 0 \\
0 & 1 & 1 & 1 & 1 \\
0 & 0 & 0 & 0 & 0
\end{array}
\right]$
add the free variables $z=s$, $w=t$ to get
$\left[
\begin{array}{cccc|c}
1 & 0 & -1 & 1 & 0 \\
0 & 1 & 1 & 1 & 1 \\
0 & 0 & 1 & 0 & s\\
0 & 0 & 0 & 1 & t
\end{array}
\right]\to
\left[\begin{array}{cccc|c}
1 & 0 & 0 & 1 & s \\
0 & 1 & 0 & 1 & 1-s \\
0 & 0 & 1 & 0 & s\\
0 & 0 & 0 & 1 & t
\end{array}
\right]\to
\left[\begin{array}{cccc|c}
1 & 0 & 0 & 0 & s-t \\
0 & 1 & 0 & 0 & 1-s-t \\
0 & 0 & 1 & 0 & s\\
0 & 0 & 0 & 1 & t
\end{array}
\right]$
obtaining
$$\left(
\begin{array}{c}
x\\y\\z\\w
\end{array}
\right)=
\left(
\begin{array}{c}
0\\1\\0\\0
\end{array}
\right)+
\left(\begin{array}{r}
1\\-1\\1\\0
\end{array}
\right)s+
\left(\begin{array}{r}
-1\\-1\\0\\1
\end{array}
\right)t$$
