A function $f:\mathbb{R}\to\mathbb{R}$ such that $f^{-1}(x)=1-f(x)$?

Partition $\mathbb{R}$ according to the equivalence relation $x\sim y$ if and only if $x=y$, or $x=1-y$, or $1-x=y$.

There is one class with one element, $\{1/2\}$ and the rest have two elements.

Partition the classes with two elements in two disjoint sets of the same cardinality $A$, $B$. Let $H$ be a bijection $H:A\to B$. Fix an order within each element of $A$ and within each element of $B$, such that for an element $\{a_1,a_2\}\in A$ we can name the first element $a_1$, and the second $a_2$. Likewise for elements of $B$.

Consider each element $\{a_1,a_2\}\in A$ and its corresponding pair in $B$ defined by the bijection $H$, say $\{b_1,b_2\}=H(\{a_1,a_2\})\in B$, define $g(a_1)=b_1$, $g(a_2)=b_2$, $g(b_1)=a_2$, and $g(b_2)=a_1$. Define also $g(1/2)=1/2$.

Then $g:\mathbb{R}\to\mathbb{R}$ is a bijection of $\mathbb{R}$ such that $1-g(1-g(x))=1-x$.

Define $f(x)=1-g(x)$. Then $f:\mathbb{R}\to\mathbb{R}$ is bijective, since it is a composition of the bijections $g$ and $1-x$, is a function that satisfies $f(f(x))=1-x$. Therefore, composing with $f^{-1}$, we get $$f^{-1}(x)=1-f(x)$$

Tags:

Functions