Prove that the interval $(0, 1)$ and the Cartesian product $(0, 1) \times (0, 1)$ have the same cardinality

Prove that the interval $(0, 1)$ and the Cartesian product $(0, 1) \times (0, 1)$ have the same cardinality
using the SB theorem?
Also how does one find a bijection on $f:(0, \infty) \to (0,1)$ such that they have the same cardiniality?

Solutions Collecting From Web of "Prove that the interval $(0, 1)$ and the Cartesian product $(0, 1) \times (0, 1)$ have the same cardinality"

Answer to second question (much easier):
Take for example $f(x)=e^{-x}$

Answer to first question:

There are some obvious injective functions from $(0,1)$ to $(0,1)\times(0,1)$, namely $f(x)=(\frac12,x)$, for example.
So the difficult part is finding an injective function from $(0,1)\times(0,1)$ to $(0,1)$. But it is not so difficult. In decimal expansions, let’s disallow infinite strings of $9$’s and we have an unique decimal expansion for each number in $(0,1)$. If we have two numbers like $0.a_1a_2a_3\ldots$ and $0.b_1b_2b_3\ldots$, we can “build” a number merging alternatively the digits of each one, so we define
$$f(0.a_1a_2a_3\ldots, 0.b_1b_2b_3\ldots)=0.a_1b_1a_2b_2a_3b_3\ldots$$

An injection $(0,1)\to(0,1)\times(0,1)$ is obvious; you nead an injection $(0,1)\times(0,1)\to(0,1).$

First, we have injections
$$(0,1)\to\mathcal P(\mathbb Q)\to\mathcal P(\mathbb N).\tag1$$
For the injection $(0,1)\to\mathcal P(\mathbb Q)$ use $x\mapsto\{q\in\mathbb Q:q\lt x\}.$

For the injection $\mathcal P(\mathbb Q)\to\mathcal P(\mathbb N),$ use the fact that $|\mathbb Q|=|\mathbb N|.$

Let $D=\{n\in\mathbb N:n\text{ is odd}\}$ and $E=\{n\in\mathbb N:n\text{ is even}\}.$ Then we have injections
$$(0,1)\times(0,1)\to\mathcal P(\mathbb N)\times\mathcal P(\mathbb N)\to\mathcal P(D)\times\mathcal P(E)\to\mathcal P(\mathbb N)\to(0,1).$$

For the injection $(0,1)\times(0,1)\to\mathcal P(\mathbb N)\times\mathcal P(\mathbb N)$ use (1).

For the injection $\mathcal P(\mathbb N)\times\mathcal P(\mathbb N)\to\mathcal P(D)\times\mathcal P(E)$ use the fact that $|D|=|E|=|\mathbb N|.$

For the injection $\mathcal P(D)\times\mathcal P(E)\to\mathcal P(\mathbb N)$ use $(X,Y)\mapsto X\cup Y).$

For the injection $\mathcal P(\mathbb N)\to(0,1)$ use
$$X\mapsto\frac14+\sum_{x\in X}\frac1{3^{x+1}}.$$

There is a bijection between $(0,1) $ and $ \left(-\frac{\pi}{2}, \frac{\pi}{2}\right) $ by the following map $$ x\mapsto \pi x-\frac{\pi}{2} $$ and $\tan(x)$ is a bijection between $\mathbb{R}$ and $ \left(-\frac{\pi}{2}, \frac{\pi}{2}\right) $. So we take the composition to get the bijection between $(0,1)$ and $\mathbb{R}.$ In the first answer you will get the bijection from $(0,1)\times (0,1) $ to $(0,1)$. The following link proved that cardinality of $\mathbb{R}$ and $\mathbb{R}^2$ are same. $(0,1)\times (0,1)$ ahs the same cardinaltiy as $\mathbb{R}^2.$ So $(0,1)$ and $(0,1)\times (0,1)$ have the same cardinality.

For the second part, $$ f(x)=\frac{x}{1+|x|},\ x\in (0,\infty) $$