Let $f: U \longrightarrow \mathbb{R}^{n}$ and $g: V \longrightarrow \mathbb{R}^{m}$ differentiable in open $U \subset \mathbb{R}^{m}$ and $V \subset \mathbb{R}^{n}$, with $g(f(x))=x$ for all $x \in U$. If $y=f(x)$, prove that $f'(x)$ and $g'(y)$ have the same rank.
This is the last question in a list of my Analysis course. I didn't have a good idea. Anyone have any hints? I didn't want the whole question solved, I would like a hint that would help.
Hint. Differentiate the equation $f(g(x))=x.$ Then it boils down to showing that when two (rectangular!) matrices $A$ and $B$ are such that $AB=I$, then $A$ and $B$ have the same rank. Here $I$ is a square identity matrix of whatever size.