Solution (source code)

= Solution

\b[True for these square <matrices>.] The <determinant> multiplication identity gives $\det(XY)=\det X\det Y$. Since $XY$ is invertible, its <determinant> is nonzero; both factors are therefore nonzero, so both <matrices> have <matrix inverses>.

Equivalently, $Y$ must be injective and $X$ must be surjective, and either property implies invertibility for an endomorphism of a finite-dimensional <vector> space. The equal square dimensions matter: a rectangular <matrix> and a right inverse can have identity product without being mutually invertible square <matrices>.