# Find a bijective mapping that shows that [0,1] and [0,1) have the same cardinality [duplicate]

I need to show that the two sets $[0,1]$ and $[0,1)$ have the same cardinality. I know that in order to show this I must show that there exists $f$ such that $f:[0,1]\to[0,1),$ but I am not sure how to proceed.

Any help would be appreciated. Thanks.

## marked as duplicate by Andrés E. Caicedo, Empty, Servaes, Martin Sleziak, Daniel FischerSep 28 '15 at 11:27

• But $f(1)=1$, which is not in $[0,1)$. – gamma Sep 28 '15 at 4:08
• Well that was a silly oversight. Thanks. – Mark Watson Sep 28 '15 at 4:12
• This seems to be a duplicate of this question or this question. It is very similar to this one and you can also have a look at other posts linked there. (I voted to close as a duplicate.) – Martin Sleziak Sep 28 '15 at 6:16
• Instead of a bijection, would you accept a pair of injections, one in each direction? – Eric Towers Sep 28 '15 at 7:50

Define:

$$f(x)=\begin{cases} \frac{1}{1+n}, & \text{if x = \frac{1}{n} , n \in \mathbb{N} }.\\ x , & \text{otherwise}. \end{cases}$$

• Sorry, but what is n? – Mark Watson Sep 27 '15 at 22:09
• Sorry, I should have mentioned $n \in \mathbb{N}$ , I hope its clear now. – gamma Sep 27 '15 at 22:10
• This $f$ would not be unique, would it? I imagine there are other bijections, correct? – Mark Watson Sep 27 '15 at 22:19
• Yes, $f$ is not unique. – gamma Sep 27 '15 at 22:21
• @MarkWatson There are an infinite number of bijections. – PyRulez Sep 28 '15 at 3:12

These sorts of things often boil down to using the fact that there is a bijection between the nonnegative integers and the positive integers, allowing you to shift everything over by one to make room for an extra point (e.g. the Hilbert hotel paradox); you just need to find a suitable copy of $\mathbb{N}$ in the problem.

In fact, we can completely characterize the bijections:

Lemma: every bijection between $[0,1]$ and $[0,1)$ can be uniquely expressed as:

• An injection $g : \mathbb{N} \to [0,1)$
• A bijection $h : [0,1) \setminus g(\mathbb{N}) \to [0,1) \setminus g(\mathbb{N})$

and conversely, given such data, there there is a corresponding bijection

$$f : [0,1] \to [0,1) : x \mapsto \begin{cases} g(0) & x = 1 \\ g(g^{-1}(x) + 1) & x \in g(\mathbb{N}) \\ h(x) & x \in [0,1) \setminus g(\mathbb{N})\end{cases}$$

• This is really the same spirit as my answer... – Ian Sep 27 '15 at 23:29
• @Ian: Well, every answer is ultimately going to boil down to "write $[0,1) \cong A \cup \mathbb{N}" so there is a limit on how much variation is available. I find my presentation somewhat more transparent, otherwise I wouldn't have bothered posting. – Hurkyl Sep 27 '15 at 23:38 • @Ian Indeed. But I do like the intuition presented in the first paragraph. Especially for the level of the question, when these concepts can seem bizzare. A variety of presentations of the same notions is a good idea: different people will find different presentations more in tune with their way of thinking. – WetSavannaAnimal Sep 28 '15 at 1:39 • @WetSavannaAnimalakaRodVance I like it better now that the first paragraph has been edited in. – Ian Sep 28 '15 at 1:41 Suppose$A \subset [0,1]$is countably infinite and$1 \in A$. Then$[0,1] \setminus A=[0,1) \setminus A$. So the identity function, call it$f$, is a bijection from$[0,1] \setminus A$to$[0,1) \setminus A$. Can you define a bijection, call it$g$, from$A$to$[0,1) \cap A$? Once you have done that, $$h(x)=\begin{cases} g(x) & x \in A \\ f(x) & x \not \in A \end{cases}$$ is a bijection from$[0,1]$to$[0,1)$. A hint for constructing$g$: consider enumerating$A$as a sequence$\{ x_n \}_{n=1}^\infty$with$x_1=1$. • I am curious about what you think about the top answer? – Mark Watson Sep 27 '15 at 22:19 • @MarkWatson It's equivalent to this one, it just gives you$A$and the bijection from$A$to$[0,1) \cap A$. – Ian Sep 27 '15 at 22:24 • Would you mind taking a look at my edited question... I tried to find an alternative mapping. Thanks. – Mark Watson Sep 28 '15 at 3:08 • @MarkWatson I think you send both$0$and$1$to$0$. – Ian Sep 28 '15 at 3:15 • @MarkWatson Then where does$1$go? It seems that you are sending$1\$ to itself, which you cannot do. – Ian Sep 28 '15 at 4:03