<s>[INST] Let $f: \mathbb{R^3} \to \mathbb{R^3}$ with characteristic polynomial $-\lambda(\lambda-3)^2$ and $f(1,0,0)=(1,0,-1)$ and $f(0,1,0)=(2,3,1)$ Let $f: \mathbb{R^3} \to \mathbb{R^3}$ be a diagonalizable endomorphism with characteristic polynomial $-\lambda(\lambda-3)^2$ such that 
$f(1,0,0)=(1,0,-1)$ and $f(0,1,0)=(2,3,1)$. Given these data, how can I find the explicit expession on $f(x,y,z)$ and a basis of $\mathbb{R^3}$ of eigenvectors of $f$?
 [/INST] You know that the matrix of the endomorphism is
$$
A=\begin{bmatrix}
1 & 2 & a \\
0 & 3 & b \\
-1 & 1 & c
\end{bmatrix}
$$
for some $a,b,c$. Elimination gives
$$
\begin{bmatrix}
1 & 2 & a \\
0 & 3 & b \\
0 & 3 & c+a
\end{bmatrix}
$$
and, since we know that the rank must be $2$, we can conclude that $b=c+a$. We also know that $3$ is an eigenvalue of $f$ with multiplicity $2$, so the rank of $A-3I$ must be $1$ (because $A$ is supposed to be diagonalizable):
$$
A-3I=
\begin{bmatrix}
-2 & 2 & a \\
0 & 0 & a+c \\
-1 & 1 & c-3
\end{bmatrix}
$$
Let's do elimination again:
$$
\begin{bmatrix}
-2 & 2 & a \\
0 & 0 & a+c \\
-1 & 1 & c-3
\end{bmatrix}
\to
\begin{bmatrix}
1 & -1 & -a/2 \\
0 & 0 & a+c \\
-1 & 1 & c-3
\end{bmatrix}
\to
\begin{bmatrix}
1 & -1 & -a/2 \\
0 & 0 & a+c \\
0 & 0 & c-3-a/2
\end{bmatrix}
$$
Can you say what the conclusion is?
</s>