# What can be $f$ so that $f(f(x)) = -x$? [duplicate]

What can be $f$ so that $f^2(x) = -x$ for all $x\in R$?

I know that if $f^2(x) = -x$ then $f(x)$ is injective and $f$ can not be continuous.

But I can not find an example of discontinuous function so that $f^2(x) = -x$ for all $x\in R$.

Can anyone help me?

• $f^2(x)=f\circ f(x)$ Oct 4, 2017 at 15:45
• Oct 4, 2017 at 15:45
• First of all, clarify your notation. Presumably, $f^2(x) = f(f(x))$. Second, how do you know that $f$ cannot be continuous? Finally, what have you tried? Oct 4, 2017 at 15:46
• @Omnomnomnom Yes, but the answer there provides a discontinuous solution as well Oct 4, 2017 at 15:48
• @MikeEarnest just took a closer look as you commented, thanks Oct 4, 2017 at 15:48

Just look at the cycle representation of $f\circ f=-x$, there is one fixed element and a bunch of $2$-cycles, So to build a suitable permutation just pair up the $2$-cycles and for each $(a,b)$ and $(c,d)$ add the $4$-cycle $(a,c,b,d)$.
• In summary, if $A,B$ is a partition of the positive reals and $g:A\rightarrow B$ is a bijection then the permutation with cycles $(a,g(a),-a,-g(a))$ works. Oct 4, 2017 at 15:51