Solution (source code)

= Solution

If $A$ is an <invertible matrix>, then
$$
BA=A^{-1}(AB)A.
$$
\b[Thus $AB$ and $BA$ are <similar matrices>, and similar matrices have the same <characteristic polynomial>.]