This question already has an answer here:

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 Fischer Sep 28 '15 at 11:27

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    $\begingroup$ But $f(1)=1$, which is not in $[0,1)$. $\endgroup$ – gamma Sep 28 '15 at 4:08
  • $\begingroup$ Well that was a silly oversight. Thanks. $\endgroup$ – Mark Watson Sep 28 '15 at 4:12
  • 1
    $\begingroup$ 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.) $\endgroup$ – Martin Sleziak Sep 28 '15 at 6:16
  • $\begingroup$ Instead of a bijection, would you accept a pair of injections, one in each direction? $\endgroup$ – Eric Towers Sep 28 '15 at 7:50


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

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

  • $\begingroup$ This is really the same spirit as my answer... $\endgroup$ – Ian Sep 27 '15 at 23:29
  • $\begingroup$ @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. $\endgroup$ – Hurkyl Sep 27 '15 at 23:38
  • $\begingroup$ @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. $\endgroup$ – WetSavannaAnimal Sep 28 '15 at 1:39
  • 2
    $\begingroup$ @WetSavannaAnimalakaRodVance I like it better now that the first paragraph has been edited in. $\endgroup$ – 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$.

  • $\begingroup$ I am curious about what you think about the top answer? $\endgroup$ – Mark Watson Sep 27 '15 at 22:19
  • 1
    $\begingroup$ @MarkWatson It's equivalent to this one, it just gives you $A$ and the bijection from $A$ to $[0,1) \cap A$. $\endgroup$ – Ian Sep 27 '15 at 22:24
  • $\begingroup$ Would you mind taking a look at my edited question... I tried to find an alternative mapping. Thanks. $\endgroup$ – Mark Watson Sep 28 '15 at 3:08
  • 1
    $\begingroup$ @MarkWatson I think you send both $0$ and $1$ to $0$. $\endgroup$ – Ian Sep 28 '15 at 3:15
  • 1
    $\begingroup$ @MarkWatson Then where does $1$ go? It seems that you are sending $1$ to itself, which you cannot do. $\endgroup$ – Ian Sep 28 '15 at 4:03

Not the answer you're looking for? Browse other questions tagged or ask your own question.