# Explicit bijection $f:\Bbb R\times\Bbb R\to\Bbb R$ [duplicate]

I am right now preparing for a set theory exam and found one exercise in an old exam which I was not really able to solve in the intended way. The task was the following:

Define an explicit bijection $$f:\Bbb R\times\Bbb R\to\Bbb R$$

I know that

$$\vert\Bbb R\times\Bbb R\vert = \vert 2^{\Bbb N}\times 2^{\Bbb N}\vert = \vert 2^{A\cup B} \vert = \vert 2^{\Bbb N}\vert = \vert\Bbb R\vert$$ with A, B disjoint countable sets

and you can probably get a bijective function by going over these steps and link the functions afterwards but I would be very glad for a help with a more direct approach.

Hint: first use $$arctan$$ to show that there are bijections from $$\mathbb R \times \mathbb R$$ to $$(0,1) \times (0,1)$$ and $$(0,1)$$ to $$\mathbb R$$. So it is enough to find a bijection from $$(0,1) \times (0,1)$$ to $$(0,1)$$. Use expansion to base $$2$$. Any number between $$0$$ and $$1$$ has a uniuqe expansion $$\sum \frac {a_i} {2^{i}}$$ with $$a_i \in \{0,1\}$$ and $$a_n=0$$ for infinitely many $$n$$. Use the map $$(a_n) \to (a_{2n},a_{2n-1})$$.
• I'm not sure that works. It's not necessarily true that infinitely many $a_{2n}$ are $0$ so it's not clear (at least to me) that this is necessarily a bijection. Could you elaborate? – Robert Shore Jul 2 '19 at 0:30
• The expansion is unique except for the fact that some numbers have two expansions like: $\frac 1 2 =\sum_{n=2}^{\infty} \frac 1 {2^{n}}$. In the sum here $a_n=1$ after some stage. If you avoid this by insisting that $a_n=0$ for infinitely many $n$ then you get a unique expansion for each number. – Kavi Rama Murthy Jul 2 '19 at 0:33
• 1. I think his comment was rather considering the bijection betweeen $(0,1) \times (0,1)$ and $(0,1)$ and not the explicity of the expansion. I also now saw that there is a post regarding this topic math.stackexchange.com/questions/183361/… – claimes Jul 2 '19 at 0:47
• 2. While I see both from your answer and the one I just posted that there exists also a explicit bijection I am not sure whether this would fit the task as e.g. the transition between a number $x \in (1,0)$ and the extension as a sum is still not really explicit. Also the whole explanation in the linked solution seems not really adequate for a task which should take 15 minutes maximum in the exam. I am still thankful for your help. – claimes Jul 2 '19 at 0:55
• @claimes Just so. It's not clear to me that the final map in this answer really is a bijection because you can end up with a sequence of all $1$s as the first coordinate. – Robert Shore Jul 2 '19 at 1:14