# Prove that any open set of $\mathbb{R}^n$ is a countable union of open $n$-rectangles

I am stuck in proving two parts of this proof.

Let $$U$$ be the open set in question. Then, for all $$x \in U$$, since $$U$$ is open in $$\mathbb{R}^n$$, we can build an open ball $$B(r,x)$$ around $$x$$ with $$r>0$$, and construct an $$n$$-rectangle denoted $$R_x = (a_1,b_1)\times \cdots \times (a_n,b_n)$$ contained inside $$B(r,x)$$ where $$a_i, b_i \in \mathbb{Q}$$ for all $$i \in [n]$$ since $$\mathbb{Q}$$ is dense in $$\mathbb{R}$$.

One part I have problems with is how can I rigorously prove that

$$\bigcup_{x\in U} R_x = U$$

and that there is a countable number of rectangles using the fact that all my points $$a_i,b_i$$ are rational?

Thank you!

• For all $x$ $R_x \subset U$, then $\cup R_x \subset U$. And there is at most countably many of $R_x$s – dEmigOd Jan 25 at 8:54
• I already stated that in my question. My problem is how to prove it? Or is it evident with what I've got already? – The Bosco Jan 25 at 9:00
• $\forall x \in U \exists R_x : x \in R_x \Rightarrow \forall x \in U x \in \cup R_x \Rightarrow U \subset \cup R_x$ - this gives the equality. Countability comes from knowing the cardinality of $\mathbb{Q}^n$ – dEmigOd Jan 25 at 9:02
• but for example, in $\mathbb{R}$ you could argue this because the subset $U$ is a disjoint countable union of intervals. Therefore, you could argue that each one of them has a unique rational number, but you can't do that in $\mathbb{R}^n$ for $n>1$ since now the rectangles have to overlap (although not completely). – The Bosco Jan 25 at 9:06
• nothing in the claim suggests boxes should be disjoint, why bother? – dEmigOd Jan 25 at 9:14

As $$R_x\subseteq U$$ for all $$x \in U,$$ we have $$\bigcup_{x\in U} R_x \subseteq U.$$ Now if $$x$$ is any point in $$U,$$ then $$x\in R_x \subseteq \bigcup_{x\in U} R_x.$$ Thus $$\bigcup_{x\in U} R_x = U.$$
There is only a countable number of rectangles with coordinates in $$\mathbb{Q}^n$$ as $$\mathbb{Q}^n$$ is countable, as is normally shown using Cantor's diagonal argument.