Fixed point in a continuous map 
Possible Duplicate:
Periodic orbits 

Suppose that $f$ is a continuous map from $\mathbb R$ to $\mathbb R$, which satisfies $f(f(x)) = x$ for each $x \in \mathbb{R}$.
Does $f$ necessarily have a fixed point?
 A: Here's a somewhat simpler (in my opinion) argument.  It's essentially the answer in Amr's link given in the first comment to the question, but simplified a bit to treat just the present question, not a generalization.  Start with any $a\in\mathbb R$.  If we're very lucky, $f(a)=a$ and we're done.  If we're not that lucky, let $b=f(a)$; by assumption $a=f(f(a))=f(b)$.  Since we weren't lucky, $a\neq b$.  Suppose for a moment that $a<b$.  Then the function $g$ defined by $g(x)=f(x)-x$ is positive at $a$ and negative at $b$, so, by the intermediate value theorem, it's zero at some $c$ (between $a$ and $b$).  That means $f(c)=c$, and we have the desired fixed point, under the assumption $a<b$.  The other possibility, $b<a$, is handled by the same argument with the roles of $a$ and $b$ interchanged.
As user1551 noted, we need $f(f(x))=x$ for only a single $x$, since we can then take that $x$ as the $a$ in the argument above. 
A: Yes. here is an outline of how to show this:
$\ \ \ \ $1) Show that the range of $f$ is $\Bbb R$.
$\ \ \ \ $2) Show that $f$ is one-to-one; hence, monotone by continuity.
Assume $f$ is not the identity function (otherwise the result is trivial).
Then:
$\ \ \ \ $3) Show that $f$ is strictly decreasing.
Then, using 1) and 3): 
$\ \ \ \ $4) Show that the function $g$ defined by $g(x)=f(x)-x$ has a (unique) zero. 
Conclude that $f$ has a (unique) fixed point.
A: Yes. This is a direct consequence of Sharkovsky's theorem. And the requirement $f(f(x))=x$ for each $x\in\mathbb{R}$ is too strong. Actually we only need $f(f(x))=x$ for some $x\in\mathbb{R}$ to guarantee that $f$ has a fixed point.
