Let $A$ be a $4\times2$ matrix and $B$ be a $2\times4$ matrix. Find $BA$ when $AB$ is given. 
Let $A$ be a $4\times2$ matrix and $B$ be a $2\times4$ matrix so that
  $$AB=
  \begin{pmatrix}
    1 & 0 & -1 & 0 \\
    0 & 1 & 0 & -1 \\
    -1 & 0 & 1 & 0 \\
    0 & -1 & 0 & 1
  \end{pmatrix}.
$$
  Find $BA$.

I have the answer, which should be
$BA=
 \begin{pmatrix}
    2 & 0 \\
    0 & 2
  \end{pmatrix}
$, but how do I show that this is the only possible solution or is it sufficient (according to some property which I'm not aware of) to have one match for $A$ and $B$ and therefore no other outcome for $BA$ is possible.

Write $A=\begin{pmatrix}A_1\\A_2 \end{pmatrix}$ and $B=\begin{pmatrix}B_1 &B_2 \end{pmatrix}$ where $A_1,A_2,B_1,B_2$ are $2\times2$ matrices.
Note that $AB=\begin{pmatrix}A_1B_1 & A_1B_2\\A_2B_1 & A_2B_2 \end{pmatrix}$, hence $A_1B_1= A_2B_2=I_2$.
Since a square matrix commutes with its inverse, we have as well $B_1A_1=B_2A_2=I_2$.
Finally, note that $BA=\begin{pmatrix}B_1A_1+B_2A_2 \end{pmatrix}=\begin{pmatrix}2I_2 \end{pmatrix}=\begin{pmatrix}2 & 0 \\ 0 & 2\end{pmatrix}$.
