Let $A,B$ be $m\times m$ matrices such that $AB$ is invertible. Show $A,B$ invertible. Let $A,B$ be $m\times m$ matrices such that $AB$ is invertible. Show $A,B$ invertible. 
Here is what I have attempted:
We have $AB$ invertible so there exists an $m\times m$ matrix $C$ such that $C(AB)=(AB)C=I_{m}$. Since matrix multiplication is associative we immediately have a right and left inverse respectively: $(CA)B=A(BC)=I_{m}$. I know the fact that I have square matrices needs to play a roll and gaurentees me that the product will be, in general, defined. I have tried to multiply $CA$ and $BC$ on other sides but that didn't get me anywhere. 
I've asked myself what would happen if they weren't square and its obvious, by definition, that they would not be invertible but I am not seeing a way to use the fact that they are to gaurentee ourselves a general inverse.

If $AB$ is invertible, then there exists $D$ s.t. $ABD=I$
Then $A$ is invertible with inverse $BD$.
It remains to show that $B$ is invertible.
Now we have
$$ABD=I$$
$$\to BD=A^{-1}$$
$$\to B=A^{-1}D^{-1}$$
Then $B$ is invertible as it is the product of invertible matrices...wait, is that given?
QED if yes. Idk o/w.
