Let $E=M_n(\mathbb{R}), A,B \in E -\{0\}$. We define $f \in \mathcal{L}(E)$ by: $$\forall M \in E, f(M)=M+tr(AM)B$$
- Find a necessary and sufficient condition so that $f$ is diagonalizable.
- What is $\dim C$, where $C=\{g \in \mathcal{L}(E) | f \circ g = g \circ f \}$?
My attempt:
I wanted to cancel $f$ with a second degree polynomial. Therefore, I calculated: $$f^2(M)=f(M)+tr(AM)f(B)=f(M)+tr(AM)B+tr(AB)tr(AM)B$$ $$\Rightarrow f^2(M)-2f(M)=tr(AB)tr(AM)B-M$$ $$\Rightarrow f^2(M)-2f(M)-tr(AB)f(M)=-tr(AB)M-M$$ $$\Rightarrow f^2(M)-2f(M)-tr(AB)f(M)+tr(AB)M+M=0$$ Therefore, $P(X)=X^2-(2+tr(AB))X+(1+tr(AB))$ satisfies $P(f)=0$. Let's calculate the discriminant of this polynomial. $$\Delta = 4+4tr(AB)+tr(AB)^2-4-4tr(AB)=tr(AB)^2$$ This polynomial has at least one real root, and $f$ is diagonalizable iff $\Delta \neq 0$. So: $$f \text{ diagonalizable} \Leftrightarrow tr(AB) \neq 0$$
This is where things get harder for me. I assume $f$ is diagonalizable. The roots of the polynomial, which are the eigenvalues of $f$, are: $$\lambda_1=1 \text{ and } \lambda_2=1+tr(AB)$$ Now, let's find the dimension of the eigenspaces. $$M \in E_{\lambda_1} \Leftrightarrow f(M)=M \Leftrightarrow tr(AM)=0$$ $$M \in E_{\lambda_2} \Leftrightarrow f(M)=M+tr(AB)M \Leftrightarrow M=xB, x \in \mathbb{R}$$ We get $\dim E_{\lambda_1}=n^2-1$ (it's an hyperplane) and $\dim E_{\lambda_2}=1$. Now, if we have $g \in C$, we know that we can find a basis of diagonalization for both $f$ and $g$. I'm not sure how to formalize my idea, but $g$ diagonalizes with $2$ diagonal blocks corresponding to the eigenspaces $E_{\lambda_1}$ and $E_{\lambda_2}$. If we note $g_1$ and $g_2$ the endomorphisms induced on these subspaces, the dimension of the subspace of possible endomorphisms for $g_1$ and $g_2$ are respectively $(n^2-1)^2$ and $1$. So, $\dim C$ should be $(n^2-1)^2+1$, right?
Could anyone help me making things clearer on the diagonalizable case, and does anyone has an idea on how to proceed if $f$ is non-diagonalizable (i.e. $tr(AB)=0$)? Thanks in advance!