Is there a continuous function $f\colon \mathbb{R}\to \mathbb{R}$ such that $f(f(a)) = -a$ for every $a \in \mathbb{R}$?

  • 3
    $\begingroup$ Yes, $f(x) = -a$ for all $x$. $\endgroup$ – mathworker21 Apr 1 '17 at 18:52
  • 3
    $\begingroup$ I'm afraid you are wrong, this is not a good example. Let $a=1$, so $f(x)=-1$ for all $x$. Then, of course, $f\bigl(f(x)\bigr)=-1$, but, for instance, $f\bigl(f(1)\bigr)\ne -2$. $\endgroup$ – szw1710 Apr 1 '17 at 19:22
  • 1
    $\begingroup$ @JannanLim: does not an acceptable practice here, please do not change a question after it has an answer. Ask a new new question instead. I have reverted the edit. $\endgroup$ – Martin Argerami Apr 2 '17 at 14:17
  • $\begingroup$ That duplicate target has a more general question, but this is covered there as a special case. $\endgroup$ – Jyrki Lahtonen Nov 19 at 18:28

If $f(a)=f(b)$, then $a=-f(f(a))=-f(f(b))=b$. So $f$ is injective. Being continuous, it is then either increasing or decreasing.

Note that the function $g(x)=-x$ is decreasing. Now,

  • if $f$ is increasing, then $f(f(x))$ is also increasing, so $f(f(x))$ cannot equal $g$;

  • if $f$ is decreasing, the composition of two decreasing functions is increasing, so $f(f(x))$ cannot equal $g$.

In conclusion, no such function exists.

  • $\begingroup$ If we modified the domain/range of $f$ would it be possible? $\endgroup$ – Kitter Catter Nov 6 at 18:58
  • $\begingroup$ If you let the domain be $\{0\}$, then $f(x)=0$ satisfies the property. Otherwise, you need the domain to be of the form $[-b,b]$ (because you need $a$ in the domain, $-a$ in the range, and the range inside the domain for the composition to make sense) and the same answer applies. $\endgroup$ – Martin Argerami Nov 6 at 19:05

Not the answer you're looking for? Browse other questions tagged or ask your own question.