Find the $\ker(T)$ and $Im(T)$ and their bases, of $T:M_{2\times2}\rightarrow M_{2\times2}$, where $T(A)=AB-BA$ The problem is following: Find the $\ker(T)$ and $Im(T)$ of $T:M_{2\times2}\rightarrow M_{2\times2}$, where $T(A)=AB-BA$, where $B$ is a fixed $2\times2$ matrix. The problem doesn't specifically say that any of matrices, $A$ or $B$ is necesarilly a invertible matrix, but for the sake of making the problem doable, let's say they are.
Obviously, to find $\ker(T)$ we will need to look at the following equation, $AB-BA=0$, which leaves us with two possible solutions, which if I am not mistaken will be, $A=0_{2\times2}$ and $A=A^{-1}$. But how do we use this information to define $\ker(T)$ and in the end find its basis in a problem such as this one.
On the other hand I was thinking that it should be that the $Im(T)=\{AB+BA|A\in M_{2\times2}\}$, but than again how to first of all write this as a $span$ and then find its basis.
P.S. Maybe I've used a different notation than the standard one used by most of you.
 A: Let$$B=\begin{bmatrix}b_{11}&b_{12}\\b_{21}&b_{22}\end{bmatrix},\ E_1=\begin{bmatrix}1&0\\0&1\end{bmatrix},\ E_2=\begin{bmatrix}1&0\\0&-1\end{bmatrix},\ E_3=\begin{bmatrix}0&1\\0&0\end{bmatrix}\text{, and }E_4=\begin{bmatrix}0&0\\1&0\end{bmatrix}.$$Then $B=\{E_1,E_2,E_3,E_4\}$ is a basis of $M_{2\times2}$. Besides:

*

*$T(E_1)=0$;

*$T(E_2)=\left[\begin{smallmatrix}0&2b_{12}\\-2b_{21}&0\end{smallmatrix}\right]$;

*$T(E_3)=\left[\begin{smallmatrix}b_{21}&-b_{11}+b_{22}\\0&-b_{21}\end{smallmatrix}\right]$;

*$T(E_4)=\left[\begin{smallmatrix}-b_{12}&0\\b_{11}-b_{22}&b_{12}\end{smallmatrix}\right]$.

So, the matrix of $T$ with respect to $B$ is
$$\begin{bmatrix}0 & 0 & 0 & 0 \\ 0 & 0 & b_{21} & -b_{12} \\ 0 & 2 b_{12} & b_{22}-b_{11} & 0 \\ 0 & -2 b_{21} & 0 & b_{11}-b_{22}\end{bmatrix}.\label{a}\tag1$$Now, there are two possibilities. Either $B$ is a scalar matrix or it isn't.
If $B$ is a scalar matrix, then $b_{11}=b_{22}$ and $b_{12}=b_{21}=0$. Then \eqref{a} is the null matrix. So, $T$ is the null map, and therefore $\ker T=M_{2\times2}$ and $\operatorname{Im}T=\{0\}$.
If $B$ is not a scalar matrix, then $b_{11}\ne b_{22}$ or at least one of the numbers $b_{12}$ and $b_{21}$ is not $0$. In either case, it's easy to find a $2\times2$ square submatrix whose determinant is not $0$. But the determinant of any $3\times3$ square submatrix of \eqref{a} is $0$. Therefore, the rank of $T$ is $2$, and it follows from that rank-nullity theorem that $\dim\ker T=2$. So, a basis of $\ker T$ is $\{\operatorname{Id},B\}$.
Can you take it from here?
A: There are a few things we can take away from your work. Indeed,
$$\ker(T)=\{A\in M_2({\bf R}): AB-BA=0\}$$
and $${\rm im}(T)=\{C\in M_{2}({\bf R}): \exists A\in M_{2}({\bf R}): AB-BA=C\}.$$
From here, we could continue by definition. But perhaps a more efficient way is to translate the problem in terms of the matrix representation of $T$ as pointed out DonAntonio. I will give a sketch, for now.
Take $B:=\begin{bmatrix}a&b\\c&d\end{bmatrix}$ and we can work with the canonical basis of $M_{2}({\bf R})$, call it,
$$e_{1}:=\begin{bmatrix}1&0\\0&0\end{bmatrix}, e_{2}:=\begin{bmatrix} 0&1\\0&0\end{bmatrix}, e_{3}:=\begin{bmatrix}0&0\\1&0\end{bmatrix}, e_{4}:=\begin{bmatrix}0&0\\0&1\end{bmatrix}$$
First, we can work with the canonical representation of $T$ after with $T$ itself. The matrix representation $[T]$ can be find directly by definition: each column of $[T]$ is the coordinates $[T(e_k)]_{B'}$ respect to the ordered basis $B'=\{e_1,e_2,e_3,e_4\}$. Thus, the structure of $[T]$ will be
$$[T]=\begin{bmatrix}
\uparrow&\uparrow&\uparrow&\uparrow\\
[T(e_1)]_{B'} & [T(e_2)]_{B'} &[T(e_3)]_{B'} &[T(e_4)]_{B'}\\
\downarrow & \downarrow & \downarrow & \downarrow\\
\end{bmatrix}\in M_{4}({\bf R})$$
Then, we can calculate $\ker [T]$ and similarly with ${\rm im} [T]$.
Finally, to return to $T$, we need to find a basis for the kernel and image of the matrix representation and noticed that those vectors are coordinates with respect to $B'$.
