TITLE: Examples of involutions on $\mathbb{R}$
QUESTION [13 upvotes]: 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!

REPLY [7 votes]: The set of continuous involutions on $\mathbb R$ has a fairly easy to describe structure. Let $f$ be a continuous involution on $\mathbb R$. Then:

Any point is either fixed, or of period $2$. The set of fixed points is closed, so the set of periodic points is open.
If $x$ is of period $2$, there is a fixed point between $x$ and $f(x)$.
If $x$ is of period $2$, there is exactly one fixed point between $x$ and $f(x)$. Let $a$ be the nearest fixed point to $x$ between $x$ and $f(x)$. Then as $x$ approaches $a$, $f(x)$ must approach $a$, and can never be equal to a fixed point, since by our choice of $a$, $x$ is never itself fixed as it approaches $a$. This is impossible if there's another fixed point between $x$ and $f(x)$.
If $f$ has at least two fixed points, then suppose there is a non-fixed point in between them. Take the largest open interval of non-fixed points around that point. Its boundaries are fixed. By continuity and (2), near the left edge of that interval, $f(x)$ must be outside of the interval on the left, and near the right edge, $f(x)$ must be outside on the right. As $x$ runs through the interval, $f(x)$ can't touch any fixed points, so this violates the intermediate value theorem.
If on the other hand, any two fixed points of $f$ have no non-fixed points between them, then the set of fixed points forms a single closed interval. If this interval isn't all of $\mathbb R$, then (3) is impossible to satisfy for any non-fixed $x$.

Thus $f$ either fixes $\mathbb R$ or has exactly one fixed point, dividing the real line into two halves. By (2), the left half must map onto the right half and vice-versa. For simplicity let's say the fixed point is $0$. Then $f$ can/must be equal to any/some strictly decreasing continuous function with $f(0)=0$ on $\mathbb R^+$, and to its inverse on $\mathbb R^-$. For instance we can take $f(x)=-2x$ for positive $x$ and $f(x)=-\frac12x$ for negative $x$.