<s>[INST] Linear combination issue I have 4 vectors:
$u_1 = \begin{pmatrix}
         1  \\
         1  \\
         1  \\
         \end{pmatrix} $, $\; u_2 = \begin{pmatrix}
         1  \\
         1  \\
         0  \\
         \end{pmatrix} $, $\; u_3 = \begin{pmatrix}
         1  \\
         1  \\
         0  \\
         \end{pmatrix} $, $\; u_4 = \begin{pmatrix}
         0  \\
         1  \\
         0  \\
         \end{pmatrix} $
and I wanna express the following vector in terms of them:
$\; v = \begin{pmatrix}
         2  \\
         3  \\
         4  \\
         \end{pmatrix} $
I'm working this way: 
First put vectors in a matrix and then put in rref:
$ \left[
    \begin{array}{cccc|c}
      1&1&1&0&2\\
      1&1&1&1&3\\
      1&0&0&0&4
    \end{array}
\right] $   => $ \left[
    \begin{array}{cccc|c}
      1&1&1&0&2\\
      0&0&0&1&1\\
      0&-1&-1&0&2
    \end{array}
\right] $ => $ \left[
    \begin{array}{cccc|c}
      1&1&1&0&2\\
      0&-1&-1&0&2\\
      0&0&0&1&1
    \end{array}
\right] $ =>
$ \left[
    \begin{array}{cccc|c}
      1&1&1&0&2\\
      0&1&1&0&-2\\
      0&0&0&1&1
    \end{array}
\right] $ => $ \left[
    \begin{array}{cccc|c}
      1&1&1&0&2\\
      0&1&1&0&-2\\
      0&0&0&1&1
    \end{array}
\right] $ => $ \left[
    \begin{array}{cccc|c}
      1&0&0&0&4\\
      0&1&1&0&-2\\
      0&0&0&1&1
    \end{array}
\right] $
but this result (4 -2 1) is meaningless to me (because $4u_1 -2u_2 + u_3 \ne v$)... does it make any sense? Can it represent some sort of coeficients of the linear combination?
If I swap $u_3$ for $u_4$ in the matrix, the (4 -2 1) is the same but it DOES make sense, because $4u_1 -2u_2 + u_4 = v$
How can I write v as combination of u's ? If I did the right way, how does this make sense?
 [/INST] Note that $(4,-2,1)$ by itself cannot be the right answer since you need four coefficients to give a linear combination of your four vectors.
Since your reduced matrix has a non-leading (non-pivot) column, the system will have infinitely many solutions.  You could take the third coefficient to be zero, giving the solution $(4,-2,0,1)$ which is correct since
$$4u_1-2u_2+0u_3+u_4=v\ .$$
Or you could take the second to be zero giving $(4,0,-2,1)$, which is also correct since
$$4u_1+0u_2-2u_3+u_4=v\ .$$
The general solution of your system is
$$(4,-2-\alpha,\alpha,1)$$
where $\alpha$ is a scalar, and this is also correct for any $\alpha$ since
$$4u_1+(-2-\alpha)u_2+\alpha u_3+u_4=v\ .$$
Hope this helps!
</s>