# Elementary Row Operations

If we think about a matrix as a system of equations, recall that there are certain things that we can do to solve for the variables in that system of equations. For instance, if we have a system of equations given by:

$x+y=2$$x-z=1$$y-z=0$

We could try to solve those equations either by using substition or by adding and subtracting scalar multiples of entire equations to and from each other. Or we could express the entire system as a matrix-vector product and try to solve for the vector in the middle:

$\left[\begin{array}{ccc}1& 1& 0\\ 1& 0& -1\\ 0& 1& -1\end{array}\right]$$\left[\begin{array}{c}x\\ y\\ z\end{array}\right]$$=$$\left[\begin{array}{c}2\\ 1\\ 0\end{array}\right]$

If you visualize the three planes in the system, you will notice that they intersect at a point.

Now, if we recall that any vector multiplied by the three standard basis vectors in matrix form, $\stackrel{^}{i},\stackrel{^}{j},\stackrel{^}{k}$ is just itself, it stands to reason that if add and subtract scalar multiples of each component to recover our basis vectors that we will eventually arrive at a point where we have the identity matrix multiplied by some vector which gives us a point, implying that the point is equal to the resultant vector.

At every point where we apply these operations, observe what happens to the three planes and to the vectors defined by the columns of the matrix.

First, subtract the first row from the second:

$\left[\begin{array}{ccc}1& 1& 0\\ 0& -1& -1\\ 0& 1& -1\end{array}\right]$$\left[\begin{array}{c}x\\ y\\ z\end{array}\right]$$=$$\left[\begin{array}{c}2\\ -1\\ 0\end{array}\right]$

Then, add the second row to the third

$\left[\begin{array}{ccc}1& 1& 0\\ 0& -1& -1\\ 0& 0& -2\end{array}\right]$$\left[\begin{array}{c}x\\ y\\ z\end{array}\right]$$=$$\left[\begin{array}{c}2\\ -1\\ -1\end{array}\right]$

Now, subtract half of the third row from the second

$\left[\begin{array}{ccc}1& 1& 0\\ 0& -1& 0\\ 0& 0& -2\end{array}\right]$$\left[\begin{array}{c}x\\ y\\ z\end{array}\right]$$=$$\left[\begin{array}{c}2\\ -0.5\\ -1\end{array}\right]$

Add the second row to the first

$\left[\begin{array}{ccc}1& 0& 0\\ 0& -1& 0\\ 0& 0& -2\end{array}\right]$$\left[\begin{array}{c}x\\ y\\ z\end{array}\right]$$=$$\left[\begin{array}{c}1.5\\ -0.5\\ -1\end{array}\right]$

Clean everything up by dividing the second row by -1 and the third row by -2

$\left[\begin{array}{ccc}1& 0& 0\\ 0& 1& 0\\ 0& 0& 1\end{array}\right]$$\left[\begin{array}{c}x\\ y\\ z\end{array}\right]$$=$$\left[\begin{array}{c}1.5\\ 0.5\\ 0.5\end{array}\right]$

As you will have noticed, the intersection between the planes is the point of the solution, but now we can simply just express that as the vector $\left[\begin{array}{c}\frac{3}{2}\\ \frac{1}{2}\\ \frac{1}{2}\end{array}\right]$

As we will see, Elementary Row Operations can help us solve all sorts of problems where we need to determine a vector that satisfies a given solution.