# Linear transformation with respect to bases

Suppose $L: \mathbb{R}^2 \longrightarrow \mathbb{R}^3$

$L[a,b] = [(3a-b),(a+b),(-a)]$ Find the matrix of $L$ with respect to standard bases in $\mathbb{R}^2$ and $\mathbb{R}^3$

Heres what I did For $\mathbb{R}^2$ I put $(1,0)$ and $(0,1)$ into the first two equations of $L[a,b]$ and got $L(v_1) = (3,1) = 3(1,0) + (0,1)$ $L(v_2) = (-1,1) = -(1,0) + (0,1)$

For $\mathbb{R}^3$ I put $(1,0,0)$, $(0,1,0)$ and $(0,0,1)$ into the equations and got $L(u_1) = (3,1,-1)$ $L(u_2) = (-1,1,0)$ $L(u_3) = (0,0,0)$

Am I putting the numbers into the equations correctly?

In this case, since $L$ takes a vector from $\mathbb{R}^2$ and maps it to $\mathbb{R}^3$, you want to express in general what happens to the vector. What's a good way to generalize this? By selecting a basis that spans the domain (that is $\mathbb{R}^2$), and the standard basis is the easiest.
$L(e_1) = (3, 1, -1) = 3\begin{bmatrix}1\\0\\0\end{bmatrix} + 1\begin{bmatrix}0\\1\\0\end{bmatrix} - 1\begin{bmatrix}0\\0\\1\end{bmatrix}$
$L(e_2)$ is therefore...?
So the matrix with respect to the bases are: $$\begin{pmatrix}3&?\\1&?\\-1&?\end{pmatrix}$$