# Finding the solution to $Ax = b$

I was given that $(1, -1, 1, 1, 1)^T$ is a solution to $Ax = b$, where $A = \begin{pmatrix} 2 & 2 & -1 & 0 & 1 \\ -1 & -1 & 2 & -3 & 1 \\ 0 & 0 & 1 & 1 & 1 \\ 1 & 1 & -2 & 0 & -1 \\ \end{pmatrix}$ and $b = \begin{pmatrix} 0 \\ 0 \\ 3 \\ -3 \\ \end{pmatrix}$.

I thought the given solution can be found by using the reduced row-echelon form and worked out as follows: $$rref = \begin{pmatrix} 1 & 1 & 0 & 0 & 1 & 1 \\ 0 & 0 & 0 & 1 & 0 & 1 \\ 0 & 0 & 1 & 0 & 1 & 2 \\ 0 & 0 & 0 & 0 & 0 & 0 \\ \end{pmatrix}$$

However, i can't seem to deduce the solution of $(1, -1, 1, 1, 1)^T$ from above. Why?

• How did you get a $5 \times 5$ row-reduced matrix from a $4 \times 5$ matrix? Nov 26, 2017 at 16:50
• What is the question here? You have 4 equations with 5 unknowns, so the solution, if it exists (and it does, as given) is not unique. Maybe the given solution is hidden in the formulas you get as a result of solving the equations?
– user491874
Nov 26, 2017 at 17:18
• First, your “rref” isn’t actually in row-reduced echelon form and second, it has more rows than $A$, so can’t be a reduced form of $A$, even after augmenting it with $b$.
– amd
Nov 26, 2017 at 23:45

We are looking for the solutions for $Ax = b$, so we can look at the augmented matrix [A | b] $$[A | b] = \begin{bmatrix} 2 & 2 & -1 & 0 & 1 & 0\\ -1 & -1 & 2 & -3 & 1& 0 \\ 0 & 0 & 1 & 1 & 1 & 3\\ 1 & 1 & -2 & 0 & -1& -3 \\ \end{bmatrix}$$
which , after row reducing yields $$rref \ [A | b] = \begin{bmatrix} 1 & 1 & 0 & 0 & 1 & 1\\ 0 & 0 & 1 & 0 & 1& 2 \\ 0 & 0 & 0 & 1 & 0 & 1\\ 0 & 0 & 0 & 0 & 0& 0 \\ \end{bmatrix}$$ So now we see that the solution set is given by $$x=\begin{cases} x_1 = 1 - x_2 -x_5 \\ x_3 = 2 - x_5 \\ x_4 = 1 \\ x_2, x_5 \ \ \text{free variables} \end{cases}$$
Now notice that, because you know that $x_2, x_5$ are free variables, by setting $x_2 = -1$ and $x_5 = 1$ we would get $x_1= x_3 = x_4 = 1$ , hence a possible solution would be $x= \begin{bmatrix} 1 & -1 & 1 &1 & 1\end{bmatrix}^T$
$$x = \begin{bmatrix} 1-x_2-x_5\\ x_2 \\ 2-x_5 \\ 1 \\ x_5 \\ \end{bmatrix} = \begin{bmatrix} 1\\ 0 \\ 2 \\ 1 \\ 0 \\ \end{bmatrix} + x_2 \begin{bmatrix} -1\\ 1 \\ 0 \\ 0 \\ 0 \\ \end{bmatrix} + x_5 \begin{bmatrix} -1\\ 0 \\ -1 \\ 0 \\ 1 \\ \end{bmatrix}$$ and then in you could simply plug in values for $x_2$ and $x_5$.