The strategy is to create two injections then apply the Cantor-Berstein Theorem to show their equivalence. Let $\mathbb R$ denote the set of real numbers.

The first injection is $g: \mathbb R\to\mathbb R\times\mathbb R$ given by $h(x)=(x,x),$ where you prove injectivity.

Then the second injection is $f:(0,1)\times(0,1)\to(0,1)$ be defined as $(x,y)$ is an element of $(0,1)\times(0,1),$ we write $x=0.x_1x_2x_3\ldots$ and $y=y_1y_2\ldots$ and have $f(x,y)=0.x_1y_1x_2y_2\ldots,$ how do you prove this is injective?

Then relate $f$ to $R≅(0,1)$ to get the injective function for $\mathbb R\times\mathbb R\to\mathbb R$.

Then you can conclude with the CSB theorem.

  • $\begingroup$ what is $R$, is $x$ the cartesian product, is $\cong$ an equivalence class on cardinality? $\endgroup$ Commented Nov 28, 2017 at 0:57
  • $\begingroup$ please add that to your question. $\endgroup$ Commented Nov 28, 2017 at 0:59
  • 1
    $\begingroup$ For that matter, what is your question? I see that modulo a question mark, you would like to know how to prove the second construction is injective... is that it? $\endgroup$ Commented Nov 28, 2017 at 1:01
  • 1
    $\begingroup$ The second injection is subtle to define; the problem is that decimal expansions are slightly non-unique, e.g. $0.1999 \dots = 0.2$, and so $f$ as currently defined is not actually a well-defined function. So you need to make some choices here, and then check that those choices maintain injectivity. Another option is to show that $\mathbb{R} \cong 2^{\mathbb{N}}$; the argument with $2^{\mathbb{N}}$ is straightforward and doesn't run into this subtlety. $\endgroup$ Commented Nov 28, 2017 at 1:07
  • 1
    $\begingroup$ A bit of an overkill that is nonetheless fun: $\mathbb R$ and $\mathbb R\times \mathbb R$ are both vector spaces over $\Q$ with cardinality $2^\aleph_0$, so therefore they are isomorphic as $\Q$-vector spaces, and thus bijective as sets (and isomorphic as additive abelian groups!) $\endgroup$
    – ASKASK
    Commented Nov 28, 2017 at 1:48

2 Answers 2


The map $f$ is injective.

Let $x$ have decimal expansion $.x_1x_2x_3\dots$
Let $x^{`}$ have decimal expansion $.x_1^{`}x_2^{`}x_3^{`}\dots$
Let $y$ have decimal eypansion $.y_1y_2y_3\dots$
Let $y^{`}$ have decimal eypansion $.y_1^{`}y_2^{`}y_3^{`}\dots$

For the purpose of standardization, assume that none of these expansions trail off with $999\dots's$ (in the open interval $(0,1)$, this is no easier said than done), and then of course $f$ is well-defined and the form of $f(x,y)$ does not trail off with $999\dots's$ either.

If $x \ne x^{`}$ then $x_k \ne x_k^{`}$ for some $k$.

So $f(x,y) \ne f(x^{`},y^{`})$.

Exercise: Complete this sketchy argument to show that $f$ is injective.

Note that the function $f:(0,1)\times(0,1)\to(0,1)$ i̶s̶ ̶a̶l̶s̶o̶ ̶s̶u̶r̶j̶e̶c̶t̶i̶v̶e̶.̶

  • $\begingroup$ "eypansion" haha, what are the implications of surjectivity, does that mean an explicit bijection could have solved the problem? Im working on the second injective function now. $\endgroup$
    – Ben French
    Commented Nov 28, 2017 at 1:44
  • $\begingroup$ Yea, you already know that the open interval $(0,1)$ is equipotent to $\mathbb R$, so you can flip a coin to decide how to proceed. $\endgroup$ Commented Nov 28, 2017 at 1:58
  • $\begingroup$ On second thought, surjectivity might not be so easy (or even true). What maps to $.9191919191\dots$? $\endgroup$ Commented Nov 28, 2017 at 2:16

$\mathbb N^\mathbb N$ can be mapped one-to-one to $\mathbb R$ via this construction $\require{AMScd}$ \begin{CD} \mathbb N^\mathbb N @>\text{encoding}>> \mathcal B @>\text{binary dev}>> [0,1[ @>\phi>> ]0,1[ @>2x-1>> ]-1,1[ @>\mathrm{argth}>> \mathbb R \end{CD}

Where $\begin{cases}\phi(0)=\frac12,\phi(\frac12)=\frac14,\phi(\frac14)=\frac18,..,\phi(\frac1{2^n})=\frac1{2^{n+1}}\quad \mathrm{for}\ n\in\mathbb N \\ \phi(x)=x\quad \mathrm{elsewhere}\end{cases}$

Binary sequences with no trailing $1$, we call them $\mathcal B$, can be mapped one-to-one to $[0,1[$ via the binary developpement $x=\mathtt{0,\overline{b_0b_1b_2...}}$

And we can encode sequences of naturals $(u_n)_n\in\mathbb N^\mathbb N$ to $\mathcal B$ this way: $\underbrace{11...1}_{u_0 \text{ times } 1}0\underbrace{11...1}_{u_1 \text{ times } 1}0\underbrace{11...1}_{u_2 \text{ times } 1}0\cdots$

[rem: if $u_i=0$ we simply encode by $0$ ]

The details are given in this post, there are other possible encodings from $\mathbb N^\mathbb N$ to $\mathcal B$ (see for instance the one given by Q the platypus).

Encode each $n_1,n_2,n_3,...∈N^N$ by an infinite sequence of 0s and 1s with infinitely many 0s, and give a proof that $N^N$ is equinumerous with $R$.

Now, with this bijection in the pocket it becomes easy to map $\mathbb R^k\mapsto \mathbb R$ because it is essentially interleaving $k$ sequences of integer numbers $(\mathbb N^\mathbb N)^k\mapsto\mathbb N^\mathbb N$ and then encoding the newly built sequence into $\mathcal B$ like previously.

  • 1
    $\begingroup$ interesting solution. $\endgroup$
    – Ben French
    Commented Nov 28, 2017 at 4:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .