<s>[INST] Finding the matrix associated with a linear map 
Find the matrix associated with the linear map $f:R^2 \rightarrow R^2$ defined by $f(x,y)=(3x-y,y-x)$ with respect to the ordered basis ${(1,0),(1,1)}$

Let the matrix be $A$ and let $f(x)=AX$ where 
$$X=\begin{bmatrix} 
x \\
y 
\end{bmatrix}$$
and 
$$A=\begin{bmatrix} 
a & b \\
c & d 
\end{bmatrix}$$
I tried solving for $a,b,c,d$ by using the basis vectors as $(x,y)$. That is, I took $(x,y)=(1,0)$ and $(x,y)=(1,1)$ to find $a,b,c,d$. But I am not getting the given answer.
 [/INST] You can set up the matrix with respect to the standard basis and then convert it to the matrix with respect to the given basis by multiplying with the appropriote change of bases matrices.
Altneratively, you can get the matrix of the linear map with respect to the given basis directly. In general: the $i$-th column of that matrix contains the (red) coordinates of the image of the $i$-th basis vector with respect to the (blue) basis in question; that means:
$$f \begin{pmatrix} 1 \\ 0 \end{pmatrix} = \begin{pmatrix} 3 \\ -1 \end{pmatrix}=\color{red}{4}\color{blue}{\begin{pmatrix} 1 \\ 0 \end{pmatrix}}\color{red}{-1}\color{blue}{\begin{pmatrix} 1 \\ 1 \end{pmatrix}} \implies C_1 =\color{red}{ \begin{pmatrix} 4 \\ -1 \end{pmatrix}}$$
and
$$f \begin{pmatrix} 1 \\ 1 \end{pmatrix} = \begin{pmatrix} 2 \\ 0 \end{pmatrix}=\color{red}{2}\color{blue}{\begin{pmatrix} 1 \\ 0 \end{pmatrix}}+\color{red}{0}\color{blue}{\begin{pmatrix} 1 \\ 1 \end{pmatrix}} \implies C_2 =\color{red}{ \begin{pmatrix} 2 \\ 0 \end{pmatrix}}$$
So the matrix $C$ of the linear map with respect to the given basis is:
$$C = \left( C_1 \vert C_2\right) = \begin{pmatrix} 4 & 2 \\ -1 & 0\end{pmatrix}$$
</s>