Prove that any nonempty open set of $\mathbb R$ is uncountable

I am having a little trouble trying to prove that any nonempty open set in $\mathbb{R}$ is uncountable. Here is what I have so far:

Let $A$ be a nonempty subset of $\mathbb{R}$. Then for each $x \in A$, there exists an open interval $I=(a,b)$ such that $x \in I \subseteq A$.
...
Since I is uncountable and $I \subseteq A$, it follows that $A$ is uncountable.

I am trying to fill in the ... by showing that the open interval $(a,b)$ is uncountable. I am familiar with Cantor diagonalization and I've used it to prove that $(0,1)$ is uncountable, but I am unsure of how to set up a Cantor diagonal when I don't know what the boundaries of the interval are. I've read suggestions on other questions to set up a bijection from $(0,1)$ to $(a,b)$ but I'm not sure how to go about that either.

Instead of setting up Cantor diagonalization on $A$, find a surjective map $\phi$ from $A$ to $(0,1)$.

To do this, just pick $x \in A$. It is an interior point, so there is an interval $(a,b)$ around $x$ which is contained in $A$.

Now, $\phi$ is easy to construct : note that any $c \in (a,b)$ is of the form $ta + (1-t)b$ for some $t \in (0,1)$ (that is, $c$ is somewhere between $a$ and $b$, and $t$ is a measure of how far it is from each one), so let $\phi(c) = t$. Finally, for any $d \in A \setminus (a,b)$, let $\phi(d) = \frac 12$.

EDIT : An explicit description of $\phi$ is $\phi(c) = \frac{c-a}{b-a}$.

It is easy to see that $\phi$ is surjective : in fact, just $\phi$ restricted to $(a,b)$ is surjective.

Now if $A$ were countable, then so is $(a,b)$, because $(a,b)$ is a subset of $A$. Let $\psi$ be a bijection from the natural numbers to $(a,b)$. Then $\phi|_{(a,b)} \circ \psi$ is a bijective map from $\mathbb N$ to $(0,1)$.

This is a contradiction, since $(0,1)$ is uncountable, so there cannot be a bijective map from $\mathbb N$ to $(0,1)$.

• NOTE : An edit has been made to confirm to the definition of countability. In particular, it is true that it is sufficient to show that there is no surjective map from $\mathbb N$ to $A$, but then I'd prefer to stick to definition. – астон вілла олоф мэллбэрг Mar 3 '18 at 4:02

Guide:

Can you construct a linear equation that connecting point $(0,a)$ and point $(1,b)$?

Once you can do that, verify that you have constructed a bijection from the set $(0,1)$ to the set $(a,b)$.

• It should be pointed out that $(0, a)$ and $(1, b)$ are to be considered elements of $\mathbb{R}^2$, not intervals in $\mathbb{R}$! – Theo Bendit Mar 3 '18 at 3:54
• ah, good point!! thanks. – Siong Thye Goh Mar 3 '18 at 3:54

Let the subset that you have been referring to be called $S$.

One possible definition of an open interval states: $\forall x \in S\;\exists \epsilon\in\mathbb{R}$ such that all $y$ for whom $y-x<\epsilon$ are also in the set $S$.

Now let $x$ be an arbitrary element of $S$. Then you could assert that there is some $y$, the difference of whose with $x$ is some $\epsilon$, meaning that $y = x+\epsilon$. Now consider $y$. You should be able to argue that for this $y$, belongingness to the set $S$ implies existence of yet another element $y'$, where $y' = y + \epsilon'$. Using inductive reasoning, you could show that this can go on endlessly (italicizing to highlight ironic choice of words).

The function $f(x) = \dfrac{x-a}{b-a}$ is a one-to-one correspondence between the interval $(a,b)$ and the interval $(0,1)$.

Therefore if some sequence $(x_n)_{n=1}^\infty$ contains every member of the interval $(a,b),$ then the sequence $(f(x_n))_{n=1}^\infty$ contains every member of the interval $(0,1),$ and you've already proved that is impossible.

If U is a not empty open subset of R,
then it is the union of open intervals.
Let I = (a,b) be one of those not empty intervals.
Since I is uncountable and I subset U, U is uncountable.