# Solution of an augmented matrix with specific free variables

I was wondering how to calculate the solution of the following augmented matrix, given that $x_1$ and $x_2$ need to be free variables.

$\begin{bmatrix}1 & 2 & 3 & 1 & 3\\ 1 & 1 & 1 & 1 & 5 \end{bmatrix}$

Thus the answer has to be in the form: $\begin{cases} x_3 &= \ldots + \dots x_1 + \ldots x_2 \\ x_4 &= \ldots + \dots x_1 + \ldots x_2 \\ x_1, x_2 & free\end{cases}$

The given answer is $\begin{cases} x_3 &= -1 - \frac{1}{2} x_2 \\ x_4 &= 6 - x_1 - \frac{1}{2} x_2 \\ x_1, x_2 & free\end{cases}$

## 2 Answers

An echelon form of this matrix is $$\begin{bmatrix}1 & 1 & 1 & 1 & 5 \\ 0 & 1 & 2 & 0 & -2 \end{bmatrix}$$ suggesting that two variables should be free (because only two leading entries out of four columns), but you are at liberty to use the equations to express $x_{3}$ and $x_{4}$ in terms of $x_{1}$ and $x_{2}$ if you wish.

We have from row 2: $$x_{2} + 2x_{3} = - 2 \, \Rightarrow \, x_{3} = -1 - \frac{1}{2}x_{2}$$ and from row 1: \begin{align*} x_{1} + x_{2} + x_{3} + x_{4} & = 5 \\ x_{1} + x_{2} - 1 - \frac{1}{2} x_{2} + x_{4} & = 5 \\ x_{1} + \frac{1}{2} x_{2} + x_{4} & = 6 \\ x_{4} & = 6 - x_{1} - \frac{1}{2}x_{2} \end{align*} Looking at the bigger picture, it doesn't matter which variables we choose to be free. The solutions generated will all be the same anyway.

Do you mean that you intend to solve the underdetermined system:

$$\begin{cases}1x_1 + 2x_2 +3x_3 + 1x_4 &=& 3\\ 1x_1 + 1x_2 +1x_3 + 1x_4 &=& 5 \end{cases} \ \ (1) ?$$

for which you have the (exact) solution (I have checked) $$\begin{cases} x_3 &= -1 - \frac{1}{2} x_2 \\ x_4 &= 6 - x_1 - \frac{1}{2} x_2 \end{cases} \ \ \ (2)$$

and you desire an explanation ?

The principal idea is to select $x_3$ and $x_4$ as the "main" unknowns. You keep them on the LHS, and transfer the rest (with $x_1$ and $x_2$ considered as parameters) in the RHS. You have now the system with 2 unknows :

$$\begin{cases}3x_3 + x_4 &=& A \\ x_3 + x_4 &=&B \end{cases} \ \ (3) \ \ \text{with} \ \ A=3 - x_1 - 2x_2 \ \ and \ \ B=5 -x_1 -x_2$$

Now you solve system (3) with Cramer formulas, to get formulas (2).