prove that $BA=\begin{bmatrix}9 & 0\\ 0 & 9\end{bmatrix}$ I want to prove the following question but I have no idea to start!

let $A$ be a $3\times2$ matrix and $B$ be a $2\times3$ one. if $AB=\begin{bmatrix}8 & 2 &-2 \\2 & 5 & 4 \\-2 & 4 & 5 \end{bmatrix}$
then prove that $BA=\begin{bmatrix}9 & 0\\ 0 & 9\end{bmatrix}$. [ hint:if $AB=I$ then we have $BA=I$]

 A: Note that rank$(AB)=2$. But rank$(BA) \geq \text{rank}(AB)^2$ because $(AB)^2=(AB)(AB)=A(BA)B$. We compute
$$(AB)^2=\begin{bmatrix}72 & 18 & -18\\18&45&36\\-18&36&45\end{bmatrix}=9(AB).$$
But rank$(AB)^2=2$(follows from above matrix equality), so  rank$(BA) \geq 2$. Since $BA$ is $2 \times 2$, this means $BA$ is invertible. Now we have
\begin{align*}
(BA)^3 & = (BA)(BA)(BA)\\
&=B(AB)^2A\\
&=B(9AB)A\\
&=9(BA)(BA)\\
&=9(BA)^2\\
BA&=9I.
\end{align*}
A: Probably there are shorter arguments, but maybe something like this:


*

*$AB$ is symmetric and has an ON basis of eigenvectors $v_1$, $v_2$ and $v_3$ with corresponding eigenvalues $9$, $9$ and $0$.

*$AB$ and $BA$ have the same non-zero eigenvalues (see for example here).

*Multiplying by $B$ from the left, we find that $Bv_1$ and $Bv_2$ are eigenvectors corresponding to $BA$ with eigenvalues $9$. (Note that these vectors are non-zero.)

*The vectors $Bv_1$ and $Bv_2$ are linearly independent, since, multiplying by $A$, we find that $Bv_1=kBv_2$ implies $9v_1=k9v_2$ which cannot hold since $v_1$ and $v_2$ are orthogonal.

*This implies that $BA$ is a diagonalizable $2\times2$-matrix with double eigenvalue $9$. We conclude that $BA=9I$, since, we can write $BA=SDS^{-1}$ with $D$ diagonal with nines on the diagonal.

