# Commuting $2 \times 2$ matrix to a triangular matrix

If $$A = \begin{bmatrix} a & 1 \\ 1 & 0 \end{bmatrix}$$, I want to find all commuting matrices $$B$$ to $$A$$. One can write up the equations for $$BAB^{-1}$$: $$\begin{bmatrix} x_1 & x_2 \\ x_3 & x_4 \end{bmatrix} \begin{bmatrix} a & 1 \\ 1 & 0 \end{bmatrix} \frac{1}{x_1 x_4 - x_2 x_3}\begin{bmatrix} x_4 & -x_2 \\ -x_3 & x_1 \end{bmatrix} = \begin{bmatrix} a & 1 \\ 1 & 0 \end{bmatrix}$$

but I did not find the equations very easy to solve. We can assume that det(B) = 1. This gives \begin{align} a = x_4\left(ax_1+x_2\right)-x_1x_3 \\ 1 = -x_2\left(ax_1+x_2\right)+x_1^2 \\ 1 = x_4\left(ax_3+x_4\right)-x_3^2 \\ 0 = -x_2\left(ax_3+x_4\right)+x_1x_3 \end{align}

How do I solve this system, or is there any elegant way to solve this?

Muchos gracias!

• Why don't you try with $BA=AB$? Mar 19 at 12:28

Try instead to solve $$AB=BA$$. You'll get a linear system of four variables which will be much easier to solve.