Diagonalizability of endomorphism $f:M_2(\mathbb{R}) \to M_2(\mathbb{R})$ such that $f(A)=tr(A)I_2-A$. Let $f:M_2(\mathbb{R}) \to M_2(\mathbb{R})$ such that $f(A)=tr(A)I_2-A$. How can I determine what is the explicit expression of $f$, and, most importantly, how do I see if it is diagonalizable? The trace here confuses me a bit.

Let $E_{i,j}$ be the $2\times 2$ matrix with all coefficients $0$ except $e_{i,j}=1$. Then it's easy to check that 
$$f(E_{11})=E_{22}, \quad f(E_{22})=E_{11}, \quad f(E_{12})=-E_{122}\quad f(E_{21})=-E_{21} .$$
Hence we have two eigenvectors, for the eigenvalue $-1$: $E_{12}$ and $E_{21}$.
Moreover $f(I)=I$ so $I$ is another eigenvector, for the eigenvalue $1$. Lastly $f(E_{11}-E_{22})=E_{22}-E_{11}$, so  $J=E_{11}-E_{22}$ is a third eigenvector for the eigenvalue $-1$. All three eigenvectors for the eigenvalue $-1$ are clearly independent, so we have now a basis of eigenvectors for $\mathcal M_2(\mathbf R)$. In the basis $ (I,J,E_{12}, E_{21}) $, the matrix of $f$ is
$$\begin{bmatrix}1&0&0&0\\0&-1&0&0\\ 0&0&-1&0\\0&0&0&-1 \end{bmatrix}.$$
