Let $A$ be a $4\times2$ matrix and $B$ be a $2\times4$ matrix. Find $BA$ when $AB$ is given.

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}$.


You may compute the square of $AB$ and note that $ AB\; AB = 2 AB$ which means that $A(BA -2I)B=0$. Now the rank of $AB$ is two so both $A$ and $B$ must have rank $2$. Therefore $BA-2I$ is the zero matrix.