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

-

1
Not if $a=b{}{}$ – wj32 Oct 30 '12 at 22:38

1
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

1
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

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

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

## 2 Answers

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.

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 8, "mathjax_display_tex": 2, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9416680932044983, "perplexity_flag": "middle"}