# Can the inverse of a function be the same as the original function?

I was wondering if the inverse of a function can be the same function.

For example when I try to invert

$g(x) = 2 - x$

The inverse seems to be the same function. Am I doing something wrong here?

-
No, you're not doing anything wrong. You can certainly have functions such that $f(f(x))=x$. Such functions are called involutions. –  mjqxxxx Oct 27 '13 at 20:54
Please do not vandalise your own question. –  Old John Oct 27 '13 at 22:23
Consider $f(x) = x$. –  Thomas Oct 28 '13 at 1:35
There is also a simple graphical interpretation: any function that when graphed is symmetrical over $y=x$ (that is, a diagonal line at 45° angle splits the graph in two mirror images of each other) will have this property. It's easy to see that you can draw boatloads of functions like that. –  Euro Micelli Oct 28 '13 at 1:40
Why on earth has this question 11 upvotes ? –  Kasper Oct 28 '13 at 13:22

You're correct. A function that's its own inverse is called an involution.

Edit: Oh let's have some fun. :) What are some other functions that are easy to check are involutions? I've cherry picked some of my favorites in what follows, both from memory and also the references I provide below.

• First, note that there's an easy test to determine whether or not $f$ is an involution. Namely, since $f^{-1} = f$, you just need to double check that $f(f(x)) = x$ for all $x$ in the domain of $f$. This can be used to verify all three of the following examples are actually involutions.

• Your function $g(x)$ generalizes to a whole class of involutions! Namely, $$f(x) = a-x$$ is an involution for any real number $a$. In particular, $f(x) = 0 - x = -x$ is an involution (as is $f(x) = x$, of course).

• As someone already pointed out, $f(x) = 1/x$ (defined for all real $x \neq 0$) is also an involution. More generally, for any real $a$ and $b$ the function $$f(x) = a + \frac{b}{x-a} = \frac{ax + (b-a^2)}{x-a}$$ satisfies $$f(f(x)) = a + \frac{b}{a + \frac{b}{x-a} - a} = a + (x-a) = x$$ for all real $x \neq a$, and as such is also an involution on this domain.

• Here's a less obvious (but cool) example. Consider the function $f(x) = (a - x^3)^{1/3}$. You can check this directly that $f(f(x)) = (a - ((a-x^3)^{1/3})^3)^{1/3} = x$. This is an example of a large class of involutions generated by a special type of symmetric function $F(x,y)$ (as explained here).

• Fun Fact: The only continuous, odd ($f(-x) = -f(x)$ for all $x$) involutions with domain $(-\infty,\infty)$ are $f(x) = \pm x$. (A short proof of this fact is given here.)

• There are many, many, more of these functions, and they occur naturally/are useful tools in many branches of mathematics.

-
For "fun fact", that is the only non-trivial involution, but the trivial involution is also odd and continuous. –  Dietrich Epp Oct 28 '13 at 3:25
@DietrichEpp: Good catch! I've edited the post. Thanks! –  Dan Oct 28 '13 at 5:26

That's perfectly fine, and your answer is correct. For another function that is its own inverse, see: $$f(x) = \frac{1}{x} = f^{-1}(x)$$

-

$g(x): y=2-x$

$g^{-1}(x): x=2-y\implies x-2=-y\implies y=2-x$

So you're correct. It is possible that a function can be an inverse of itself.

-