# linear equations in a matrix form

Considering

$$x_1 − x_2 + x_3 − x_4 = 2$$ $$x_1 − x_2 + x_3 + x_4 = 0$$ $$4x_1 − 4x_2 + 4x_3 = 4$$ $$−2x_1 + 2x_2 − 2x_3 + x_4 = −3$$

We have the following matrix $$\begin{pmatrix} 1 & -1 & 1 & -1 & 2 \\ 1 & -1 & 1 & 1 & 0 \\ 4 & -4 & 4 & 0 & 4\\ -2 & 2 & -2 & 1 & -3 \\ \end{pmatrix}$$ Skiping some steps...

Row echelon form

$$\begin{pmatrix} 1 & -1 & 1 & -1 & 2 \\ 0 & 0 & 0 & 2 & -2 \\ 0 & 0 & 0 & 0 & 0\\ 0 & 0 & 0 & -1 & 1 \\ \end{pmatrix}$$

Showing the row 2 is a multiple of row 4, and thus our system reduces to

$$\begin{pmatrix} 1 & -1 & 1 & -1 & 2 \\ 0 & 0 & 0 & -1 & 1 \\ \end{pmatrix}$$

where we replace row 1 by (row 1)-(row 2): $$\begin{pmatrix} 1 & -1 & 1 & 0 & 1 \\ 0 & 0 & 0 & -1 & 1 \\ \end{pmatrix}$$

Solution : $$x_4 = −1$$ $$x_1 = 1 + x_2 − x_3.$$

I am puzzled why did they decided to omit out row 2 & 3, instead of reducing it to Lowest Row echelon form. That way, we can solve for $x_2$ and $x_3$

• The solution process shows that there is no restriction on $x_2$ and $x_3$ so you cannot "solve" for them.
– Paul
Oct 29 '14 at 11:42

Applying Gauss-Jordan to reach an upper triangular matrix: $$\left(\begin{array}{ccccc} \boxed{1}&-1&1&-1&2\\0&0&0&\boxed2&-2\\0&0&0&0&0\\0&0&0&0&0 \end{array}\right).$$ I have boxed two positions in the matrix. These are called pivots. Recall that when you want set all the positions under a pivot to $0$, you use that pivot to do that. The number of pivots is called the Rank of a matrix which tells you how many fixed variables there are in your equation system.
Before continuing I want to say that we are looking for values that satisfy: $$x_1\left(\begin{array}{c}1\\0\\0\\0\end{array}\right)+x_2\left(\begin{array}{c}-1\\0\\0\\0\end{array}\right)+x_3\left(\begin{array}{c}1\\0\\0\\0\end{array}\right)+x_4\left(\begin{array}{c}-1\\2\\0\\0\end{array}\right) = \left(\begin{array}{c}2\\-2\\0\\0\end{array}\right).$$ It is obvious that we need to take $x_4$ to be $-1$. Now we have that $x_1-x_2+x_3 = 1$. It is standard to express the solution in terms of the free variables. You identify the free variables by the columns that do not have a pivot. So we will always choose to say that $x_1=1+x_2-x_3$ which says that $x_1$ and $x_4$ (that correspond to the pivot columns) are a linear combination of the other variables. In this case it is easy to solve for $x_2$ as well as for $x_3$. But that is not always the case.
If you were to have a matrix: $$\left(\begin{array}{ccccc} \boxed{1}&-1&1&-1&2\\0&\boxed1&-1&2&-2\\0&0&\boxed1&2&3\\0&0&0&0&0 \end{array}\right),$$ then it would be more obvious to solve for $x_1$, $x_2$ and $x_3$ letting $x_4$ free. If you want to solve for $x_4$ you are using the wrong matrix.