# Why does this bijection from R2 to R not work?

Consider (x,y) in R2 with x,y both in (0,1). Write x as some decimal $x=0 .a_1a_2a_3...$ and $y=0.b_1b_2b_3b_4...$

Now, write z in R as $a_1b_1a_2b_2a_3b_3...$.

If y and x are both finite, pad the one of lower length with zeros until they are of the same length. If x is finite and y is infinite, pad x with infinite zeros.

This is a bijection because each x, y maps uniquely onto some x in R, and from each x one can derive x,y.

• For one thing, you are neglecting to recognize that real numbers can have multiple decimal representations like how $1=0.9999\overline{9}\cdots$ – JMoravitz May 22 '18 at 21:35
• Adding to @JMoravitz, the error is when you claim that "$x,y$ maps uniquely onto some $x$ in $\mathbb{R}$". If this is true, then $1$ and $.999\ldots$ don't map to the same thing and so the map is not well defined. If it's not true, then it's not a bijection. – TSF May 22 '18 at 21:38
• @ThePortakal that is clearly an oversight/typo on the OP's part. It is clear that the intention is to have a decimal point at the beginning. – JMoravitz May 22 '18 at 21:39
• If you're in $(0,1)$, then $0.399\overline{9}=0.4$. – Alex R. May 22 '18 at 21:42
• In other words, which $(x,y)$ maps to $0.31\overline{90}$ and which maps to $0.41$? – Hagen von Eitzen May 22 '18 at 21:43

## 1 Answer

The straightforward digit-interleaving you describe is not surjective. The numbers $$\frac{227}{660} = 0.34393939\ldots \qquad\text{and}\qquad \frac{233}{660} = 0.35303030\ldots$$ cannot both be in the range, because the only pair that can map to either is $(\frac13,\frac12)$.

A trick sometimes used to get around this is to interleave not single digits, but "blocks", where a block consists of any finite number (possibly zero) of $9$s, followed by a digit that differs from $9$. There is exactly one way to represent each number in $[0,1)$ as an infinite sequence of blocks, so interleaving the blocks does produce an actual bijection $[0,1)^2\to[0,1)$.