Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. 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

Why can't there be an increasing function with domain $\mathbb{R}$ and range $\mathbb{R} \setminus \mathbb{Q}$?

Edit: By range I mean the image of the function's domain, i.e. the function admits every irrational value.

I feel like there should be a bijection between every irrational value it takes and the number of discontinuities it has, and I know monotone functions have at most countably many discontinuities, so this would be a contradiction.

But I don't know how to show it.

share|cite|improve this question
I suppose you mean a nonconstant monotone function. – Srivatsan Oct 26 '11 at 1:06
"Range" is a somewhat ambiguous word. By "range $\mathbb R\setminus\mathbb Q$" do you mean that the image of the function must be this entire set, or just that every value of the function must be irrational? – Henning Makholm Oct 26 '11 at 1:11
Mapping into $\mathbb R \setminus \mathbb Q$? Easily done. Mapping onto $\mathbb R \setminus \mathbb Q$? Not possible. Indeed, think of the discontinuities. In fact, think of just one discontinuity. – GEdgar Oct 26 '11 at 1:26
This thread on mathoverflow is relevant. – joriki Oct 26 '11 at 1:38
@Kb100: Wikipedia has heard of such a definition. The concluding sentence of the introduction of that article says: "Because of this ambiguity, it is a good idea to specify whether it is the image or the codomain being discussed." – joriki Oct 26 '11 at 1:43
up vote 15 down vote accepted

The basic reason that there can be no monotone mapping of $\mathbb{R}$ onto $\mathbb{R}\setminus\mathbb{Q}$ is the completeness of the linear order on $\mathbb{R}$.

Suppose that $f:\mathbb{R}\to\mathbb{R}\setminus\mathbb{Q}$ is an increasing surjection. Let $L=\{x\in\mathbb{R}:f(x)<0\}$; clearly $L$ is bounded above (e.g., by the real number $y$ such that $f(y)=\sqrt2$), so $L$ has a least upper bound $u$. Now what can $f(u)$ be?

  • If $u\notin L$, then $f(u)>0$, and $f(x)\ge f(u) > 0$ for every $x\ge u$, so $f[\mathbb{R}]\cap(0,f(u))=\varnothing$, and $f$ isn’t a surjection.

  • If $u\in L$, then $f(u)<0$, but $f(x)>0$ for every $x>u$, so $f[\mathbb{R}]\cap (f(u),0)=\varnothing$, and again $f$ is not a surjection.

In either case we have a contradiction, so $f$ cannot be a surjection.

If $f$ were a decreasing surjection, $-f$ would be an increasing surjection, so a decreasing function from $\mathbb{R}$ to $\mathbb{R}\setminus\mathbb{Q}$ can’t be a surjection either.

share|cite|improve this answer
Just because the function is increasing, doesn't mean that it will reach 0, or 1. Also I don't think you can assume there is a real number y with f(y)=1 if you're also assuming f:R->R\Q. I'm sure you can fix both these issues by a linear transformation of your increasing function (e.g. all increasing functions are a linear transform of an increasing function that has both positive and negative values). – tttppp Oct 26 '11 at 7:32
@tttppp: You’re right about $1$; that was supposed to be a positive irrational, and I’ve fixed it. The other part isn’t a problem: if $f$ doesn’t stretch that far, it certainly isn’t surjective. But I’ve fixed that the easy way by making it a proof by contradiction. – Brian M. Scott Oct 26 '11 at 19:41
Ah yes - I missed that the question was about hitting all irrationals. Very easy to visualise, thanks! :-) – tttppp Oct 27 '11 at 7:46

Note first that the OP is probably using "range" in the sense of "image", not in the sense of "codomain".

I suggest you use Theorem 28 of these notes on discontinuities of weakly monotone functions. Here is the basic idea (I will assume $f$ is weakly increasing).

Case 1: The function is everywhere continuous. Then its image $f(\mathbb{R})$ must be an interval, by the Intermediate Value Theorem, so it certainly can't be $\mathbb{R} \setminus \mathbb{Q}$.

Case 2: The function is discontinuous at at least one point $a \in \mathbb{R}$. Here's where Theorem 28 comes in: then we have either $f(a^-) = \lim_{x \rightarrow a^-} f(x) < f(a)$ and the image contains no values in $(f(a^-),f(a))$ or $f(a) < f(a^+) = \lim_{x \rightarrow a^+} f(x)$ and the image contains no values in $(f(a),f(a^+))$. But every nonempty open interval contains irrational numbers.

share|cite|improve this answer
+1 for a nice clean answer (as usual!). – lhf Oct 26 '11 at 20:38

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.