Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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

This question might turn out to be really trivial.

$f$ is a one-to-one function from the interval $[0,1]$ to $\mathbb{R}$. Is it necessary that $\exists q \in \mathbb{Q}$ such that $f(x) = q$ for some $x \in [0,1]$ i.e. is it necessary that the image of $f$ contains a rational number?

I came across this question when I was browsing through some website.

I think this is false. But I am unable to come up with a counter example.

share|cite|improve this question
The cardinality of the rationals is countable. The cardinality of the reals is a continuum. So the irrationals also have the cardinality of the continuum. So compose any 1-1 function $[0,1] \to \mathbb R$ with a bijection $\mathbb R \to \mathbb R \setminus \mathbb Q$ and you have an answer to your question. – Ryan Budney Nov 22 '10 at 5:39
@Ryan: Ok. Thanks – user17762 Nov 22 '10 at 5:44
It would be nice if the title reflected the question a little more closely. Right now, it reads as if the question is about whether there exists a one-to-one function from $[0,1]$ to $\mathbb{R}$. – Rahul Nov 22 '10 at 6:22
@Rahul: I edited the title. @Sivaram: I hope it is OK that I changed your title along the lines of Rahul's suggestion. – Jonas Meyer Nov 22 '10 at 6:31
@Rahul, Jonas: Yes. The title now makes better sense. Thanks Jonas. – user17762 Nov 22 '10 at 6:39
up vote 12 down vote accepted

If you want an explicit counterexample, define $f:[0,1]\to\mathbb{R}$ by $f(x)=x$ if $x$ is irrational, $f(x)=\sqrt2+x$ if $x$ is rational.

share|cite|improve this answer
Thanks Jonas. I realized there must some trivial example like this, just that I didn't give it enough thought. – user17762 Nov 22 '10 at 5:48
Ah, my mistake. – Brandon Carter Nov 22 '10 at 5:48

It is obviously false since $[0,1]$ and $\mathbb{R}\setminus\mathbb{Q}$ have the same cardinality, so there exists a function $f: [0,1] \to \mathbb{R}\setminus\mathbb{Q}$ that is bijective. Do codomain expansion and you get an injective map from the unit interval to $\mathbb{R}$ that has no rationals in its range.

share|cite|improve this answer
Ok. Thanks – user17762 Nov 22 '10 at 5:45

Your Answer


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