Find all $2\times 2$ matrices that commutes with the matrix $\pmatrix{a & b\\ c & d}$, with $bc\neq 0$ I want to find all $2\times 2$ matrices that commutes with the matrix $\pmatrix{a &amp; b\\ c &amp; d}$, with $bc\neq 0$.
For this, suppose $\pmatrix{e &amp; f\\ g&amp; h}$ such that
 $\pmatrix{a &amp; b\\ c &amp; d}\pmatrix{e &amp; f\\ g&amp; h}=\pmatrix{e &amp; f\\ g&amp; h}\pmatrix{a &amp; b\\ c &amp; d}$. Equating both sides, we can get the values of $e,f,g,h$. But this way is complicated. Is there any sophisticated way than the above.
The matrix equation $AX-XA=0$ is a special case of the Sylvester matrix equation $AX+XB=C$ for given $A,B,C$. There is indeed a nice way to solve this equation, see the references given above. For $2\times 2$ matrices, studying the system of polynomial equations is a good idea, too. It works quite well, even for matrices in $GL_2(\mathbb{Z})$, where you have Diophantine equations (and then, say $ab=1$ has only the solutions $a=b=1$ or $a=b=-1$).
First we have to find out which matrices commute with a Jordan block $\begin{pmatrix}0&amp;1\\0&amp;0\end{pmatrix}$. Since
$$ \begin{pmatrix}0&amp;1\\0&amp;0\end{pmatrix} \begin{pmatrix}x&amp;y\\z&amp;w\end{pmatrix} = \begin{pmatrix}z&amp;w\\0&amp;0\end{pmatrix}, \begin{pmatrix}x&amp;y\\z&amp;w\end{pmatrix} \begin{pmatrix}0&amp;1\\0&amp;0\end{pmatrix} = \begin{pmatrix}0&amp;x\\0&amp;z\end{pmatrix},$$
we find out that $z = 0$ and $x = w$, so the solution space is two-dimensional.

Second, we do the same for a diagonal matrix with two different eigenvalues: $\begin{pmatrix}0&amp;0\\0&amp;1\end{pmatrix}$:
$$ \begin{pmatrix}0&amp;0\\0&amp;1\end{pmatrix} \begin{pmatrix}x&amp;y\\z&amp;w\end{pmatrix} = \begin{pmatrix}0&amp;0\\z&amp;w\end{pmatrix}, \begin{pmatrix}x&amp;y\\z&amp;w\end{pmatrix} \begin{pmatrix}0&amp;0\\0&amp;1\end{pmatrix} = \begin{pmatrix}0&amp;y\\0&amp;w\end{pmatrix},$$
so the constraints are $y=z=0$, and again the solution space is two-dimensional.

Consider now the Jordan form of the given matrix. It is either a Jordan block of dimension 2, a diagonal matrix with different eigenvalues, or a scalar. In the first two cases, the commutator space has dimension 2, and in the last, it has dimension 4. This explains loup blanc's remark, which can be generalized for arbitrary square matrices.

As loup blanc remarks, since scalars commute with all matrices, the only matrices whose Jordan form is scalar are the scalars themselves, and our matrix can't be scalar since $bc \neq 0$. So the commutator must have dimension 2.



See the comments for why this argument unfortunately doesn't work. Though it almost does.

Let $M = \begin{pmatrix} a &amp; b \\ c &amp; d \end{pmatrix}$, where $bc \neq 0$. In particular, $M$ is not a scalar, so its minimal polynomial has degree two. So $I,M,M^2$ are linearly independent, and span a linear space of dimension three of matrices commuting with $M$. Since the center of the matrix algebra consists only of the scalars, you obtain this way all matrices commuting with $M$.