In one textbook I use for College Algebra, the author teaches that one should interchange $x$ and $y$ when looking for inverse functions. For example, the inverse function of $$y=2x+2$$ is $$y=0.5x-1.$$

In a calculus textbook the author does not teach interchanging variables. For example, the inverse function of $$y=2x+2$$ is $$x=0.5y-1.$$

Surely there is no substantial difference between using $x$ as the variable and using $y$ as the variable for a function. I am a bit concerned about the two different teachings my students received from two different courses as students may get confused. Should we stop teaching "interchange $x$ and $y$" when finding the inverse function?

p.s. If we do teach "interchange $x$ and $y$" when finding the inverse function", the inverse function of


should be $$C=\frac{9}{5}F+32,$$where in the inverse function, $F$ stands for the temperature in Celsius while $C$ stands for the temperature in Fahrenheit. Isn't this confusing?

  • 4
    $\begingroup$ Yes! I stopped doing this long time ago and I am only annoyed when see this happen. It's a part of a bigger problem: making compositions of functions of the same variable: $f(x)=x^2$ and $g(x)=\sin x$. $\endgroup$ – Peter Saveliev Feb 28 at 17:16
  • 2
    $\begingroup$ This kind of thing seems to worry math teachers a lot. I have never seen evidence that it is a problem for students. The reason informal or non-rigorous notation exists is because the people who made it up found it natural. A student who understand the concept will also probably find it natural. $\endgroup$ – Ben Crowell Feb 28 at 18:21
  • 3
    $\begingroup$ For what I used to do (I no longer teach) and why, see my answer to When discussing inverse functions, how can our notation and methods reinforce student understanding? $\endgroup$ – Dave L Renfro Feb 28 at 18:22
  • $\begingroup$ There have been several discussion of this question online. Here is one blogs.ams.org/matheducation/2016/11/28/… $\endgroup$ – Michael Bächtold Feb 29 at 8:25
  • 2
    $\begingroup$ I think you are correct to not switch variables. The motivation for switching variables is just an overloading of the importance of always using the same letter for the input of a function. It is inculcating a certain rigidity which is neither helpful or mature... $\endgroup$ – James S. Cook Mar 1 at 18:06

Since $y=2x+2$ and $x=0.5y-1$ have the same graph on the x-y plane, I am hesitant to call them inverse functions.

Clearly, it's just a matter of making a distinction between independent variables and dependent variables. It is both traditional and sensible to treat $x$ as the default independent variable and $y$ as the default dependent variable. Based on that, I don't have a problem teaching that an inverse function switches the roles of the independent and dependent variables and that is why we exchange the variable names. If an author had a bee in their bonnet that we shouldn't assume the dependence of a variable they used to describe it, I suppose they're welcome to fight for that hill.

It is also the tradition to use $x$ as the dummy independent variable in function notation. So I have no difficulty in saying that $f(x)=e^x$ and $f(x)=\ln x$ are inverse functions, and would be unnecessarily confused if an author felt compelled to switch one of those dummy variables.

| improve this answer | |
  • 4
    $\begingroup$ IMO, there are too many defaults drilled into students' heads, like x is an independent variable, x axis is horizontal, values always increase to the right, while in reality an independent variable can have name different from x, and arrowhead or the unit segment indicate the direction in which values increase. 𝑦=2𝑥+2 and 𝑥=0.5𝑦−1 drawn on the same plane and having the same graph are inverse, they both single-valued, no problem, just change the point of view, this also helps in real life and in politics. But the full graph of $y=x^2$ cannot be used for its inverse. $\endgroup$ – Rusty Core Feb 28 at 17:57
  • $\begingroup$ The difference between the two is seen in the difference between the $xy$-plane and the $yx$-plane. $\endgroup$ – Peter Saveliev Feb 28 at 20:22
  • 1
    $\begingroup$ "I'm hesitant to call them inverse" You wrote down two equations and it's not clear if by "them" you mean the equations or the variables $x$ and $y$. (Also: an equation is not a function (in the modern sense), neither is a variable like $x$ and $y$.) $\endgroup$ – Michael Bächtold Feb 29 at 9:24
  • 2
    $\begingroup$ That first line feels like the answer. Manipulating an equation to isolate the other variable isn’t the same as an inverse function. The question itself suggests a strong confusion on the part of the asker. $\endgroup$ – JTP - Apologise to Monica Feb 29 at 12:34

