Suppose that $A$ and $B$ are square matrices and that $AB$ is invertible. Using the interpretation of multiplication by $A$ (or $B$) as a linear transformation from $\Bbb{R}^n \to \Bbb{R}^n$, explain why both $A$ and $B$ must be invertible.
So I think it has to do with $x \mapsto Ax$ and $x \mapsto Bx$ being onto and one-to-one and then using the invertible matrix theorem, but I don't quite understand how to answer this precisely.
A matrix/transformation is invertible if and only if its kernel is $\{\vec 0\}$. In other words, a matrix/transformation is invertible if and only if the only vector it sends to zero is the zero vector itself.
Now, assume that $AB$ is invertible, i.e. $ABv\ne0$ for every $v\ne0$: