Finding a linear transformation given the span of the image Find an explicit linear transformation $T: \mathbb{R}^3 → \mathbb{R}^3$ such that the
image of $T$ is spanned by the vectors $(1, 2, 4)$ and $(3, 6, −1)$.

My Attempt:
Since $(1, 2, 4)$ and $(3, 6, −1)$ span $img(T)$, for any $y \in img(T)$, $y$ can be written as a linear combination of $(1, 2, 4)$ and $(3, 6, −1)$.
i.e. I know $T(x) = y = (1,2,4)^T\alpha + (3,6,-1)^T\beta$, So the $T$ should look something like this?
\begin{bmatrix}
    1 & 2 & 4 \\
    3 & 6 & -1 \\
    x_{31} & x_{32} & x_{33} &
\end{bmatrix}
I'm not sure if this is right and/or how to continue from this.
 A: $(1,2,4)^T$ and $(3,6,1)^T$ need to be in the column space of the matrix.
And since only the two vectors span the space, the 3rd column is not linearly independent.  Anything that is a linear combination of the other 2, will do.  But you can make life easy on yourself if you make the third column $(0,0,0)^T$
$\begin{bmatrix}1&3&0\\2&6&0\\4&-1&0\end{bmatrix}\begin{bmatrix}\alpha\\\beta\\z\end{bmatrix} = \alpha \begin{bmatrix}1\\2\\4\end{bmatrix} + \beta\begin{bmatrix}3\\6\\-1\end{bmatrix} $
A: Let's consider a matrix $A$ with columns $A_{1},\ldots,A_{n}.$ Then if we look at the definition of matrix-vector multiplication, we see that $(Ax)_{i}=\sum_{j=1}^{n}A_{i,j}x_{j}=\sum_{j=1}^{n}(A_{j})_{i}x_{j}.$ In other words, $$Ax=\sum_{j=1}^{n}x_{j}A_{j}.$$ Then if the image of $T$ is spanned by $[1,2,4]^{T}$ and $[3,6,-1]^{T},$ any matrix of the form 
$$T=\begin{bmatrix} 1&3&x+3y\\ 2&6&2x+6y\\ 4&-1&4x-y\end{bmatrix},$$ for some real numbers $x$ and $y,$ has the desired properties. One might scale the columns of $T$ or permute them, or indeed right-multiply $T$ by any invertible matrix, and the span will remain the same (since this just changes the basis of the domain of $T$).
