# $f(f(f(x)))=x,$ but $f(x)\neq x$

Let $$f: \mathbb{R}\to \mathbb{R}$$ be strictly increasing function such that $$f(f(f(x)))=x$$ then by this $$f(x)=x.$$ Does the result fail if we drop the hypothesis that f is strictly increasing? I find such an example if I change the domain and codomain to $$\mathbb{R}^2$$ and $$f=rotation \ by\ 120^o,$$ but could not think of a map from $$\mathbb{R}\to \mathbb{R}.$$ Any help is appreciated.

Let $$g:\mathbb{R^1}\to\mathbb{R^2}$$ be a one-to-one mapping (which exists, because both sets have the same cardinality). Now set $$f=g^{-1}\circ F\circ g:\mathbb{R}^1\to\mathbb{R}^1$$, where $$F$$ is the rotation by $$120^\circ$$. So the result is not true: this is the desired counterexample.

• Do you mean one-to-one and onto? Otherwise $g^{-1}$ doesn't make sense – leibnewtz Jan 30 '19 at 20:27
• @leibnewtz Yes, sure. – Vladimir Jan 30 '19 at 20:30

Define $$f(0)=1, f(1)=2, f(2)=0$$ and $$f(x)=x$$ for $$x \not\in \{0,1,2\}$$.

You can make $$f$$ act as a 3-cyclic permutation

$$f(x) = \begin{cases} 0 & \text{if x = -1 } \\ 1 &\text{if x = 0} \\ -1 &\text{if x = 1} \\ x &\text{otherwise} \end{cases}$$

I suppose it's also possible to make a continuous version of this.

• Continuous is not possible, because then f would be increasing. – user345777 Jan 30 '19 at 20:29
• Sorry, it was a stupid guess. Can I ask you why it would be increasing? – Marco Nervo Jan 30 '19 at 20:33
• Agree with @user345777 $f$ is obviously a bijection. A continuous bijection from $\Bbb{R}$ to itself is either increasing or decreasing. The 3-fold iteration of a decreasing function is itself decreasing which is absurd. So it must increasing and that case has been handled. – Jyrki Lahtonen Jan 30 '19 at 20:34

If you allow yourself to consider the projective line (i.e., the reals with a point at infinity), then the function $$f(x) = \frac{1}{1-x}$$ is a nice continuous solution to the problem (although you have to make sense of "continuous" for this extended line). Pierre Samuel's book on Projective Geometry has a nice exposition of this around page 58.

(By the way, this answer was inspired by @DonaldSplutterwit's deleted answer, although I might have stumbled on it myself, since I've been thinking about projective geometry and looking at Samuel's book today anyhow. Thanks, Donald!)

• Then you could "cram $\infty$ into $\mathbb{R}$" using a variant of the infinite hotel paradox if you really wanted to, and then apply the same sort of construction as in Vladimir's solution. Of course, that won't result in a continuous function $\mathbb{R} \to \mathbb{R}$. – Daniel Schepler Jan 30 '19 at 20:41