## Solving a System of Equations By Reduction to Row Reduced Echelon Form

Suppose we have a system of equations
$2x_1+2x_2-x_3+x_5=0$

$-x_1-x_2-2x_3-3x_4+x_5=0$

$x_1+x_2-2x_3-x_5=0$

$x_3+x_4+x_5=0$

We can represent this in matrix form as
$\left( \begin{array}{ccccc} 2 & 2 & -1 & 0 & 1 \\ -1 & -1 & 2 & -3 & 1 \\ 1 & 1 & -2 & 0 & -1 \\ 0 & 0 & 1 & 1 & 1 \end{array} \right) \begin{pmatrix}x_1 \\ x_2 \\ x_3 \\ x_4 \\ x_5 \end{pmatrix} = \begin{pmatrix}0\\0\\0\\0\\0\end{pmatrix}$

Now row reduce the matrix
$\left( \begin{array}{ccccc} 2 & 2 & -1 & 0 & 1 \\ -1 & -1 & 2 & -3 & 1 \\ 1 & 1 & -2 & 0 & -1 \\ 0 & 0 & 1 & 1 & 1 \end{array} \right)$

Divide the first row by 2.
$\left( \begin{array}{ccccc} 1 & 1 & -1/2 & 0 & 1/2 \\ -1 & -1 & 2 & -3 & 1 \\ 1 & 1 & -2 & 0 & -1 \\ 0 & 0 & 1 & 1 & 1 \end{array} \right)$

Add row 1 to row 2 and subtract row 1 from row 3.
$\left( \begin{array}{ccccc} 1 & 1 & -1/2 & 0 & 1/2 \\ 0 & 0 & 3/2 & -3 & 3/2 \\ 0 & 0 & -3/2 & 0 & -3/2 \\ 0 & 0 & 1 & 1 & 1 \end{array} \right)$

Divide row 2 by 3/2.
$\left( \begin{array}{ccccc} 1 & 1 & -1/2 & 0 & 1/2 \\ 0 & 0 & 1 & -2 & 1 \\ 0 & 0 & -3/2 & 0 & -3/2 \\ 0 & 0 & 1 & 1 & 1 \end{array} \right)$

Add half of row 2 to row 1, add three halves of row 2 to row 3, and subtract row 2 from row 4
$\left( \begin{array}{ccccc} 1 & 1 & 0 & -1 & 1 \\ 0 & 0 & 1 & -2 & 1 \\ 0 & 0 & 0 & -3 & 0 \\ 0 & 0 & 0 & 3 & 0 \end{array} \right)$

Divide row 3 by -3
$\left( \begin{array}{ccccc} 1 & 1 & 0 & -1 & 1 \\ 0 & 0 & 1 & -2 & 1 \\ 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 3 & 0 \end{array} \right)$

Add row 3 to row 1, add twice row 3 to row 2 and subtract three times row 3 from row 4.
$\left( \begin{array}{ccccc} 1 & 1 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 & 1 \\ 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 0 \end{array} \right)$

This matrix is in row reduced echelon form. We obtain
$x_1+x_2+x_5=0$

$x_3+x_5=0$

$x_4=0$
We can set
$x_2=s, \; x_5=t$
then
$x_1=-s-t, \; x_2 =s, \: x_3=-t, \; x_4 =0, \; x_5=t$
where
$s, \; t$
are arbitrary.