<s>[INST] Determining matrix $A$ and $B$, rectangular matrix Let $A$ be a $3\times 2$ matrix and $B$ be a $2\times 3$ be matrices satisfying $$AB=\begin{pmatrix} 8 & 2 & -2\\ 2 & 5 & 4\\ -2 & 4 & 5\end{pmatrix}$$
Calculate $BA$. How would you go for this problem? Do we start by noticing the matrix is symmetric? Any hints/ideas? Thanks
 [/INST] Using the suggestion of @WillJagy and the direct approach suggested by @Dac0, we have
$$
A =
\begin{bmatrix}
a & b\\
c & d\\
e & f\\
\end{bmatrix}\qquad
B =
\begin{bmatrix}
a & c & e\\
b & d & f\\
\end{bmatrix}
$$
and from $AB$ we get the following set of equations
\begin{align}
a^2 + b^2 &= 8\\
c^2 + d^2 &= 5\\
e^2 + f^2 &= 5\\
ac + bd &= 2\\
ae + fb &= -2\\
ec + fd &= 4\\
\end{align}
I solved this in WolframAlpha and tested with this particular solution(out of infinite solutions):
$$
A =
\begin{bmatrix}
-2 & -2\\
-2 & 1\\
-1 & 2\\
\end{bmatrix}\qquad
B =
\begin{bmatrix}
-2 & -2 & -1\\
-2 & 1 & 2\\
\end{bmatrix}
$$
Interestingly enough,
$$BA =
\begin{bmatrix}
9 & 0\\
0 & 9\\
\end{bmatrix}
$$
which corresponds to the solution proposed by @AndreasCap. It's also interesting to note that the columns of $A$ are orthogonal and their squared length are equal to $9$, the non-zero eigenvalue of $AB$ with multiplicity $2$.
I gave importance to @WillJagy suggestion because somehow it remembered me of the covariance matrix. I am not saying is the same, but there are nice similarities.
</s>