Consider a $2\times 2$ matrix $$A:=\begin{pmatrix}2 & -2 \\-2 & -2\end{pmatrix}.$$
How would I work out two different non-zero matrices $B$ so that $AB = BA$?
At the moment I only have $$B=\begin{pmatrix}1 & 0 \\0 & 1\end{pmatrix}.$$
Consider a $2\times 2$ matrix $$A:=\begin{pmatrix}2 & -2 \\-2 & -2\end{pmatrix}.$$
How would I work out two different non-zero matrices $B$ so that $AB = BA$?
At the moment I only have $$B=\begin{pmatrix}1 & 0 \\0 & 1\end{pmatrix}.$$
On
Let $B = \begin{bmatrix} a && b \\ c && d \end{bmatrix} $
Then
$\frac{1}{2} AB = \begin{bmatrix} a - c && b - d \\ - a - c && - b - d \end{bmatrix}$
and
$\frac{1}{2} BA = \begin{bmatrix} a - b && - a - b \\ c - d && -c - d \end{bmatrix}$
Hence, we want
$a - c = a - b \Rightarrow c = b $
$b - d = -a - b \Rightarrow 2 b = d - a $
$-a - c = c - d \Rightarrow 2 c = d - a $
$ -b - d = -c - d \Rightarrow c = b $
This means that we can choose $a$ and $d$ arbitrarily, then we will have $b = c = \frac{1}{2} (d - a) $
For example if $a = 1 , d = 1 $ then $b = c = 0$ which is the identity matrix.
If $a = 1 , d = 5 $ then $ b = c = 2 $
If $a = 10 , d = 2 $ then $b = c = -4 $
The general form of matrix $B$ is
$B = \begin{bmatrix} t && \frac{1}{2}(s - t) \\ \frac{1}{2} (s - t) && s \end{bmatrix} $
where $t, s \in \mathbb{R} $
If we let $\lambda = \frac{1}{2} (s + t) $ and $\mu = -\frac{1}{4} ( s - t ) $, then
$ B = \begin{bmatrix} \lambda + 2\mu && -2\mu \\ -2\mu && \lambda - 2\mu \end{bmatrix} = \lambda \begin{bmatrix} 1 && 0 \\ 0 && 1 \end{bmatrix} + \mu \begin{bmatrix} 2 && - 2 \\ -2 && -2 \end{bmatrix} = \lambda I + \mu A $
The most trivial answer is $B=\lambda I, \lambda A$. But I want to solve it.
Let $B$ as a matrix with arbitary components. So let $B=\begin{pmatrix}a & b \\c & d\end{pmatrix}$. Then $AB, BA$ will be like...
$$ AB=\begin{pmatrix}2a-2c & 2b-2d \\-2a-2c & -2b-2d\end{pmatrix}, BA=\begin{pmatrix}2a-2b & -2a-2b \\2c-2d & -2c-2d\end{pmatrix} $$
When comparing componentwise, we get $b=c=-\frac12(a-d)$.
So $B$ will be this form... $B=\begin{pmatrix}a & b \\b & a+2b\end{pmatrix}$, and it is, this form:
$$ B=\lambda I+\mu A $$