On commuting matrices Consider the complex matrix $$A=\begin{pmatrix}i+1&2\\2&1\end{pmatrix}$$ and the linear map $$f:M(2,\mathbb{C})\to M(2,\mathbb{C}),\qquad X\mapsto XA-AX.$$
I want to find a basis of $\ker f$.
I already know the canonical basis $\{E_{11},E_{12},E_{21},E_{22}\}$ and computed $$f(E_{11})=\begin{pmatrix}0&2\\-2&0\end{pmatrix},f(E_{12})=\begin{pmatrix}2&0\\0&-2\end{pmatrix},f(E_{21})=\begin{pmatrix}-2&0\\0&2\end{pmatrix},f(E_{22})=\begin{pmatrix}0&-2\\2&0\end{pmatrix}$$
Does this help to find the basis?
 A: It does. It means that for an arbitrary matrix $$X=\begin{pmatrix}a&b\\c&d\end{pmatrix},$$ we have $$f(X)=af(E_{11})+bf(E_{12})+cf(E_{21})+df(E_{22}),$$ or $$f(X)=(a-d)f(E_{11})+(b-c)f(E_{12}).$$ Thus, we have $f(X)$ is the zero matrix if and only if...what?
A: From your computations, we know that the range of $f$ has dimension two, so we just need two linearly independent matrices $K_1$ and $K_2$ so that $f(K_1)=f(K_2)=0$.
Set $K_1=(E_{11}+E_{22})/2$ and $K_2=(E_{12}+E_{21})/2$.  From the question's computation results, it's easy to see that $f(K_1)=f(K_2)=0$.  Finally, observe that $K_1$ and $K_2$ are linearly independent, so $\mathrm{ker} f=\mathrm{span}\{K_1,K_2\}=\left\{\begin{pmatrix}a&b\\b&a\end{pmatrix}:a,b\in\Bbb{C}\right\}$.
A: You have already found$$f(E_{11})=\begin{pmatrix}0&2\\-2&0\end{pmatrix},f(E_{12})=\begin{pmatrix}2&0\\0&-2\end{pmatrix},f(E_{21})=\begin{pmatrix}-2&0\\0&2\end{pmatrix},f(E_{22})=\begin{pmatrix}0&-2\\2&0\end{pmatrix}$$Note that $$f(E_{11})+f(E_{22})=\begin{pmatrix}0&0\\0&0\end{pmatrix}$$ Similarly $$ f(E_{12})+f(E_{21})=\begin{pmatrix}0&0\\0&0\end{pmatrix}$$ Thus $ E_{12}+E_{21}$and $ E_{12}+E_{21}$ belong to the Ker(f).
Therefore, $$\{E_{11}+E_{22},E_{12}+E_{21}\}$$ =$$\{   \begin{pmatrix}1&0\\0&1\end{pmatrix},  \begin{pmatrix}0&1\\1&0\end{pmatrix}\}      $$is a basis for the Ker(f)
A: Yes, it helps. The matrix of $f$ with respect to this basis is
$$
\begin{bmatrix}
0 & 2 & -2 & 0 \\
2 & 0 & 0 & -2 \\
-2 & 0 & 0 & 2 \\
0 & -2 & 2 & 0
\end{bmatrix}
\xrightarrow{\text{Gaussian elimination}}
\begin{bmatrix}
1 & 0 & 0 & -1 \\
0 & 1 & -1 & 0 \\
0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0
\end{bmatrix}
$$
The RREF tells us that a basis of the null space of the matrix is
$$
\left\{
\begin{bmatrix}0\\1\\1\\0\end{bmatrix},
\begin{bmatrix}1\\0\\0\\1\end{bmatrix}
\right\}
$$
so that a basis of the kernel of $f$ is
$$
\{E_{12}+E_{21},E_{11}+E_{22}\}=
\left\{
\begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix},
\begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}
\right\}
$$
