Let $B = \begin{bmatrix} 1 && -2 \\ 3 && 5 \end{bmatrix} $
Find all the matrices $A$ that commute with $B$, i.e matrices $A$ that satisfy $AB = BA$.
My attempt:
Let $A = \begin{bmatrix} x && y \\ z && w \end{bmatrix} $
Then,
$ A B = \begin{bmatrix} x && y \\ z && w \end{bmatrix} \begin{bmatrix} 1 && -2 \\ 3 && 5 \end{bmatrix} = \begin{bmatrix} x + 3 y && - 2 x + 5 y \\ z + 3 w && -2 z + 5 w \end{bmatrix}$
and
$ BA = \begin{bmatrix} 1 && -2 \\ 3 && 5 \end{bmatrix} \begin{bmatrix} x && y \\ z && w \end{bmatrix} = \begin{bmatrix} x - 2 z && y - 2 w \\ 3 x + 5 z && 3 y + 5 w \end{bmatrix} $
Therefore, we now have the linear system
$ 3 y + 2 z = 0 $
$ - 2 x + 4 y + 2 w = 0 $
$ -3 x -4 z + 3 w = 0 $
The augmented matrix of this system is
$ \begin{bmatrix} 0 && 3 && 2 && 0 && | && 0 \\ -2 && 4 && 0 && 2 && | && 0 \\ -3 && 0 && -4 && 3 && | && 0 \end{bmatrix} $
The reduce-row echelon form of this augmented matrix is
$ \begin{bmatrix} 1 && 0 && \dfrac{4}{3} && -1 && | && 0 \\ 0 && 1 && \dfrac{2}{3} && 0 && | && 0 \\ 0 && 0 && 0 && 0 && | && 0 \end{bmatrix} $
Hence,
If we take $ z = t $, and $ w = s $ then
$ x = s - \dfrac{4}{3} t $
$ y = - \dfrac{2}{3} t $
Thus, the matrix $A$ is given by
$ A = t \begin{bmatrix} - \dfrac{4}{3} && - \dfrac{2}{3} \\ 1 && 0 \end{bmatrix} + s \begin{bmatrix} 1 && 0 \\ 0 && 1 \end{bmatrix} $
And my question is as follows:
Is this (brute force) method the only way to find the space of matrices $A$ that commute with the given $B$, or are there more clever ways ?