TITLE: How to prove that $f(f(x))=-x$ implies that $f$ is not continuous?
QUESTION [13 upvotes]: I am trying to prove that: Given an $f:\mathbb{R} \rightarrow \mathbb{R}$, if $f(f(x))=-x$
then  $f$ is not continuous?
any help?
Thank you!

REPLY [6 votes]: The general argument goes like this.
[assertion 1] Given any two functions $\varphi : U \to V, \psi : V \to W$, we know:

If $\psi \circ \varphi$ is injective, then $\varphi$ is injective.
If $\psi \circ \varphi$ is surjective, then $\psi$ is surjective.
So for any $f : \mathbb{R} \to \mathbb{R}$ such that $f(f(x)) = -x$, $f \circ f$ bijective implies $f$ bijective. 

[assertion 2]  If $f$ is continuous and bijective, then it will either be a strictly monotonic increasing or a strictly monotonic decreasing function. 
[assertion 3] In both cases, $f\circ f$ will be strictly monotonic increasing. 
[conclusion] Since the function $x \mapsto -x$ isn't, $f$ cannot be continuous.
The same argument shows that for any $g : \mathbb{R} \to \mathbb{R}$, if $g \circ g$ is
strictly montonic decreasing and bijective, then $g$ cannot be continuous.
Can you convince yourselves why assertions 1, 2, 3 are true?