Why is the open Set $(0,1)$ equivalent to the closed set $[0,1]$

analysiselementary-set-theoryreal numbers

I understand the proof based on ordering $[0,1]$ into a set $A$ of distinct points that include $0$ and $1$ and then showing the one-to-one equivalence to $(0,1)$, but what I can't get my head around is that from a non-mathematical view, it is clear that $[0,1]$ contains precisely $2$ more elements than $(0,1)$?

I expect it has something to do with cardinality, and I get the basic concepts of equivalence and cardinality, but still trying to wrap my head around this question. I’m comfortable with the equivalence of $[0,1]$ to $[0,2]$ for example.

This question is very similar but slightly different to this one: Are all infinities equal?

I am specifically looking at the equivalence between open and closed sets. For example, if I map every element $x\in (0,1)$ to every element $y \in[0,1]$ such that $x = y$ then I will be left with two extra elements in $[0,1]$. To me, this breaks one-to-one correspondence in how its typically interpreted, however I can see that it does not actually break the definition if we follow it to the strict letter since the idea of leftover elements does not factor into the definition: https://en.m.wikipedia.org/wiki/Bijection

I’m definitely in the wrong here but I’m trying to understand the intuition.

Best Answer

The open set $A=\{x|x\in \mathbb{R},0<x<1\}$ and the closed set $B=\{x|x\in \mathbb{R},0\le x \le 1\}$, are distinct sets. One is strictly a subset of the other, and yes $B-A=\{0,1\}$. This can be true despite having the same cardinality.

It turns out it is impossible to have a continuous bijection from a closed set to an open set, but there are non-continuous ones. We have a finite number of elements we need to add. I'm sure you've seen the "Hilbert hotel" trick of sliding everyone down to fit one more element in. So all we need to do is select two "countably infinite" subsets, and slide them down one.

$$f : [0,1] \rightarrow (0,1)$$ where f(0) = 1/2, f(1) = 1/3,
if $x=2^{-n}$ for some integer $n>0$ then: $f(x) = x/2$,
if $x=3^{-n}$ for some integer $n>0$ then: $f(x) = x/3$,
else $f(x) = x$

While not continuous, this is invertible, therefore providing a bijection between [0,1] and (0,1).