<s>[INST] 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.
 [/INST] Let $C = (c_{ij}) = AB$, so $c_{ij} = a_{i1}b_{1j}+a_{i2}b_{2j}$, that means each entry $c_{ij}$ can be interpreted as the scalar product of row $i$ of $A$ and column $j$ of $B$. Let $a_{i:}$ be the $i$th row of $A$ and $b_{:j}$ the $j$-th column of $B$. Now we see that 
$$a_{1:} \perp b_{:2} \text{ and } a_{1:} \perp b_{:4}$$
$$a_{3:} \perp b_{:2} \text{ and } a_{3:} \perp b_{:4}$$
$$a_{2:} \perp b_{:1} \text{ and } a_{4:} \perp b_{:1}$$
$$a_{2:} \perp b_{:3} \text{ and } a_{4:} \perp b_{:3}$$
and therefore $a_{1:} \perp b_{:2} \perp a_{3:}$ which implies $a_{1:} \Vert a_{3:}$ and similarly $a_{2:} \Vert a_{4:}$ and $b_{:1} \Vert b_{:3}$ and $b_{:2} \Vert b_{:4}$.
So we can conlcude $a_{1:} = c a_{3:}$ for some factor $c$. But we know that $a_{1:} \cdot b_{:1} = 1$ and $ca_{1:} \cdot b_{:1} = a_{3:} \cdot b_{:1} = -1$ so $c=-1$. 
In the very same way we can conclude that $a_{2:} = -a_{4:}$ and $b_{:1} = - b_{:3}$ and $b_{:2} = - b_{:4}$. To summarize what we've got so far:
$$A = \begin{bmatrix} 
a_{11} & a_{12} \\ 
a_{21} & a_{22} \\ 
-a_{11} & -a_{12} \\ 
-a_{21} & -a_{22}
\end{bmatrix} \quad B = \begin{bmatrix} 
b_{11} & b_{12} & -b_{11} & -b_{12} \\ 
b_{21} & b_{22} & -b_{21} & -b_{22} 
\end{bmatrix}$$
Now consider the blocks $$\tilde A = \begin{bmatrix} 
a_{11} & a_{12} \\ 
a_{21} & a_{22} \end{bmatrix} \text{ and }\tilde B = \begin{bmatrix} 
b_{11} & b_{12} \\ 
b_{21} & b_{22} \end{bmatrix} .$$
Note that $A = \begin{bmatrix} \tilde A \\ - \tilde A \end{bmatrix}$ and $B = \begin{bmatrix} \tilde B & -\tilde B\end{bmatrix}$.
You immediately see from the given equation that $\tilde A \tilde B = I$ so $\tilde A  = \tilde B^{-1}$.
And therefore $BA = \tilde B \tilde A + (-\tilde B)(-\tilde A) = 2I$ which is your desired result.
</s>