<s>[INST] Linear application Let $f:\mathbb{R}^3\to\mathbb{R}^3$ be a linear application and let $\{e_1,e_2,e_3\}$ the canonical basis of $\mathbb{R}^3$.
We know that $\operatorname{Im} f=\langle(1,1,3), (0,1,1)\rangle$ and that 
$$2f(e_2)-f(e_3)=e_1-e_2+e_3$$
Which is the matrix associated to $f$ with respect the canonical basis?
In order to have the matrix I should know $f(e_1), f(e_2), f(e_3)$ but I don't know how to do it.
 [/INST] Assume that
$$fe_1=\begin{pmatrix}1\\1\\3\end{pmatrix}\;\;,\;\;\;fe_2=\begin{pmatrix}0\\1\\1\end{pmatrix}\;\;,\;\;fe_3=\begin{pmatrix}u_1\\u_2\\u_3\end{pmatrix}$$
Observe that we have already
$$\text{Im}\,f\subset\left\langle\;\begin{pmatrix}1\\1\\3\end{pmatrix}\;,\;\;\begin{pmatrix}0\\1\\1\end{pmatrix}\;\right\rangle$$
Now, we're given
$$e_1-e_2+e_3=\begin{pmatrix}1\\\!-1\\1\end{pmatrix}=2fe_2-fe_3=\begin{pmatrix}\!-u_1\\2-u_2\\2-u_3\end{pmatrix}\;\implies\;fe_3=\begin{pmatrix}\!-1\\3\\1\end{pmatrix}$$
and observe that
$$fe_3\in\left\langle\;\begin{pmatrix}1\\1\\3\end{pmatrix}\;,\;\;\begin{pmatrix}0\\1\\1\end{pmatrix}\;\right\rangle\implies\text{Im}\,f=\left\langle\;\begin{pmatrix}1\\1\\3\end{pmatrix}\;,\;\;\begin{pmatrix}0\\1\\1\end{pmatrix}\;\right\rangle\implies$$
$$[f]_e=\begin{pmatrix}1&0&\!-1\\1&1&3\\3&1&1\end{pmatrix}$$
</s>