It's important to clarify the difference between the way mathematicians do things, and the way scientists do things. In math, we typically reserve $x$ for the independent variable (aka input) and the horizontal axis, while $y$ is reserved for the dependent variable (aka output) and the vertical axis. With these variable choices, we need to swap variables in the process of finding the inverse.

In science, variables generally stand for something meaningful. $F$ means Fahrenheit, $C$ means Celsius, and the relationship can be written with either one as input. So we can think of $F$ as a function of $c$: $$F(c) = \frac{9}{5}\cdot c + 32, $$ or of $C$ as a function of $f$: $$ C(f) = \frac{5}{9}\cdot(f-32). $$ In this case, there is of course no swapping, in going from the first equation to its inverse, meaning is properly preserved by writing $f$ instead of $F(c)$, and then solving for $c$.

I think it's important for algebra students to see the science way, which is more concretely meaningful. Eventually, they need to understand inverse functions done with $x$ and $y$, also.

| improve this answer | |
  • $\begingroup$ This is a good answer, but let's be clear: the science approach is not only "more concretely meaningful". It's the only meaningful approach and the "way mathematicians do things" completely lacks meaning. There's no place where we all agreed that "$x$ is reserved for the independent variable" (because then it would be forbidden to talk of parametrised curves and write $x=f(t)$) or that the horizontal axis has alway to be labeled $x$. (Because then we couldn't plot $x$ as function of $t$, with $t$ on the horizontal axis.) $\endgroup$ – Michael Bächtold Feb 29 at 8:46
  • $\begingroup$ I have never seen y on the horizontal axis. You are right about parametrized curves, so I added the word typically in the first part of the second sentence. You are overstating your case. It is often helpful to have traditions like x being the input and y being the output. $\endgroup$ – Sue VanHattum Feb 29 at 19:36
  • 1
    $\begingroup$ Why do you think it is helpful to have this tradition? $\endgroup$ – Michael Bächtold Feb 29 at 22:18
  • $\begingroup$ @MichaelBächtold I don't know if this is tradition. I do know it's helpful. In these days, many students learn programming first, math later. When you use the words "input" and "output", they tend to understand it better. This is my personal experience. $\endgroup$ – scaaahu Mar 1 at 9:33

I usually introduce the idea of inverse functions by linking it to the idea of basic composite functions

For your example, I'd ask: ``What are the (intermediary) functions done to $x$ to get $2x+2$?"

  • Given $x$, we'd multiply by $2$ and then we'd add $2$
  • So it's like we have $y=f\left(g\left(x\right)\right)=2x+2$, where $f(x)=x+2$ and $g(x)=2x$

Then to get $x$ from $y=f\left(g\left(x\right)\right)$, we'd have to undo those $f(x)$ and $g(x)$ functions.

  • The inverse of $f(x)$ is what undoes $x+2$, so $f^{-1}(x)=x-2$
  • Likewise, $g^{-1}(x)=\frac{x}{2}$

And introduce that $f^{-1}\left(f(x)\right)=x$, which is basically "whatever is done to $x$ by the function $f(x)$ is undone by $f^{-1}(x)$"

  • So if $f^{-1}(x) $ was applied to $y$, we'd have $f^{-1}\left(f\left(g\left(x\right)\right)\right)=g\left(x\right)$
  • Algebraically, $[2x+2]-2=2x$
  • Then if we apply $g^{-1}(x)$, we'd get $g^{-1}\left(g(x)\right)=x$
  • Algebraically, $\frac{2x}{2}=x$

If you're teaching younger students (like middle school grade?), I might use a sort of "last in; first out" analogy. Like "when you are getting ready to walk out the door, first you'd put your sock on and, lastly, put on your shoe. Coming home, you'd need to take off your shoe, and then take off the sock"


Obviously a big downside is that it only works for very simple functions but I do like it since it always keeps the idea of an inverse function linked to the function itself, rather than just swapping variables and solving.

I've found it most helpful when teaching students new to trigonometry since, for example, $\sin(\theta)=\frac{O}{H}$ and you want to solve for $\theta$

  • To get $\theta$ alone, you need to "undo" that $\sin$ function that is done to $\theta$.
  • To undo $\sin$ you need $\sin^{-1}$, and since it's an equation what is done to one side you need to do it to the other.
  • Algebraically, $\sin^{-1}\left(\sin(\theta)\right)=\sin^{-1}\left(\frac{O}{H}\right)$
  • $\longrightarrow \theta = \sin^{-1}\left(\frac{O}{H}\right)$
| improve this answer | |

