Intervals in the real numbers and cardinality - are they infinite? 
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. 

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)$.
