Bijective Mapping Between $\mathbb{R}$ and $\mathbb{R}\setminus\{0\}$

elementary-set-theoryreal-analysis

I am looking to show that these two sets have the same cardinality. I know that since $\mathbb{R}$ is infinite, $\mathbb{R}\setminus\{0\}$ must also be infinite as we have just taken a finite number of elements out (really just the one). Nevertheless, I want to formalize this by finding a bijective mapping between the two and just can't seem to figure out what it would be. Are there any simple examples?

Best Answer

Simply define $f(x) = \begin{cases}x + 1, \text{if } x \in \Bbb N;\\x, \text{else.}\end{cases}$, where $\Bbb N = \{0, 1, 2, \dots\}$ is the set of non-negative integers.

Then $f$ is a bijection from $\Bbb R$ to $\Bbb R\backslash \{0\}$.