# Does there exist a continuous function $f\colon \Bbb R\rightarrow \Bbb R$ such that $f(f(x))=-x$ for all $x\in\Bbb R$? [duplicate]

Does there exist a continuous function

$f\colon \Bbb R\rightarrow \Bbb R$ such that $f(f(x))=-x$ for all $x\in\Bbb R$?

• actually trying to disprove – user128956 Mar 5 '14 at 14:46

Hint: If $f(f(x))=-x$ then $f$ is a bijection and because $f$ is continuous it must also be either order preserving or order reversing.
• but why is $f$ a bijection? – user2345215 Mar 5 '14 at 14:54
• $f\circ f$ is a bijection, and if $f$ was not a bijection then either $f\circ f$ would not be injective, or it would not be surjective - hence $f$ is bijective. – Dan Rust Mar 5 '14 at 14:55
• $f\circ f\circ f\circ f$ is the identity, hence a bijection. Thus $f$ has to be a bijection, too. – Jyrki Lahtonen Mar 5 '14 at 14:55