Given the matrix $AB$, find the matrix $BA$ I have that $$AB = \begin{bmatrix} -1 & 0 \\ 0 & 1 \end{bmatrix}$$ and I am asked to find $BA$. We know that $A$ and $B$ are $2\times 2$ matrices with real number entries.
Please could I ask how people might approach this problem?
So far, I have that the solutions are given by $A^{-1}B^{-1}$. We can establish from the initial information that $A$ and $B$ are both invertible. Is there a way of showing that this set of solutions is finite or infinite? 
I know that $A$ and $B$ are invertible since $\det(BA)=\det(A)\det(B)$ is non-zero. Credit goes to the poster who provided such an eloquent explanation to get my current level of understanding.
 A: A trivial answer to this question is as follows:
Let us assume $A=I_2=\begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}$, then $B = \begin{bmatrix} -1 & 0 \\ 0 & 1 \end{bmatrix}$.
Which means $AB=BA= \begin{bmatrix} -1 & 0 \\ 0 & 1 \end{bmatrix}.$
I think there are multiple answers to this question and we need more information. 
Also it is not mentioned anywhere that matrices $A$ and $B$ should have dimension $2\times 2$, which means we can have $A$ of dimension $m\times 2$ and $B$ of dimension $2\times n$ for $n\neq m$, which means we cannot find $BA$.
A: From $$AB = \begin{bmatrix} -1 & 0 \\ 0 & 1 \end{bmatrix}$$ follows $ABAB = I$ where $I$ is the identity matrix. Consequently


*

*$A$ and $B$ are invertible,

*$A(BA)B = I$, whence $BA = A^{-1}B^{-1}$.


Thus the answer is $BA = A^{-1}B^{-1}$. It is the unique solution and it does not require any further information. 
A: Let $AB=C$ with $C=\pmatrix{ -1 & 0 \cr 0 & 1 \cr}$. Since $0\neq \det(C)=\det(A)\det(B)$, both $A$ and $B$ are invertible. Conjugating $AB=C$ with $A$ yields
$$
BA=A^{-1}(AB)A=A^{-1}CA.
$$
Note that there are several choices for $A$ and $B$ with $AB=C$. For example,  $A=I$, $B=C$, or $B=I$ and $A=C$.
Another possibility is
$$
A=\pmatrix{ 0 & 1 \cr 1 & 0 \cr},\quad 
B=\pmatrix{ 0 & 1 \cr -1 & 0 \cr}.
$$
A: HINT: Take $A = \begin{pmatrix}
    a & b \\
    c & d \\
    \end{pmatrix}$ and $B = \begin{pmatrix}
    e & f \\
    g & h \\
    \end{pmatrix}$. Then by using the equation given, find some restrictions for the unknown variables $a,b,c,d,e,f,g,h$. After that, you can find $BA$ in terms of unknown variables and with the restrictions, you can generalize some of the results.
