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 & b\\ c & d}$, with $bc\neq 0$.
For this, suppose $\pmatrix{e & f\\ g& h}$ such that
 $\pmatrix{a & b\\ c & d}\pmatrix{e & f\\ g& h}=\pmatrix{e & f\\ g& h}\pmatrix{a & b\\ c & 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.

First we have to find out which matrices commute with a Jordan block $\begin{pmatrix}0&1\\0&0\end{pmatrix}$. Since
$$ \begin{pmatrix}0&1\\0&0\end{pmatrix} \begin{pmatrix}x&y\\z&w\end{pmatrix} = \begin{pmatrix}z&w\\0&0\end{pmatrix}, \begin{pmatrix}x&y\\z&w\end{pmatrix} \begin{pmatrix}0&1\\0&0\end{pmatrix} = \begin{pmatrix}0&x\\0&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&0\\0&1\end{pmatrix}$:
$$ \begin{pmatrix}0&0\\0&1\end{pmatrix} \begin{pmatrix}x&y\\z&w\end{pmatrix} = \begin{pmatrix}0&0\\z&w\end{pmatrix}, \begin{pmatrix}x&y\\z&w\end{pmatrix} \begin{pmatrix}0&0\\0&1\end{pmatrix} = \begin{pmatrix}0&y\\0&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 & b \\ c & 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$.
