# If we have the transformation of 2 vectors, how can we define the transformation?

I know how to find the transformation matrix if I have the definition of the transformation with respect to the basis vectors.

Now, I am given 2 vectors and its transformations, and I need to define the transformation, or I guess to find the transformation matrix.

How can we do it?

For example, suppose the vector $\left[ \begin{matrix} 1 \\ 3 \end{matrix} \right]$ is transformed into $\left[ \begin{matrix} 3 \\ 1 \end{matrix} \right]$ and the vector $\left[ \begin{matrix} -1 \\ 3 \end{matrix} \right]$ into $\left[ \begin{matrix} 3 \\ 2 \end{matrix} \right]$

So, what's the general approach and the idea behind to find the transformation (matrix) representing these 2 transformations?

The thing you have to do here is to calculate the standard basis as a linear combination of the given vectors. In this case, you have $\begin{pmatrix} 0\\ 1\end{pmatrix} = \frac{1}{6} \left(\begin{pmatrix} 1\\ 3\end{pmatrix}+\begin{pmatrix} -1\\ 3\end{pmatrix}\right)$ and $\begin{pmatrix} 1\\ 0\end{pmatrix} = \frac{1}{2} \left(\begin{pmatrix} 1\\ 3\end{pmatrix}-\begin{pmatrix} -1\\ 3\end{pmatrix}\right)$. Using this and the linearity of your transformation, you can calculate it on these basis, and then you can set up your matrix. In this case, you should have $M=\begin{pmatrix} 0 & 1\\ -1/2& 1/2\end{pmatrix}$
Try and describe the action of the matrix on the standard basis in $\mathbf{R}^2$. The columns of the matrix of the transformation will be exactly those vectors.