# Finding the inverse of $f(x,y) = \left(\frac{x}{y}, x + y\right)$

I have the function

$$f(x,y) = \left(\frac{x}{y}, x + y\right)$$

and I want to find its inverse, $$f^{-1}$$. I don't know how to proceed since

1) it can't be expressed as a linear function

$$\begin{bmatrix}f_1 \\ f_2\end{bmatrix} = \begin{bmatrix} ? & ? \\ 1 & 1 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix}$$

2) I can't find a way to express $$x$$ or $$y$$ strictly in terms of $$a$$ and $$b$$

$$\begin{split} a &= \frac{x}{y}\\ b &= x + y \end{split} \hspace{2em} \Rightarrow \hspace{2em} \begin{split} x &= ay\\ y &= b - x \end{split}$$

Help!

You are almost done. Just substitute your $$x=ay$$ into $$y=b-x$$.

$$a=\frac{x}{y}$$ and $$x+y=b$$ thus

$$b=(a+1)y$$ and $$x=\frac{ab}{a+1}$$

$$f^{-1}(x,y)=(\frac{xy}{x+1},\frac{y}{x+1})$$

• Can you prove this is the inverse? In my opinion, this isn't that helpful of an answer. Commented Sep 16, 2019 at 15:04
• @DonThousand Just calculate $f(f^{-1}(x,y))$ and $f^{-1}(f(x,y))$. In both cases the output is $(x,y)$ Commented Sep 16, 2019 at 15:07
• @Andrei I know, I'm just saying that as an answer, just providing the inverse isn't really helpful for OP. Rather, the process of finding the inverse is important. Commented Sep 16, 2019 at 15:08
• I edited my answer. Commented Sep 16, 2019 at 15:10

Let's do some renaming first:

Let $$f(x,y) = \left(f_1(x,y),f_2(x,y)\right)$$ with $$f_1(x,y) = \frac{x}{y}$$ and $$f_2(x,y) = x + y$$.

Further, let $$g(\bar x,\bar y) =\left(g_1(\bar x,\bar y) ,g_2(\bar x,\bar y)\right)$$ be the inverse of $$f(x,y)$$.

Then we have $$(f○g)(x,y) =(g○y)(x,y) = (x,y)$$.
We can expand this equation either way:

• As $$(f○g)(x,y) =(g○y)(x,y)$$
• As $$(f○g)(x,y) =(x,y)$$
• As $$(g○y)(x,y) = (x,y)$$

Either way you end up with an equation system which you can manipulate. In this case, $$(f○g)(x,y) =(x,y)$$ leads to the solution; Expanding it gives:

For all tuples $$(x,y)$$ of the domain of $$g$$ we have: $$f_1(g_1(x,y),g_2(x,y)) = x \\\land\\ f_2(g_1(x,y),g_2(x,y)) = y \\\Leftrightarrow\\ \frac{g_1(x,y)}{g_2(x,y)} = x \\\land\\ g_1(x,y)+g_2(x,y) = y$$

As both equations have the same domain on which they're valid, we can substitute them into each (and obtain equations which will still be valid).

Furthermore, we can apply any bijective function to any equation without changing the truth value of it. More precisely, if we let $$a,b$$ be two functions that are equal on some set $$M$$, and $$c$$ and $$c$$ be a bijective function, we have: $$\bigg(\forall x\in M: a(x)=b(x) \bigg)\Leftrightarrow\bigg(\forall x\in M:c(a(x)) = c(b(x))\bigg)$$

So, all in all we've obtained an equation system with two "things" we want to solve for, and have two equations.
Further we can substitute the equations into each other, and apply any bijective function onto either equation.

Therefore we cansolve this equation system the regular way, i.e. we just act like the only variables we have are the "things" $$g_1(x,y)$$ and $$g_2(x,y)$$, and that everything else is a concrete number.

Suppose you were asked: Solve for $$x$$ and $$y$$ if $$\dfrac{x}{y} = 2$$ $$x+y =3$$

Could you do that? Well, just do the same thing but with $$a$$ and $$b$$ in place of $$2$$ and $$3$$.

• I feel dumb now Commented Sep 16, 2019 at 15:13
• No need to feel dumb. It's a surprisingly large step from working with specific values to turning that value into a parameter that can be varied. Almost everybody needs to have it pointed out to them a few times before they get comfortable and do it automatically. Commented Sep 16, 2019 at 15:17