Finding the matrix of a linear transformation given the images of two vectors under it. 
Consider the linear transformation $F:\mathbb{R}^2 \rightarrow \mathbb{R}^3$ that satisfies $F((1,2))=(-1,0,1)$ and $F((1,3))=(0,1,3)$. Find the matrix of $F$ in the standard bases for $\mathbb{R}^2$ and $\mathbb{R}^3$.

My idea is to let $\underline{f}$ be a basis given by $\underline{f}_1=(1,2)$ and $\underline{f}_2=(1,3)$, which would allow me to set the columns of the matrix of $F$ to $F(\underline{f}_1)$ and $F(\underline{f}_2)$. My assumption is that this would produce a matrix relative to $\underline{f}$, so I would somehow need to express it relative to the standard basis. I'm confused about how to do this though, and I don't even know if this assumption I made is correct.
Any help would be appreciated!
 A: The matrix
$$
A = \begin{bmatrix} 
-1 & 0 \\
0 & 1 \\ 
1 & 3
\end{bmatrix}
$$
represents the linear transformation $F: \mathbb{R}^2 \to \mathbb{R}^3$ with respect to the basis
$$
\bigl\{ \underline{f}_1, \underline{f}_2 \bigr\}
= \left\{ 
\begin{bmatrix} 
1 \\ 2
\end{bmatrix},\, 
\begin{bmatrix} 
1 \\ 3
\end{bmatrix}
\right\}
$$
for $\mathbb{R}^2$ and the standard basis
$$
\bigl\{ \underline{e}_1, \underline{e}_2, \underline{e}_3 \bigr\}
= \left\{ 
\begin{bmatrix} 
1 \\ 0 \\ 0
\end{bmatrix},\, 
\begin{bmatrix} 
0 \\ 1 \\ 0
\end{bmatrix},\, 
\begin{bmatrix} 
0 \\ 0 \\ 1
\end{bmatrix}
\right\}
$$
for $\mathbb{R}^3$. It's clear that the columns of $A$ are the images $F(\underline{f}_1)$ and $F(\underline{f}_2)$, but why? Each column expresses the image under the transformation of each basis of the domain as a linear combination of the basis in the codomain, i.e. the components $A_{ij}$ satisfy
$$
F(\underline{f}_1) 
= A_{11} \underline{e}_1 + A_{21} \underline{e}_2 + A_{31} \underline{e}_3 
\quad\text{and}\quad 
F(\underline{f}_2) 
= A_{12} \underline{e}_1 + A_{22} \underline{e}_2 + A_{32} \underline{e}_3 
$$
or for each $j$,
$$
F(\underline{f}_j) 
= \sum_{i=1}^3 A_{ij} \, \underline{e}_i. 
$$
But if you want to represent the transformation with respect to the standard basis
$$
\bigl\{ \underline{\epsilon}_1, \underline{\epsilon}_2 \bigr\}
= \left\{ 
\begin{bmatrix} 
1 \\ 0
\end{bmatrix},\, 
\begin{bmatrix} 
0 \\ 1
\end{bmatrix}
\right\}
$$
for $\mathbb{R}^2$, then we have to covert from the $\underline{\epsilon}$-basis to the $\underline{f}$-basis first then apply the transformation to get images in the $\underline{e}$-basis on the other end.
The matrix
$$
Q = \begin{bmatrix} 
1 & 1 \\
2 & 3 
\end{bmatrix}
$$
with the $\underline{f}$-basis as the columns seems relevant, but it's the inverse of what we want. In fact, $Q$ expresses coordinates of a vector in the $\underline{f}$-basis in terms of the standard $\underline{\epsilon}$-basis.
Convince yourself of this! For example, it's clear that the vector $\underline{f}_1 = 1 \, \underline{\epsilon}_1 + 2 \, \underline{\epsilon}_2$, which is what the coordinates
$$
\begin{bmatrix} 
1 \\ 2
\end{bmatrix} 
$$
denote. However, with respect to the $\underline{f}$-basis, it's even simpler: $\underline{f}_1 = 1 \, \underline{f}_1 + 0 \, \underline{f}_2$, i.e. the coordinates are
$$
\begin{bmatrix} 
1 \\ 0
\end{bmatrix}.
$$
Sure enough,
$$
Q \begin{bmatrix} 
1 \\ 0 
\end{bmatrix}
= \begin{bmatrix} 
1 & 1 \\
2 & 3 
\end{bmatrix} 
\begin{bmatrix} 
1 \\ 0 
\end{bmatrix}
= \begin{bmatrix} 
1 \\ 2 
\end{bmatrix}
$$
Back to the task at hand, we need to convert coordinates in the other direction, so we need the inverse matrix
$$
Q^{-1} = \begin{bmatrix} 
3 & -1 \\
-2 & 1 
\end{bmatrix}. 
$$
So we have the chain
$$
\overline{\epsilon}\text{-basis} 
\;\xrightarrow{Q^{-1}}\; 
\overline{f}\text{-basis}
\; \xrightarrow{A}\; 
\overline{e}\text{-basis}, 
$$
and the matrix representing $F$ in the standard bases is
$$
A Q^{-1} 
= \begin{bmatrix} 
-1 & 0 \\
0 & 1 \\ 
1 & 3
\end{bmatrix}
\begin{bmatrix} 
3 & -1 \\
-2 & 1 
\end{bmatrix}
= \begin{bmatrix} 
-3 & 1 \\
-2 & 1 \\
-3 & 2
\end{bmatrix}. 
$$
