# Intervals in the real numbers and cardinality - are they infinite? [duplicate]

Possible Duplicate:
Bijection between an open and a closed interval

I'm a little confused, maybe i'm over thinking something so basic. But a closed interval [a,b] of real numbers has an infinite number of elements, correct? And the same goes for (a,b)? Then, [a,b] has the same cardinality as (a,b)?

Thanks.

-

## marked as duplicate by Asaf Karagila, Marvis, Phira, Norbert, Douglas S. StonesOct 31 '12 at 10:39

Not if $a=b{}{}$ – wj32 Oct 30 '12 at 22:38
Yes, you are correct (provided a < b). But "infinite" is a bit of an understatement: they each have uncountably many elements. (i.e. there are countably infinite ($\mathbb{Z}$) sets and uncountably infinite (e.g. $\mathbb{R}$) sets. Each of the intervals you give have the same cardinality as the set of Reals. – amWhy Oct 30 '12 at 22:40
All of your statements are correct provided that $a<b$. – Brian M. Scott Oct 30 '12 at 22:40
This is at least one amongst a myriad of duplicates. – Asaf Karagila Oct 30 '12 at 22:47
Thank you. I was a little confused because my instructor said "finite intervals" when describing them. – Alti Oct 30 '12 at 22:55

Yes, they have same cardinality. For convenience, here is a bijection $[0,1]\to[0,1)$:

$$f(x)=\begin{cases}\frac1{n+1}&\text{if }x=\frac1n\text{ for some }n\in\mathbb N\\x&\text{otherwise}\end{cases}$$

Then

$$g(x)=f(1-f(x))$$ is a bijection $[0,1]\to(0,1)$.

-

Yes, just as the integers greater than 0 have the same cardinality as the integers greater than 1. Deleting a finite number of elements from any infinite set doesn't change its cardinality. In this case we can find an explicit bijection. Define $f(x): [0,1) \to (0,1)$ as follows: If $x \ne 0, \frac 1{3^k}, f(x)=x \\ f(0)=\frac 13 \\f(\frac 1{3^k})=\frac 1{3^{k+1}}$

You can do the same at the other end.

-