# Why any open set of $\mathbb{R}$ is the countable union of disjoint intervals.

Every nonempty set in $\mathbb{R}$ is the countable union of open intervals.

I read the following proof, but I still want to know why either the $I_q$'s are the same or are disjoint. If someone could provide a nice explanation it would be greatly appreciated.

The following is the proof I found on this page - Any open subset of $\Bbb R$ is a at most countable union of disjoint open intervals. [Collecting Proofs]

Let $U \subseteq R$ be open and let $x \in U$. Either $x$ is rational or irrational. If $x$ is rational, define \begin{align}I_x = \bigcup\limits_{\substack{I\text{ an open interval} \\ x~\in~I~\subseteq~U}} I,\end{align} which, as a union of non-disjoint open intervals (each $I$ contains $x$), is an open interval subset to $U$. If $x$ is irrational, by openness of $U$ there is $\varepsilon > 0$ such that $(x - \varepsilon, x + \varepsilon) \subseteq U$, and there exists rational $y \in (x - \varepsilon, x + \varepsilon) \subseteq I_y$ (by the definition of $I_y$). Hence $x \in I_y$. So any $x \in U$ is in $I_q$ for some $q \in U \cap \mathbb{Q}$, and so \begin{align}U \subseteq \bigcup\limits_{q~\in~U \cap~\mathbb{Q}} I_q.\end{align} But $I_q \subseteq U$ for each $q \in U \cap \mathbb{Q}$; thus \begin{align}U = \bigcup\limits_{q~\in~U \cap~\mathbb{Q}} I_q, \end{align} which is a countable union of open intervals.

Here $I_x$ is defined as the union of all open intervals in $U$ containing $x$ (the universal quantifier is not explicitly mentioned in the notation, which could be the source of the confusion). Therefore the intervals $I_x$ are by definition maximal. If two of them overlap then they are necessarily the same, since otherwise they would not be maximal.
• I see. So if lets say $I_x$ and $I_y$ overlap, then $x\in I_y$, so $I_y$ would already be included in the union which makes up $I_x$. So, $I_y \subseteq I_x$. We could make the same argument by switching $x$'s and $y$'s and we would have equality. Nice. – Sarah Jan 20 '14 at 14:53
You wonder why for $a,b\in\mathbb Q$ we have either $I_a=I_b$ or $I_a\cap I_b=\emptyset$. Assume $I_a\cap I_b\ne\emptyset$ and $x\in I_a\cap I_b$. Then $x\in I_a, I_b$ implies $I_a\subseteq I_x$. Then $a\in I_a\subseteq I_x$ implies $I_x\subseteq I_a$, hence $I_x=I_a$. By the same argument $I_x=I_b$, i.e. $I_a=I_b$.