This is from a contest preparation course.
Do there exist matrices A n x m and B m x n with real entries and $n > m$ such $AB=I$? (I is an n x n square matrix)
The official solution states that the answer is No as the linear transformation from $\mathbb R^n$ to $\mathbb R^m$ corresponding to matrix $B$ is not injective and the linear transformation from $\mathbb R^m$ to $\mathbb R^n$ corresponding to matrix $A$ is not surjective.
I do not seem to understand why this is true and why proving this is equivalent to what we need to prove.
If $f\circ g = I$, then $g$ must be injective (one-to-one) and $f$ must be surjective (onto). (For example, if $g(x)=g(y)$, then $x=f(g(x))=f(g(y))=y$.) An $m\times n$ matrix $B$ with $n>m$ represents a linear map that is not injective (e.g., $Bx=0$ has infinitely many solutions, coming from the free variables when you put $B$ in reduced echelon form).