# Thread: Countability of the interval (x,y) where x,y are in R

1. ## Countability of the interval (x,y) where x,y are in R

Statement to prove:
If x and y are in R (Real Number) and x<y, then the interval (x,y) contains countably many rational numbers and uncountably many irrational numbers.

The hint suggests me to use the following two theorems:
1. Q is dense in R. That means:
(i) if x and y are in R and x < y, there is an r in Q with x<r<y.
(ii) if x in R and epsilon >0, there is an r in Q with |x-r| < epsilon.
2. The interval (0,1) in R is uncountable.

My work so far:
1. First of all, note that since the interval (0,1) is a subset of R and it is uncountable by Theorem 2, then it implies that the whole real numbers system R is uncountable.
2. Now, lets consider in interval (x,y) such that x and y are in R and x<y.
3. Since (x,y) is a subset of R, then it is uncountable.
4. By Theorem 1(i), it implies that there is an r1 in Q such that x<r1<y.
Now, lets consider the interval (x,r1), which is a subset of (x,y). By reapplying Theorem 1(i), we know that there exists an r2 in Q such that x<r2<r1. Continue this process.
.....This is what I have so far. Up to this point, I am not sure how to conclude that there are countably many rational numbers by continuing this process.

Any help is greatly appreciated. Thanks again for reading my problem and your time

2. Originally Posted by anlys
Statement to prove:
If x and y are in R (Real Number) and x<y, then the interval (x,y) contains countably many rational numbers and uncountably many irrational numbers.

The hint suggests me to use the following two theorems:
1. Q is dense in R. That means:
(i) if x and y are in R and x < y, there is an r in Q with x<r<y.
(ii) if x in R and epsilon >0, there is an r in Q with |x-r| < epsilon.
2. The interval (0,1) in R is uncountable.

My work so far:
1. First of all, note that since the interval (0,1) is a subset of R and it is uncountable by Theorem 2, then it implies that the whole real numbers system R is uncountable.
2. Now, lets consider in interval (x,y) such that x and y are in R and x<y.
3. Since (x,y) is a subset of R, then it is uncountable.
4. By Theorem 1(i), it implies that there is an r1 in Q such that x<r1<y.
Now, lets consider the interval (x,r1), which is a subset of (x,y). By reapplying Theorem 1(i), we know that there exists an r2 in Q such that x<r2<r1. Continue this process.
.....This is what I have so far. Up to this point, I am not sure how to conclude that there are countably many rational numbers by continuing this process.

Any help is greatly appreciated. Thanks again for reading my problem and your time
I don't like how 3 reads, $(x,y)$ is not uncountable because it's a subset of $\mathbb{R}$ but because there is a bijection $f0,1) \longrightarrow (x,y)" alt="f0,1) \longrightarrow (x,y)" /> and $(0,1)$ is uncountable (You give that $f$).
In four you have the right idea, just continue that process and take the sequence $(r_i)_{i \in \mathbb{N}}$ and take $g: \mathbb{N} \longrightarrow \mathbb{Q} \cap (x,y)$ where $g(i)=r_i$ then $g$ is an injection and so $\vert \mathbb{Q} \cap (x,y) \vert \geq \vert \mathbb{N} \vert$ but $\vert \mathbb{Q} \cap (x,y) \vert \leq \vert \mathbb{Q} \vert = \vert \mathbb{N} \vert$ and so $\vert \mathbb{Q} \cap (x,y) \vert = \vert \mathbb{N} \vert$.

For the cardinality of the irrationals, use this theorem (if you haven't seen it, try to prove it, it's not difficult):
If $A \subset B$ where $B$ and $B-A$ are infinite and $A$ is countable then $\vert B \vert = \vert B-A \vert$

3. I hesitate to jump into the middle of your proof.

You know that all open intervals are equivalent so we work with $(0,1)$.
You realize that $\left( {0,1} \right) = \bigcup\limits_{n = 1}^\infty {\left[ {\frac{1}{{n + 1}},\frac{1}{n}} \right)}$ that is the union of a countable collection of pair-wise disjoint sets.
Each of those sets contains a rational number.
So $(0,1)$ contains a countable collection of rational numbers.

But $(0,1)$ is also uncountable so $(0,1)\setminus \mathbb{Q}$ must be uncountable.