Let me take a moment to look at an example which involves more variables. Consider the map defined by: $$f(x,y) = \left( \frac{x}{x^2+y^2},\frac{-y}{x^2+y^2}\right)$$ for $(x,y) \neq (0,0)$. Let us study how to find the inverse map. We seek $f^{-1}$ such that $$ f(f^{-1}(u,v)) = (u,v) \qquad \& \qquad f^{-1}(f(x,y))=(x,y) $$ for all appropriate $(u,v)$ and $(x,y)$. If $f: dom(f) \rightarrow range(f)$ then $f^{-1}: range(f) \rightarrow dom(f)$. In this example we should eventually be convinced that $dom(f)=range(f) = \mathbb{R}^2-\{ (0,0)\}$.

Pragmatically, to calculate the formula for the inverse we can set $f(x,y) = (u,v)$ and solve the following for $x$ and $y$. $$ \left( \frac{x}{x^2+y^2},\frac{-y}{x^2+y^2}\right) = (u,v) \ \ (*) $$ Remember, we assume $(x,y) \neq (0,0)$ hence multiplication by $x^2+y^2$ is a reasonable step. $$(x,-y) = (u(x^2+y^2), v(x^2+y^2)) $$ which means $ x = u(x^2+y^2)$ and $-y = v(x^2+y^2)$. Suppose $u,v \neq 0$, we can return to the cases $u=0, v\neq 0$ and $u \neq 0, v=0$ after we've finished the interesting case. We already can rule out the case $u=v=0$ since that forces $x=y=0$ in view of the above equations. Now solve both equations for $x^2+y^2$, $$ x^2+y^2 = \frac{x}{u} = \frac{-y}{v} \ \ (**)$$ Next, consider $$ u^2+v^2 = \left(\frac{x}{x^2+y^2} \right)^2+ \left(\frac{-y}{x^2+y^2} \right)^2 = \frac{x^2+y^2}{(x^2+y^2)^2} = \frac{1}{x^2+y^2} \ \ \Rightarrow x^2+y^2 = \frac{1}{u^2+v^2}. $$ Great, now with the above and (**) we derive: $$ \frac{x}{u} = \frac{1}{u^2+v^2} \qquad \& \qquad \frac{-y}{v} = \frac{1}{u^2+v^2} $$ Thus, $$ x = \frac{u}{u^2+v^2} \qquad \& \qquad y = \frac{-v}{u^2+v^2} $$ We find, $$ f^{-1}(u,v) = \left( \frac{u}{u^2+v^2}, \frac{-v}{u^2+v^2} \right) $$ But, what about $u=0, v\neq 0$ ? Let's investigate if the formula above works in such a context, \begin{align} f(f^{-1}(0,v)) &= f\left( \frac{0}{0^2+v^2}, \frac{-v}{0^2+v^2} \right) \\ &= f(0, -1/v) \\ &= \left(\frac{0}{0^2+(-1/v)^2}, \frac{-(-1/v)}{0^2+(-1/v)^2}\right) \\ &= \left(0, \frac{1/v}{1/v^2}\right) \\ &= \left(0,v \right). \end{align} Similar calculations show that $f(f^{-1}(u,0)) = (u,0)$. Indeed, you can check, $f(f^{-1}(u,v) = (u,v)$ for all $(u,v) \neq (0,0)$. Amusingly, pretty much identical calculations reveal that $f^{-1}(f(x,y)) = (x,y)$ for $(x,y) \neq 0$. In fact, since $dom(f) = range(f)$ we might as well say $f=f^{-1}$ in this case. But, if I intend to keep distinct the copies of $\mathbb{R}^2$ in which $dom(f)$ and $range(f)$ reside then writing $f=f^{-1}$ is not a good idea. I suspect a notation such as: $$ f: dom(f) \subset \mathbb{R}^2_{xy} \rightarrow range(f) \subset \mathbb{R}^2_{uv} $$ and $$ f^{-1}: range(f) \subset \mathbb{R}^2_{uv} \rightarrow dom(f) \subset \mathbb{R}^2_{xy} $$ is helpful.

Fine, full disclosure, $f(z) = 1/z$ hence $w=1/z$ yielding $z =1/w$ gives $f^{-1}(w) = 1/w$ is the better way to see that the reciprocal map on the punctured plane is it's own inverse.

If students in the precalculus are taught to solve for the independent variable in terms of the dependent variable then it is a fairly easy transition to higher dimensions where we simply solve for the independent variables in terms of the dependent variables.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.