For square matrices $A,B$ of the same size, $AB$ is invertible iff both factors are invertible. One direction uses $(AB)^{-1}=B^{-1}A^{-1}$; the other follows from $\det(AB)=\det A\det B\ne0$. Rectangular factors can have an invertible product without two-sided inverses.