# open and closed intervals have the same cardinality

###### Proposition.

The sets of real numbers $\mathrm{[}\mathrm{0}\mathrm{,}\mathrm{1}\mathrm{]}$, $\mathrm{[}\mathrm{0}\mathrm{,}\mathrm{1}\mathrm{)}$, $\mathrm{(}\mathrm{0}\mathrm{,}\mathrm{1}\mathrm{]}$, and $\mathrm{(}\mathrm{0}\mathrm{,}\mathrm{1}\mathrm{)}$ 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}]\u228a(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{array}{cc}f(x),\hfill & x\in \mathbb{Q}\hfill \\ x,\hfill & x\notin \mathbb{Q}.\hfill \end{array}$$ |

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 |
---|---|

Canonical name | OpenAndClosedIntervalsHaveTheSameCardinality |

Date of creation | 2013-03-22 15:43:32 |

Last modified on | 2013-03-22 15:43:32 |

Owner | mps (409) |

Last modified by | mps (409) |

Numerical id | 8 |

Author | mps (409) |

Entry type | Result |

Classification | msc 26A03 |

Classification | msc 03E10 |