A is a 3x2 matrix and B is a 2x3 matrix, and:

AB =
⌈ 8 2 -2⌉
| 2 5 4|
⌊-2 4 5⌋

Find the product BA.

In my first solution I decomposed the given matrix M into M = P*A'*B'*P^-1 to get A = P*A' and B = B'*P^-1. This yielded a final product (call it N) which is just a diagonal matrix.

It turns out with an adjustment I can generate an entire family of matricies N. Insert Q*Q^-1 in the middle of M = P*A'*B'*P^-1 to get M = P*A'*Q*Q^-1*B'*P^-1.

Then A = P*A'*Q and B = Q^-1*B'*P^-1, which makes B*A = Q^-1*N*Q. Since N is a diagonal matrix then this expression for B*A is a diagonalization of another matrix. So in general for any given M, the set of all products B*A is the set of all matricies whose eigenvalues are the same as the nonzero eigenvalues of M.

This also applies to the orthogonal diagonalization in my second solution - just make Q an orthogonal matrix.