4. Originally Posted by Jose27
I don't like how 3 reads, $(x,y)$ is not uncountable because it's a subset of $\mathbb{R}$ but because there is a bijection $f0,1) \longrightarrow (x,y)" alt="f0,1) \longrightarrow (x,y)" /> and $(0,1)$ is uncountable (You give that $f$).
In four you have the right idea, just continue that process and take the sequence $(r_i)_{i \in \mathbb{N}}$ and take $g: \mathbb{N} \longrightarrow \mathbb{Q} \cap (x,y)$ where $g(i)=r_i$ then $g$ is an injection and so $\vert \mathbb{Q} \cap (x,y) \vert \geq \vert \mathbb{N} \vert$ but $\vert \mathbb{Q} \cap (x,y) \vert \leq \vert \mathbb{Q} \vert = \vert \mathbb{N} \vert$ and so $\vert \mathbb{Q} \cap (x,y) \vert = \vert \mathbb{N} \vert$.

For the cardinality of the irrationals, use this theorem (if you haven't seen it, try to prove it, it's not difficult):
If $A \subset B$ where $B$ and $B-A$ are infinite and $A$ is countable then $\vert B \vert = \vert B-A \vert$
Hi Jose27,
Thanks for your reply. How do we prove there's a bijection f: (0,1)-->(x,y)? And to prove the theorem for the cardinality of the irrationals, is this is we prove it:
Since B-A is a subset of B, then |B-A| <= |B|. But how do we prove that |B-A| >= |B| so that we can reach the equal relationship?

5. Originally Posted by Plato
I hesitate to jump into the middle of your proof.

You know that all open intervals are equivalent so we work with $(0,1)$.
You realize that $\left( {0,1} \right) = \bigcup\limits_{n = 1}^\infty {\left[ {\frac{1}{{n + 1}},\frac{1}{n}} \right)}$ that is the union of a countable collection of pair-wise disjoint sets.
Each of those sets contains a rational number.
So $(0,1)$ contains a countable collection of rational numbers.

But $(0,1)$ is also uncountable so $(0,1)\setminus \mathbb{Q}$ must be uncountable.
Hello Plato,
Your idea is very helpful, thanks. Is this sufficient to conclude that it's also true for any (x,y) in R?

6. Originally Posted by anlys
Your idea is very helpful, thanks. Is this sufficient to conclude that it's also true for any (x,y) in R?
Well of course it is sufficient.
Given any open interval $(x,y)$ there is a bijection with $(0,1)$.

7. Originally Posted by anlys
Hi Jose27,
Thanks for your reply. How do we prove there's a bijection f: (0,1)-->(x,y)? And to prove the theorem for the cardinality of the irrationals, is this is we prove it:
Since B-A is a subset of B, then |B-A| <= |B|. But how do we prove that |B-A| >= |B| so that we can reach the equal relationship?
Let $fx,y) \longrightarrow (0,1)" alt="fx,y) \longrightarrow (0,1)" /> such that $f(t)= \frac{y-t}{y-x}$ I'll let you prove it is indeed a bijection.

Let $A= \{a_1,a_2,... \}$ and $C \subset B-A$ where $C= \{c_1,c_2,... \}$ (Remember that any infinite set has a countable subset) Let $g:B \longrightarrow B-A$ be such that $g(x)=x$ if $x \in B-A$ and $g(x)= c_i$ if $x=a_i \in A$. I'll leave it to you to check this $g$ works.

8. Originally Posted by Jose27
Let $fx,y) \longrightarrow (0,1)" alt="fx,y) \longrightarrow (0,1)" /> such that $f(t)= \frac{y-t}{y-x}$ I'll let you prove it is indeed a bijection.

Let $A= \{a_1,a_2,... \}$ and $C \subset B-A$ where $C= \{c_1,c_2,... \}$ (Remember that any infinite set has a countable subset) Let $g:B \longrightarrow B-A$ be such that $g(x)=x$ if $x \in B-A$ and $g(x)= c_i$ if $x=a_i \in A$. I'll leave it to you to check this $g$ works.
Oh, I understand it now. It makes sense to me now. Thanks so much for your help, Jose27. I couldn't have done it without your help

9. Originally Posted by Plato
Well of course it is sufficient.
Given any open interval $(x,y)$ there is a bijection with $(0,1)$.
You're right, Plato. There's a bijection between (x,y) and (0,1). Thanks again for your feedback.