# countable dense subset of R^k

This is a question from Rudin's Principles. Chapter 2, question 22.

The question reads: "A metric space is called $separable$ if it contains a countable dense subset. Show that $\mathbb{R}^k$ is separable. Hint: Consider the set of points which have only rational coordinates."

The answer starts with: "We need to show that every non-empty open subset $E$ of $\mathbb{R}^k$ contains a point with all coordinates rational." and then does just that, but I'm not sure how that addresses what the question is asking.

I know the definition of a dense subset. For a metric space $X$ and $E\subset{X}$, $E$ is dense in $X$ if every point of $X$ is a point of $E$ or a limit point of $E$ (or both).

And I know that saying a set is countable means that the set has the same cardinality as the natural numbers or in other words could be put into one-to-one correspondence with the naturals.

Combining the two definitions to get definition of a countable dense subset is pretty straightforward.

And I understand that the rationals are countable. I also understand that the rationals are dense in $\mathbb{R}$ which implies that $\mathbb{Q}^k$ is dense in $\mathbb{R}^k$.

But I don't know how showing that "every non-empty open subset $E$ of $\mathbb{R}^k$ contains a point with all coordinates rational" proves that $\mathbb{R}^k$ has a countable dense subset.

What am I missing here?

Is there another way to prove this?

• $\mathbb Q^k$ is countable. If every open neighborhood of a point in $\mathbb R^k$ contains a point of $\mathbb Q^k$ then that point of $\mathbb R^k$ is a limit point of $\mathbb Q^k$. – John Douma Nov 15 '15 at 4:29
• I guess you're missing the definition of "dense". – BrianO Nov 15 '15 at 5:33
• It still requires a small proof to see that $\mathbb{Q}$ dense in $\mathbb{R}$ implies that $\mathbb{Q}^k$ is dense in $\mathbb{R}^k$. But then you are done: you have shown a countable dense subset, namely $\mathbb{Q}^k$, so by definition $\mathbb{R}^k$ is separable. – Henno Brandsma Nov 15 '15 at 10:46

It is a general result in topology that given a collection of topological spaces $\{A_i\}_{i=1}^n$, then if $A=\prod_{i=1}^nA_i$
$$\overline{A}=\prod_{i=1}^n\overline{A_i}$$
We already know that $\overline {\mathbb Q} = \mathbb R$, so $\overline {\mathbb Q^k} = \mathbb R^k$. Hence $\mathbb R^k$ is separable.