# The existence of an inverse to a differentiable function

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.

-
If $gf = Id_{\mathbb{R}^2}$, then the derivative $(gf)'(p)$ would be the identity at every point $p$. Using the chain rule, how big is the kernel of $(gf)'(p)$? Similarly, if $fg = Id_{\mathbb{R}^3}$, then $(fg)'(p)$ is the identity. But how big is the rank of $(fg)'(p)$? –  froggie Dec 13 '12 at 2:21

For the first question, consider the inclusion $(x,y) \mapsto (x,y,0)$ and in the other direction $(x,y,z) \mapsto (x,y)$.