<s>[INST] Writing u as a linear combination of the vectors in S. Write vector 
u = $$\left[\begin{array}{ccc|c}2 \\10 \\1\end{array}\right]$$
as a linear combination of the vectors in S. Use elementary row operations on an augmented matrix to find the necessary coefficients. 
S = {
$v1$$\left[\begin{matrix}1\\2\\2\end{matrix}\right] , v2\left[\begin{matrix}4\\2\\1\end{matrix}\right],  
v2\left[\begin{matrix}5\\4\\1\end{matrix}\right]
$ }. If it is not possible, explain why?

This is what i have so far: 
S = {
$v1$$\left[\begin{matrix}1\\2\\2\end{matrix}\right] , v2\left[\begin{matrix}4\\2\\1\end{matrix}\right],  
v3\left[\begin{matrix}5\\4\\1\end{matrix}\right].
v4\left[\begin{matrix}2\\10\\1\end{matrix}\right]
$ } 

$c1$$\left[\begin{matrix}1\\2\\2\end{matrix}\right] , c2\left[\begin{matrix}4\\2\\1\end{matrix}\right],  
c3\left[\begin{matrix}5\\4\\1\end{matrix}\right].
c4\left[\begin{matrix}2\\10\\1\end{matrix}\right]
=\left[\begin{matrix}0\\0\\0\end{matrix}\right]$
$c1$$\left[\begin{matrix}1\\2\\2\end{matrix}\right] , c2\left[\begin{matrix}4\\2\\1\end{matrix}\right],  
c3\left[\begin{matrix}5\\4\\1\end{matrix}\right].
c4\left[\begin{matrix}2\\10\\1\end{matrix}\right]$
$
\begin{bmatrix}
1 & 4 & 5 & 2\\
2 & 2 & 4 & 10\\
2 & 1 & 1 & 1\\
\end{bmatrix}
$
Now i don't know how to do this. Help will greatly be appreciated.
Thanks
 [/INST] You're heading in the right direction, you've found the augmented matrix:
$$
\left[\begin{array}{ccc|c}
1 & 4 & 5 & 2\\
2 & 2 & 4 & 10\\
2 & 1 & 1 & 1\\
\end{array}\right].
$$
The solutions $(x,y,z)$ to this system of linear equations are precisely the values for which $$x\begin{bmatrix}1 \\ 2 \\ 2 \end{bmatrix}+y\begin{bmatrix}4 \\ 2 \\ 1 \end{bmatrix}+z\begin{bmatrix}5 \\ 4 \\ 1 \end{bmatrix}=\begin{bmatrix}2 \\ 10\\ 1 \end{bmatrix}.$$
So, we solve the above system of linear equations using elementary row operations on the augmented matrix, to reduce it to row echelon form.  Then, if the system of equations turns out to be consistent (i.e., if there is a solution), we use back substitution to find all the solutions $(x,y,z)$.
</s>