# Does there exist a bijective, continuous map from the irrationals onto the reals?

Let $$\mathbb{P}$$ be the irrational numbers as a subspace of the real numbers. $$\mathbb{P}$$ is homeomorphic to $$\mathbb{N}^\mathbb{N}$$, which is also called the Baire space. It is well known, and fairly easy to see, that there is a continuous map from $$\mathbb{P}$$ onto the reals, or that there is a closed subset $$A$$ of $$\mathbb{P}$$ and a bijective, continuous map from $$A$$ onto the reals.

But does there exist a bijective, continuous map from $$\mathbb{P}$$ onto the reals?

I'm sure this question has been asked already and the answer is well-known. But I couldn't find a reference. Nor could I prove or disprove it.

• Have you seen this already ?mathoverflow.net/q/112127/483536 Jul 22, 2022 at 17:40
• Key point is continuous. Hint: Think intermediate value thereom. Suppose $f(a)$ is irration and $f(b)$ is irrational. And suppose $c$ is a ration number between $f(a)$ and $f(b)$..... what does that imply? Jul 22, 2022 at 17:42
• @Lost in Space: yes, of course, this is exactly what I commented in my question! But it does not answer it at all!
– Ulli
Jul 22, 2022 at 17:43
• This has been asked before but I find search this site to be next to impossible (there must be something I'm overlooking) so I can't find the duplicate. Maybe someone else will. Jul 22, 2022 at 17:45
• @fleablood: sorry, I don't get this: the intermediate value theorem is for maps with connected domain. But, of course, the irrationals are not connected.
– Ulli
Jul 22, 2022 at 17:45

Here is a direct construction of a continuous bijection $$f:\mathbb{N}^\mathbb{N}\to\mathbb{R}$$. First, partition $$\mathbb{R}$$ into infinitely many left-closed right-open intervals $$(I_n)_{n\in\mathbb{N}}$$. Then partition each $$I_n$$ into infinitely many left-closed right-open intervals $$(I_{nm})_{m\in\mathbb{N}}$$, such that there is no rightmost $$I_{nm}$$ (i.e., there is no $$I_{nm}$$ whose right endpoint is the right endpoint of $$I_n$$). Continue this process recursively, defining for each finite sequence $$s$$ of natural numbers a left-closed right-open interval $$I_s$$ such that each $$I_s$$ is the disjoint union of all the intervals $$I_{sn}$$ and there is no rightmost $$I_{sn}$$. Also arrange that the length of each $$I_s$$ is at most $$1/n$$ where $$n$$ is the length of the sequence $$s$$.

Now for $$\sigma\in\mathbb{N}^\mathbb{N}$$, define $$f(\sigma)$$ to be the unique element of the intersection $$\bigcap_s I_s$$ where $$s$$ ranges over all initial segments of $$\sigma$$. Since the lengths of these $$I_s$$ go to $$0$$, it is clear there is at most one such point. Since the right endpoint of $$I_{sn}$$ is always strictly less than the right endpoint of $$I_s$$, $$\bigcap_s I_s$$ is actually equal to $$\bigcap_s\overline{I_s}$$ (where the closure just adds in the right endpoint) and so is nonempty by compactness. Thus $$f$$ is well-defined. It is easy to see that $$f$$ is continuous, and $$f$$ is bijective since each $$I_s$$ is partitioned by the sets $$I_{sn}$$ so each real number is in a unique $$I_s$$ for each length of $$s$$ which combine to form an infinite sequence.

• Thank you very much for your comprehesnive and detailled answer! Although I haven't checked all the details of your proof yet, this constrruction looks very promising to me. And, of course, it's always very helpful and good to have a concrete map (+1). However, I even more prefer this very general theorem mentioned in the book of Kechris (for instance).
– Ulli
Jul 24, 2022 at 8:09

Theorem: Classical Descriptive Set Theory,Alexander S. Kechris,p-$$40$$, Exercise $$7.15$$

$$X$$ be a non empty polish space. Then $$X$$ is perfect iff there is a continuous bijection $$f:\mathcal{N}\to X$$

$$\mathcal{N}=\mathcal{P}$$ : set of all irrationals is the Baire space $$\omega^\omega$$.

$$X=\mathbb{R}$$ : set of reals is a perfect Polish space.

Hence it is possible to find a continuous bijection from $$\mathcal{P}$$ onto $$\mathbb{R}$$

• How does one prove the theorem in the 1st sentence? Jul 23, 2022 at 6:04
• Thanks a lot for pointing me to the book of Kechris. In fact, it contains a whole bunch of related results, which I was not aware of. In particular, the referenced exercise, of course, answers my original question. At the end of the book there are valuable hints how to proof this exercise. So, quite surprisingly for me, your first intuition about this theorem was correct (+1).
– Ulli
Jul 24, 2022 at 8:00

Yes, there is a continuous bijection from $$\Bbb{N}^\Bbb{N}$$ to $$\Bbb R$$. Quoting [1],

Waclaw Sierpinski proved in 1929 a remarkable theorem, which in its modern general form reads: if $$X$$ is any nonempty perfect Polish space, then there is a continuous bijection from $$\Bbb{N}^\Bbb{N}$$ to $$X$$. (See [2, pp. 40, 357]. A Polish space is a topological space which has a countable dense subset and which is complete with respect to a metric generating the topology. A space is perfect if it has no isolated points.) The spaces $$\Bbb R^n$$ and $$I^n$$ and the Cantor set are examples of perfect Polish spaces. Therefore $$\Bbb{N}^\Bbb{N}$$ can be mapped continuously and bijectively onto each of these spaces.

Thus the original reference is [3], although I was not able to access to this paper yet. Interestingly, there is no continuous bijection from $$\Bbb R^2$$ to $$\Bbb R$$, nor from $$\Bbb R$$ to $$\Bbb R^2$$, see for instance this answer.

[1] O. Deiser, A simple continuous bijection from natural sequences to dyadic sequences, Amer. Math. Monthly 116 (2009), no. 7, 643--646.

[2] A.S. Kechris, Classical descriptive set theory. Graduate Texts in Mathematics, 156. Springer-Verlag, New York, 1995. xviii + 402 pp.

[3] W. Sierpinski, Sur les images continues et biunivoques de l'ensemble de tous les nombres irrationnels, Mathematica 1 (1929) 18-21.

• Ref $[2]$ is available for loan online for up to an hour at a time from the internet archive. Jul 23, 2022 at 14:11
• @LostinSpace $\mathbb{N}^\mathbb{N}$ is perfect (maybe you're thinking of compact or similar?). (But I think you're right that $\mathbb{R}$ should be $X$.) Jul 24, 2022 at 1:10
• @ArturoMagidin Thanks for pointing out the typo.Edited. Jul 24, 2022 at 4:58