If I know $AB$, how can I calculate $BA$? 
Let $A∈\mathscr{M}_{3×2}(\mathbb{R})$ and $B∈\mathscr{M}_{2\times3}(\mathbb{R})$ be matrices satisfying
  $AB =\begin{bmatrix}
8 &2 &−2\\
2 &5 &4\\
−2 &4& 5
\end{bmatrix}$. Calculate $BA$. (Golan, The Linear Algebra a Beginning Graduate Student Ought to Know, Exercise 426.)

Maybe it can be solved by solving a system of equations, but I think there is a shorter way since this problem was in my exam.
Thanks.
 A: $(AB)^2=9(AB)\Rightarrow(BA)^3=9(BA)^2\Rightarrow \mu_{BA}(X)\mid X^2(X-9)$
$P_{AB}(X)=X(X-9)^2\Rightarrow P_{BA}(X)=(X-9)^2\Rightarrow\mu_{BA}(X)\mid (X-9)^2$
Conclusion: $\mu_{BA}(X)=X-9$, so $BA=9I_2$.
(Here $\mu_X$, respectively $P_X$ stands for the minimal polynomial, respectively the characteristic polynomial of a square matrix $X$.)
A: Hint: I'll consider the same problem assuming, instead, that
\begin{align}
A\text{ is }3 \times 2 && B \text{ is } 2 \times 3 && AB = \begin{bmatrix}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 0 \\
\end{bmatrix}.
\end{align}


*

*Since $AB$ has rank $2$, and $A$ is $2 \times 3$, the rank of $A$ must also be $2$. In fact, the column space of $A$ must equal the column space of $AB$. So, $A$ has the form
$A=\begin{bmatrix}
* & * \\
* & * \\
0 & 0 \\
\end{bmatrix}$
for some undetermined $2 \times 2$ invertible matrix.

*For similar reasons, the null space of $B$ must equal that of $AB$. So, $B$ has the form
$B=\begin{bmatrix}
* & * & 0 \\
* & * & 0 \\
\end{bmatrix}$
for some undetermined invertible matrix. 

*From the equation $AB = \begin{bmatrix}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 0 \\
\end{bmatrix}$, we see that the undetermined $2 \times 2$ matrices are inverses of one another. Given this, one checks that $BA = \begin{bmatrix}
1 & 0 \\
0 & 1 \\
\end{bmatrix}$



Remark: For the original unmodified problem, note that, since $AB$ is symmetric, it is diagonalizable (even orthogonally so). Moreover, its diagonal form turns out to be $9$ times projection onto two coordinates. Let $U$ be an invertible $3 \times 3$ matrix with $$UABU^{-1} = \begin{bmatrix}
9 & 0 & 0 \\
0 & 9 & 0 \\
0 & 0 & 0 \\
\end{bmatrix}.$$ Apply the above argument to $A_1 = UA$ and $B_2 = BU^{-1}$ in order to compute $B_2A_2 = BA$. 
