# Inverse of a multivariable function

I was trying to find the inverse of $f(x,y)=(u,v)=(\sqrt{x+y},\sqrt{x-y})$ and I found that $x=\frac{u^2+v^2}{2}, y=\frac{u^2-v^2}{2}$. This expression seems well defined to me, but how can I be certain that $f$ really has an inverse? Have I proven the existence of an inverse just by finding this expression, or have I missed some important difference between invertibility in one variable and invertibility in multiple variables? Also, can I run into trouble if I fail to specify the domain/image of these functions?

You first need to define exactly what you mean by inverse. If $f \,:\, A \to B$ is a function, then there are multiple possible ways to define an inverse.

1. You can require that $g_R \,:\, B \to A$ satisfies $f(g_R(x)) = x$ for all $x \in B$. Such a $g_R$ is called a right-inverse, and exists if $f$ ist surjective (also called onto).

2. You can require that $g_L \,:\, B \to A$ satisfies $g_L(f(x)) = x$ for all $x \in A$. Such a $g_R$ is called a left-inverse, and exists if $f$ is injective (also called one-to-one).

3. You can require that $g \,:\, B \to A$ satisfies both $f(g(x)) = g(f(x)) = x$ for all $x \in A$, i.e. that $g$ is both a left-inverse and a right-inverse of $f$. Such a $g$ is usually just an inverse, and exists if $f$ is bijective (one-to-one and onto).

Your $f(x,y) = (\sqrt{x+y},\sqrt{x-y})$ is only defined if $x+y \geq 0$ and $x -y \geq 0$, i.e. on the set $$A = \{(x,y) \,:\, x,y\in\mathbb{R}, |y| \leq x\}$$ and maps this set to $$B = \{(x,y) \,:\, x,y\in\mathbb{R}, x \geq 0, y \geq 0\} \text{.}$$

For the definition $$f \,:\, A \to B \,:\, (x,y) \to (\sqrt{x+y},\sqrt{x-y})$$ your $$g \,:\, B \to A \,:\, (u,v) \to \left(\frac{u^2+v^2}{2}, \frac{u^2 - v^2}{2}\right)$$ is indeed the inverse (according to definition (3)) of $f$, and conversely $f$ is the inverse of $g$. You can easily verify this by computing (assuming that $|y| \leq x$) $$\begin{eqnarray} g(f(x,y)) &=& g\left(\sqrt{\overbrace{x+y}^{\geq 0}},\sqrt{\overbrace{x-y}^{\geq 0}}\right) = \left(\frac{\sqrt{x+y}^2+\sqrt{x-y}^2}{2},\frac{\sqrt{x+y}^2 - \sqrt{x-y}^2}{2}\right) \\ &=& (x,y) \end{eqnarray}$$ and (assuming $u,v\geq 0$) $$\begin{eqnarray} f(g(v,u)) &=& f\left(\frac{u^2+v^2}{2},\frac{u^2-v^2}{2}\right) = \left(\sqrt{\frac{u^2+v^2}{2}+\frac{u^2-v^2}{2}},\sqrt{\frac{u^2+v^2}{2}-\frac{u^2-v^2}{2}}\right) \\ &=& (u,v) \end{eqnarray}$$

Note, however, that if you extend $g$ to the whole of $\mathbb{R}^2$ (which you can easily do - the same expression works for arbitrary $u,v$, not only for positive ones), i.e. define $$g \,:\, \mathbb{R}^2 \to \mathbb{R}^2 \,:\, (u,v) \to \left(\frac{u^2+v^2}{2}, \frac{u^2 - v^2}{2}\right)$$ then $f$ is only a right-inverse, but not a left-inverse of $g$. In fact, $g$ does not have a left-inverse then, since $g$ is not injectivebecause $g(a,b) = g(-a,-b)$.

• In point 3. you have $f(g(x)) = g(f(x))$ where $x \in A$. However $g:B\to A$ so $g(x), x \in A$ looks incorrect? I think the correct specification would be $g(f(a)) = a$ for $a \in A$ and $f(g(b)) = b$ for $b \in B$.
– jII
Sep 9, 2015 at 19:11
• Such an instructive answer. Dec 2, 2020 at 6:40