MathOverflow is a question and answer site for professional mathematicians. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can one characterize monotonic bijections from $\mathbb{Q}$ to $\mathbb{Q}$? It is easy to see that piecewise linear functions which are strictly monotonic and surjective will do the trick, but are these functions already all monotonic bijections of the rationals, or are there also "curved" ones? Classical curved bijections of the reals like $x^3$ are of no help, because, for example, 2 has no preimage in $\mathbb{Q}$.

The context of this question is the transformation of random variables and the degrees of freedom associated with these transformations, or more specific, what kind of results valid for continuous random variables can be transferred to rational random variables, and which results are sensitive to the special structure of the reals.

share|cite|improve this question
There are loads of non-monotonic continuous bijections from $\mathbb{Q}$ to itself that don't extend to continuous functions on $\mathbb{R}$. But the way you phrase the question suggests that you may not be interested in these? – Jeremy Rickard Jan 30 '13 at 16:30
For example, swap the intervals $(\sqrt{2},\sqrt{2}+1)$ and $(\sqrt{2}+1,\sqrt{2}+2)$, leaving everything outside these intervals fixed. – Jeremy Rickard Jan 30 '13 at 16:48
Consider the zig-zag construction showing that any two countable dense linear orders are isomorphic, and apply it with $\mathbb Q$ on both sides. You have a lot of freedom in the construction: in particular, you can do it in such a way that the image or preimage being chosen is slightly off from the position it would have if the bijection were linear between the nearest points where the function has already been fixed (I hope this description is clear). You will end up with a monotone bijection which is not linear on any nonempty interval. – Emil Jeřábek Jan 30 '13 at 17:03
In fact, if $F$ is a countable set of functions, you can arrange that the the value of the bijection in the $n$-th chosen point disagrees with the values given by the first $n$ functions from $F$. You will get a monotone bijection which differs from any $f\in F$ in all but finitely many points. For example, $F$ can be the set of all rational functions with rational coefficients. – Emil Jeřábek Jan 30 '13 at 17:12
You can biject two given countable dense subsets of $\mathbb{R}$ by an entire diffeomorphism:… – Pietro Majer Feb 2 '13 at 19:52
up vote 10 down vote accepted

A simple example of a monotonic homeomorphism from $\mathbb{Q}$ to itself that is not piecewise linear is given by $f(x)=x$ if $x<0$, $f(x)=\frac{x}{1-x}$ if $x\in[0,\frac{1}{2}]$ and $f(x)=x+\frac{1}{2}$ if $x>\frac{1}{2}$.

share|cite|improve this answer
Thanks for this nice and explicit example, Jeremy. I wonder if there are other elementary functions besides quotients of linear functions which can be used to piece together a monotonic bijection (that there are a lot of other, but maybe not elementary, functions follows from the comments by Emil Jeřábek). – Joerg Zimmermann Jan 30 '13 at 18:22

You can even have $f$ be an entire function. See e.g.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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