# Whats wrong with my matrix calculations?

I am trying to solve this matrix for $(x_1, x_2, x_3)$

$$\pmatrix{ -1 & -2& -3 \\ 3 & 2 & 1 \\ 1& 1 & 1 \\ 2 & 4& 1 }* \pmatrix{ x_1\\ x_2 \\ x_3 \\ }= \pmatrix{ -6\\ 6 \\ 3 \\ 7 \\ }$$

Here are my calculations:

$$\left( \begin{array}{ccc|c} -1 & -2& -3 & -6 \\ 3 & 2& 1 & 6 \\ 1 & 1& 1 & 3 \\ 2 & 4& 1 & 7 \\ \end{array} \right)$$

row4 = row1*2 + row4 && row2 = row3*3 -row2

$$\left( \begin{array}{ccc|c} -1 & -2& -3 & -6 \\ 0 & -1& 2 & -3 \\ 1 & 1& 1 & 3 \\ 0 & 0& -5 & -5 \\ \end{array} \right)$$

row4 = row4/-5 && row1 = row3 + row1

$$\left( \begin{array}{ccc|c} 0 & -1& -2 & -3 \\ 0 & -1& 2 & -3 \\ 1 & 1& 1 & 3 \\ 0 & 0& 1 & 1 \\ \end{array} \right)$$

row1 = row4*4 + row1

$$\left( \begin{array}{ccc|c} 1 & 1& -1 & 3 \\ 0 & -1& 2 & -3 \\ 0 & 0& 1 & 1 \\ 0 & 0& 0 & 1 \\ \end{array} \right)$$

I get as a solution an unsolvable matrix; however, the matrix should be solvable. What was wrong with my calulations? I cannot see the problem.

You have $4$ equation for $3$ variables. At most the rank of the matrix is $3$ - which is your case. – Ilya Jan 17 '13 at 12:25
Thx for your answer!!! Yes the rank is 3, however, I should solve the matrix for $x_1, x_2, x_3$ and in the last form, the matrix is not solvable, whereas the matrix has to be solvable... – Le Chifre Jan 17 '13 at 12:30
Ok, to begin with. 1st step: row2 = row3*3-row2 has to have $3$, not $-3$ – Ilya Jan 17 '13 at 12:33
@maximus: it's $(1,1,1)$ – Ilya Jan 17 '13 at 12:54
In the third matrix row2=row3*3-row2, $-1$ must be $1$ and $-3$ must be $3$. Thus the second row is $[0,~ 1,~ 2| ~3]$