# Approximating the definition of inverse function

Let $f:D\mapsto\mathbb{R}^n$, $D\subset\mathbb{R}^m$ open, $m<n$ be a continuously differentiable function. I define $g:\mathbb{R}^n\mapsto D$ by $$g(y)=\operatorname{argmin}_{x\in D}\|f(x)-y\|,$$ i.e., $g(y)$ is maped to $x\in D$ such that $f(x)$ is the closest point to $y$.

Of course, if $f$ is injective then $g$ is a function.

1. In case $f$ is ijective, is $g$ the inverse of $f$? If so, is it correct that the Jacobian of $g$ at $f(x)$ equals the inverse of the Jacobian of $f$ at $x$?

2. What happen if $f$ is not injective that implies $g(y)$ is not unique? In this case, can we choose $x$ in such a way that $g$ is the inverse function of $f$?

1. Let $f\colon D=(0,\pi)\to\mathbb{R}^2$ be given by $f(x)=(\cos x,\sin x)$. $f$ is injective and $f(D)$ is a semicircle in the upper half plane. $$\forall x\in D\quad\|f(x)-(0,0)\|=1\implies g(0,0)\text{ is not well defined.}$$ Also, $g(0,y)$ is not defined for $y<0$.
2. $g\colon\mathbb{R}^n\to D$ cannot be the inverse of $f$, since $f(D)$ is a proper subset of $\mathbb{R}^n$.