Exotic bijection from $\mathbb R$ to $\mathbb R$

Clearly there is no continuous bijections $f,g~:~\mathbb R \to \mathbb R$ such that $fg$ is a bijection from $\mathbb R$ to $\mathbb R$.

If we omit the continuity assumption, is there such an example ?

Notes: to follow from Dustan's comments: Notes: By definition $fg~:~x \mapsto f(x)\times g(x)$ and not $f\circ g$. If there were continuous bijections just look at the limits of $f$ and $g$ at $+\infty$ and $-\infty$ to conclude that $fg$ can't be a bijection


Let $f(x)=x$, and define $g$ piecewise by $$ g(x) = \begin{cases} -x ,& x \in \cdots \cup (-16,-8] \cup (-4,-2] \cup \cdots &= \bigcup_k -[2 \cdot 4^k, 4 \cdot 4^k) \\ 4x ,& x \in \cdots \cup (-8,-4] \cup (-2,-1] \cup \cdots &= \bigcup_k -[4^k, 2 \cdot 4^k) \\ 0 ,& x = 0 \\ x ,& x \in \cdots \cup [1,2) \cup [4,8) \cup \cdots &= \bigcup_k [4^k, 2 \cdot 4^k) \\ -\frac14 x ,& x \in \cdots \cup [2,4) \cup [8,16) \cup \cdots &= \bigcup_k [2 \cdot 4^k, 4 \cdot 4^k) \\ \end{cases} $$ (where $-[b,a)$ just means $(-a,-b]$).

This $g$ is a bijection from $\mathbb{R}$ to $\mathbb{R}$, since

  • $g$ maps $\bigcup_k -[2 \cdot 4^k, 4 \cdot 4^k)$ one-to-one onto $\bigcup_k [2 \cdot 4^k, 4 \cdot 4^k)$.
  • $g$ maps $\bigcup_k [2 \cdot 4^k, 4 \cdot 4^k)$ one-to-one onto $\bigcup_k -[2 \cdot 4^k, 4 \cdot 4^k)$.
  • $g$ maps $\bigcup_k -[4^k, 2 \cdot 4^k)$ one-to-one onto itself.
  • $g$ maps $\bigcup_k [4^k, 2 \cdot 4^k)$ one-to-one onto itself.
  • $g$ maps $0$ to itself.

And $fg$ is a bijection from $\mathbb{R}$ to $\mathbb{R}$, since

  • $fg$ maps $\bigcup_k -[2 \cdot 4^k, 4 \cdot 4^k)$ one-to-one onto $\bigcup_k -[4 \cdot 16^k, 16 \cdot 16^k)$.
  • $fg$ maps $\bigcup_k [2 \cdot 4^k, 4 \cdot 4^k)$ one-to-one onto $\bigcup_k -[16^k, 4 \cdot 16^k)$.
  • $fg$ maps $\bigcup_k -[4^k, 2 \cdot 4^k)$ one-to-one onto $\bigcup_k [4 \cdot 16^k, 16 \cdot 16^k)$.
  • $fg$ maps $\bigcup_k [4^k, 2 \cdot 4^k)$ one-to-one onto $\bigcup_k [16^k, 4 \cdot 16^k)$.
  • $fg$ maps $0$ to itself.

With the axiom of choice we can prove a much more general result:

Theorem. If $X$ is an infinite group (or field), then there are bijections $f,g:X\to X$ such that $f(x)g(x)=x$ for all $x\in X$.

Proof. It will suffice to prove it for a group; if $X$ is an infinite field, we can apply the theorem to the multiplicative group $X\setminus\{0\}$ and then extend the bijections to $X$ by setting $f(0)=g(0)=0$. Moreover, it will suffice to construct three bijections $f,g,h:X\to X$ such that $f(x)g(x)=h(x)$ for all $x\in X$; then $f\circ h^{-1}$ and $g\circ h^{-1}$ will be bijections whose product is the identity map.

Let $X$ be an infinite group, $|X|=\kappa$, and choose a well-ordering $\prec$ of $X$ such that $|\{y\in X:y\prec x\}|\lt\kappa$ for each $x\in X$. Partition $X$ into disjoint sets $A,B,C$ with $|A|=|B|=|C|=\kappa$. We define $f,g,h:X\to X$ by transfinite induction. Consider $x\in X$, and suppose $f(y),g(y),h(y)$ have been defined for all $y\prec x$; we define $f(x),g(x),h(x)$ as follows.

If $x\in A$, let $f(x)$ be the least element of $X\setminus\{f(y):y\prec x\}$; then choose $g(x)\in X\setminus\bigcup_{y\prec x}\{g(y),\ f^{-1}(x)h(y)\}$ and let $h(x)=f(x)g(x)$.

If $x\in B$, let $g(x)$ be the least element of $X\setminus\{g(y):y\prec x\}$; then choose $f(x)\in X\setminus\bigcup_{y\prec x}\{f(y),\ h(y)g(x)^{-1}\}$ and let $h(x)=f(x)g(x)$.

If $x\in C$, let $h(x)$ be the least element of $X\setminus\{h(y):y\prec x\}$; then choose $f(x)\in X\setminus\bigcup_{y\prec x}\{f(y),\ h(x)g(y)^{-1}\}$ and let $g(x)=f(x)^{-1}h(x)$.

Now we have bijections $f,g,h:X\to X$ such that $f(x)g(x)=h(x)$ for all $x\in X$. (Injectivity is clear from the definition; surjectivity can be proved by transfinite induction.)