# Proving that if $f(x)=x$ has no real solution then $f(f(x))=x$ has no real solution either

If $f:\mathbb{R} \to \mathbb{R}$ is a continuous function such that $f(x)=x$ has no real solution, then show that $f(f(x))=x$ has no real solution either.

Is the proof trivial as it seems or does it need an analytical approach?

• Do you want a hint or a full solution? My hint is look at $f(x)-x$. – Emre Jun 4 '16 at 11:16
• @Emre I need more than that, thanks. – StubbornAtom Jun 4 '16 at 11:17

As $f$ is continuous, $g(x)=f(x)-x$ is also continuous. We know that $g(x)=0$ has no root. Thus, either $g(x)>0$ for all $x\in\mathbb{R}$ or $g(x)<0$ for all $x\in\mathbb{R}$. In the first case, we have $f(x)>x$ for all $x\in\mathbb{R}$. So, $$f(f(x))>f(x)>x$$ In the second case, we have $f(x)<x$ for all $x\in\mathbb{R}$. So, $$f(f(x))<f(x)<x$$
• I am having confusion. In your argument are you not assuming that the function is monotonically increasing when you say $f(x)>x \implies f(f(x))>f(x)$? – tomriddle99 Sep 13 '19 at 15:59
• No, I am replacing $x$ with $f(x)$ in the statement. – Emre Mar 30 '20 at 2:53