# On showing that every separable metric space has a countable base

Theorem: Every separable metric space $$(M, d)$$ has a countable base

I've glanced over a couple of proofs for this theorem (for example see the one provided here), but I'm still stuck at the following: Why the neighborhood of an arbitrary element of the metric space $$M$$ (which might not belong to the dense subset) necessarily contains an element of the countably dense subset? Specifically, let $$X$$ be a countable dense subset of $$M$$, $$z \in M$$ and $$G \subset M$$ be open such that $$z \in G$$. Then why necessarily at a distance $$h$$ for which the open ball $$B(z, h) \subset G$$ does there exist an element $$x_k \in X$$ such that $$d(z, x_k) < h$$?

Element inclusion the other way around makes perfect sense to me: If we take the countably dense subset $$X$$ of $$M$$ and consider the collection $$C = \{B(x, r)\mid x \in X, r \in \mathbb{Q}_{+}\}$$ then of course any $$z \in M$$ is contained in any neighborhood of the elements of $$X$$ for some radius $$r \in \mathbb{Q}_{+}$$ (since we can take arbitrarily large/small radius $$r$$).

Bonus question: I know it is not a pretty proof, but to prove the theorem, could we do the following: i.) order the elements of the countably dense subset $$X$$ in to the sequence $$x_1, x_2,\dots = \left(x_n\right)_{n \in \mathbb{N}}$$, ii.) form the collection of neighborhoods $$\{B(x_n, n)\mid n \in \mathbb{N}\}$$? Since $$X$$ is dense, there exists an infinite number of elements of the sequence $$\left(x_n\right)_{n \in \mathbb{N}}$$ in any neighborhood $$\delta > 0$$. Thus when moving a small distance $$\delta > 0$$, we necessarily cover all elements of the space $$M$$.

• What definition of dense are you using? I assume it's not '$X$ is dense in $M$ if every open set $O$ in $M$ contains an element of $X$'. Is it '$X$ is dense in $M$ if $\overline X = M$'? Jun 25, 2021 at 15:08
• If you are assuming that $\overline{X}=M$, then remember the characterization of the closure in more general topologies: $z\in M=\overline{X}$ if and only if for every open set $U$ containing $z$ one has $U\cap X\neq \emptyset$. Jun 25, 2021 at 15:12
• I don't think your definition is correct. According to that definition, $\{0\}$ would be dense in $\mathbb R$, right? Jun 25, 2021 at 15:18
• The definition I'm used to is that every open set in $M$ contains an element of $X$, not vice versa. You may have confused the two -- if you use the above, the step in the proof becomes trivial. It's also easy to prove that it's equivalent to $\overline X = M$. Jun 25, 2021 at 15:19
• @silver Yeah you are correct: The terse definition is that: "$E$ is dense in $X$ if every element of $X$ is a limit point of $E$ or a point of $E$ (or both)." I somehow extrapolated what I perceived to be the density of reals/rationals in an interval to a more general setting. The devil is in the details! Jun 25, 2021 at 15:23

Let $$\{x_n\}_{n=1}^{\infty}$$ be a dense subset of $$(M,d)$$. For each $$n$$, let $$\{B_{n,k}\}_{k=1}^{\infty}$$ be a countable base at $$x_n$$. Such a countable base exists at every point in every metric space. Then $$\{B_{n,k}\}_{k,n}$$ is a countable base for the entire space $$(M,d)$$. To prove this, pick any point $$u\in X$$. Given an open set $$U$$ containing $$u$$, there exists some $$n$$ such that $$U$$ contains an open ball around $$x_n$$, (because $$\{x_n\}$$ is dense in $$(M,d)$$), and consequently it also contains $$B_{n,k}$$ for sufficiently large $$k$$, (because $$B_{n,k}$$ is a local base at $$x_n$$ and $$U$$ is open). This proves that $$\{B_{n,k}\}_{k,n}$$ is a base for $$(M,d)$$, and it is a countable union of countably many sets, hence countable.