How should I write the proof for this situation? Show that if $A$ is an $m \times n$ matrix and $A(BA)$ is defined, then $B$ is an $n \times m$ matrix.
I know that $A$ is a $m \times n$ matrix and to be able to multiply $B$ with $A$, $B$ must be a $n \times m$ matrix. I am confused though because I can't just assume that. 
 A: 
I am confused though because I can't just assume that. 

Of course you can assume that! That is how matrix multiplication is defined. That reasoning is sufficient to deduce to that $B$ must have $m$ columns, but you need to take into account the multiplication of $BA$ by $A$ on the left to deduce the number of rows that $B$ has.
For matrices $A$ and $B$, if $A$ is size  $m \times n$ then in order for the product $AB$ to make sense we need that $B$ is of size $n \times p$ where $p$ is a natural number. Hence, in your question we need to determine what size to make the matrix $B$ so that $A(BA)$ is defined. For now, let's say that that the size of $B$ is $p \times q$, with $p$ and $q$ to be determined. Let's start inside the parenthesis with $BA$. We know that $A$ is size $m \times n$ so, by the defintion of matrix multiplication we need $q=m$ so that $BA$ is defined. Okay, now we have that $BA$ is a matrix of size $p \times n$ so let's see how we can make sure that $A(BA)$ makes sense. To make $A(BA)$ defined we need that $p=m$ since we are multiplying a matrix of size $n \times m$ by a matrix of size $p \times n$. Thus, we have determined that $p=m$ and $q=n$ so $B$ has size $m \times n$.
A: Let B(p x q), now B(pxq) A(m x n) is defined means q=m and BA would be of form (p x n) and A(m x n ) BA ( p x n) is defined so it would mean p=n
A: If ABA=(AB)A=A(BA) is defined, then AB is defined and BA is defined.
If AB is defined and A is mxn, then B is n x something
If BA is defined and A is mxn, then B is something else x m.
Hence B is n x something and something else x m.
Not quite sure how to conclude exactly, but it follows that B is n x m.
