Examples of involutions on $\mathbb{R}$

Just recently I read up something about involutions (functions $f: A \rightarrow A$ such that $f(f(x))=x$, for all $x$ in the domain of $f$), and was wondering how many (if there is a small set of general functions) such involutions exist for $A = \mathbb{R}$, or maybe $A = \mathbb{R} - S$, where S is some set of points that would make the involution work if they were left out of $A$. In general I'm interested in real functions that are involutions, continuous or otherwise.

There were some examples I found here, but any more would be certainly very interesting!

-
Do you want to require any special properties of the involution? Otherwise there are lots: an involution on a set is the same thing as a partition of that set into blocks of size $1$ and $2$. So I think for an infinite set $A$ there are $2^A$ involutions. –  Qiaochu Yuan Jun 21 '11 at 4:45
Your title asks for involutions of "real functions"; your body asks for involutions of the real numbers. Could you harmonize title and body? –  Arturo Magidin Jun 21 '11 at 4:52
@Arturo: Do you mean he should ask about harmonic functions which are involutions? :-P –  Asaf Karagila Jun 21 '11 at 6:16
@Asaf: Well, one could ask about involutions on the set $\mathbb{R}^{\mathbb{R}}$; when I read the title, I thought that's where it was going. –  Arturo Magidin Jun 21 '11 at 6:19
@Qiaochu: I wonder, why did you tag this under set-theory? (I'm not sure where it fits anyway, and the question isn't very clear as pointed out by you and by Arturo.) –  Asaf Karagila Jun 21 '11 at 10:58

If we do not put any conditions on $f$, there will be far too many involutions. Divide the reals in any way into a disjoint union of $1$-element sets and/or $2$-element sets.

For any such subdivision $\mathbb{U}$, if $\{a\}$ is a singleton set in the subdivision, let $f(a)=a$. If $\{a,b\}$ is a doubleton set in the subdivision, let $f(a)=b$ and $f(b)=a$. Then $f$ is an involution. Any subdivision determines an involution, and conversely every involution determines a subdivision.

It follows that there are $2^c$ involutions, "just as many," from the point of view of cardinality, as the number of functions from $\mathbb{R}$ to $\mathbb{R}$.

-

If you assume continuity, you still have as many involutions as continuous functions from $\mathbb R$ to itself, namely cardinality $c$. For if $f$ is any strictly decreasing continuous function from $[0, \infty)$ onto $(-\infty, 0]$, you can extend $f$ to $(-\infty, 0)$ by $f(t) = x$ where $f(x) = t$, and you get a continuous involution.

-
How about differentiable involutions? analytic involutions? –  Gerry Myerson Jun 21 '11 at 5:28
Wait, the cardinality of continuous functions from $\mathbb R$ to itself is the same as the cardinality of $\mathbb R$? –  Rahul Jun 21 '11 at 5:40
You get $\mathfrak{c}$ analytic involutions from the examples $x\mapsto a-x$. @Rahul: Continuous functions are determined by their values on a countable dense set, so there are at most $\mathfrak{c}^{\aleph_0}=\mathfrak{c}$ of them. –  Jonas Meyer Jun 21 '11 at 6:12

Here are a couple of examples that might have some appeal.

1. The link has $f(x)=a+(x-a)^{-1}$, but in fact $f(x)=a+b(x-a)^{-1}$ works for any real $a$ and $b$ (of course one must remove $x=a$ from the domain).

2. Let $g$ be defined on $\lbrace0,1,\dots,9\rbrace$ by $g(9)=9$, $g(d)=8-d$ for $d\ne9$. Then get $f(x)$ by applying $g$ to each of the digits in the decimal expansion of $x$. E.g., $\pi=3.14159265\dots$, so $f(\pi)=5.74739623\dots$.

These are, of course, special cases of the construction given by user6312, but maybe their concreteness and simplicity justify their separate mention.

It further appears that the equation $f(f(x))=x$ is known as Babbage's functional equation. There's a nice paper about it by J F Ritt, On certain real solutions of Babbage's functional equation, Annals of Math 17 (1916) 113-122.

-

Any function withich is symmetric w.r.t.the 45°-axis has $f(x)=f^{-1}(x)$ and so $f(f(x))=x$. Visually, obvious examples are $f(x):=\pm x$ and $f(x):=\frac{1}{x}$.

Moreover, if we take such a function and shift it along the 45°-axis, the property doesn't get lost. Hence, take any function for which $f(f(x))=x$ and define $F_{(f,d)}(x):=f(x-d)+d$, then

$F_{(f,d)}(F_{(f,d)}(x))=f((f(x-d)+d)-d)+d=f(f(x-d))+d=(x-d)+d=x$.

This explains why $\frac{1}{x-d}+d$ works. Also visually, it's clear that the property doesn't get lost if you mirror the function along the axis. Define $G_f(x):=-f(-x)$, then

$G_f(G_f(x))=-f(-(-f(-x)))=-f(f(-x))=-(-x)=x.$

This "generating new functions via shift" busines reminded me of the modular group. I determined it's nontrivial involutive elements and they are $\frac{ax+b}{cx-a}$. Shifting them along the axis by $s$ gives a lot of example solutions: $\frac{b-cs(s+x)+a(2s+x)}{c(s+x)-a}$.

-