Let $f:\mathbb{R}^2\to\mathbb{R}^3$ be differentiable. Can there exist a $g:\mathbb{R}^3\to\mathbb{R}^2$ such that $gf=\text{id}_{\mathbb{R}^2}$? What about such that $fg=\text{id}_{\mathbb{R}^3}$?
How does one approach such a problem? Chain rule, I suppose, but I can't manage to make it work.
Edited: Made clear that the question is asking if it is possible that $f$ has such a left or right inverse.