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?

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\}
$$
