How do I write a vector as a linear combination of other vectors. Write $\begin{pmatrix} 5  \\ 3 \\15 \end{pmatrix}$ as a linerar combination of the following vectors:  $u=\begin{pmatrix} 1  \\ 2 \\5 \end{pmatrix}$, $v=\begin{pmatrix} 3  \\ -4 \\-1 \end{pmatrix}$, $w=\begin{pmatrix} -1  \\ 1 \\1 \end{pmatrix}$.
My attempt:
$$\begin{bmatrix}
1 & 3& -1 & 5\\
2 & -4 & 1& 3\\
5&-1&1&15\\
 \end{bmatrix}\sim\to\begin{bmatrix}
1 & 0& 0 & 3\\
0 & 1 & 0 & 1\\
0&0&1&1\\
\end{bmatrix}$$
Obviously I skipped a lot of reduction steps, because it's a pain to type matrices here, but I was wondering if I even did the right thing.

You can set this problem up as linear system of 3 equations
$$ \begin{pmatrix} 5 \\ 3 \\ 15 \end{pmatrix}
 = \begin{bmatrix} 1 & 3 &-1 \\ 2 & -4 & 1 \\ 5 & -1 & 1 \end{bmatrix}
\begin{pmatrix} \alpha \\ \beta \\ \gamma \end{pmatrix} $$
You do this by arranging the basis vectors as columns to the coefficient matrix.
