# open and closed intervals have the same cardinality

###### Proposition.

The sets of real numbers $[0,1]$, $[0,1)$, $(0,1]$, and $(0,1)$ all have the same cardinality.

We give two proofs of this proposition.

###### Proof.

Define a map $f:[0,1]\to[0,1]$ by $f(x)=(x+1)/3$. The map $f$ is strictly increasing, hence injective. Moreover, the image of $f$ is contained in the interval $[\frac{1}{3},\frac{2}{3}]\subsetneq(0,1)$, so the maps $f_{r}:[0,1]\to[0,1)$ and $f_{o}:[0,1]\to(0,1)$ obtained from $f$ by restricting the codomain are both injective. Since the inclusions into $[0,1]$ are also injective, the Cantor-Schröder-Bernstein theorem (http://planetmath.org/SchroederBernsteinTheorem) can be used to construct bijections $h_{r}:[0,1]\to[0,1)$ and $h_{o}:[0,1]\to(0,1)$. Finally, the map $r:(0,1]\to[0,1)$ defined by $r(x)=1-x$ is a bijection.

Since having the same cardinality is an equivalence relation, all four intervals have the same cardinality. ∎

###### Proof.

Since $[0,1]\cap\mathbb{Q}$ is countable, there is a bijection $a:\mathbb{N}\to[0,1]\cap\mathbb{Q}$. We may select $a$ so that $a(0)=0$ and $a(1)=1$. The map $f:[0,1]\cap\mathbb{Q}\to(0,1)\cap\mathbb{Q}$ defined by $f(x)=a(a^{-1}(x)+2)$ is a bijection because it is a composition of bijections. A bijection $h:[0,1]\to(0,1)$ can be constructed by gluing the map $f$ to the identity map on $(0,1)\setminus\mathbb{Q}$. The formula for $h$ is

 $h(x)=\begin{cases}f(x),&x\in\mathbb{Q}\\ x,&x\notin\mathbb{Q}.\end{cases}$

The other bijections can be constructed similarly. ∎

The reasoning above can be extended to show that any two arbitrary intervals in $\mathbb{R}$ have the same cardinality.

Title open and closed intervals have the same cardinality OpenAndClosedIntervalsHaveTheSameCardinality 2013-03-22 15:43:32 2013-03-22 15:43:32 mps (409) mps (409) 8 mps (409) Result msc 26A03 msc 03E10