Bijection between $\mathbb R^2$ and $(0,1)$

[TIFR GS-2013, Part D] Does there exist any bijection between $$\mathbb R^2$$ and the open interval $$(0,1)$$ ??

At the first glimpse, I thought about the function $$f: \mathbb R^2 \to (0,1)$$ defined by $$f(x,y) = {0.2}^{x}{0.3}^{y}$$. But then I realized that the preimage of any element in $$(0,1)$$ may not be unique. Here I am stuck with finding any example. Any help would be appreciated.

The simple answer is yes because both sets have the cardinality of the continuum. You were not asked to supply a bijection. Coming up with an explicit one is hard, but proving one exists is not too bad. First we can biject $$\Bbb R^2$$ with $$(0,1) \times (0,1)$$. Then for a point $$(x,y)$$ in the unit square, express $$x$$ and $$y$$ in binary, using the terminating version if the number has two representations. Then form $$z$$ by alternating the digits of $$x$$ and $$y$$. This is not quite surjective because numbers like $$0.1y1y1y1y1y1y\ldots$$ where the $$y$$s are a mix of $$0$$s and $$1$$s have no preimage, but it is injective. Now note you can inject $$(0,1)$$ into the square and use Schroeder-Bernstein to assert a bijection.
• The above constructs the function in a number of steps. Schroeder-Bernstein is a constructive proof in that it defines the function explicitly. That doesn't mean there is a nice formula for it but if you choose the bijection between $\Bbb R^2$ and $(0,1)^2$ you can (in theory) follow through the proof and find the image of any point $(x,y)$ or the inverse image. I don't think there is a bijection with a nice formula. – Ross Millikan Sep 21 '18 at 4:46