Metric Space is Separable iff Second-Countable

Theorem
Let $M = \left({A, d}\right)$ be a metric space.

Then $M$ is separable iff $M$ is second-countable.

Proof
We have from Second-Countable Space is Separable that second-countability implies separability in all topological spaces regardless of whether they are metric spaces or not.

So all we need to do is demonstrate that if $M$ is separable then it is second-countable.

Suppose $M$ is separable.

Let $X_i = \left\{{x_i: i \in I}\right\}$ for some indexing set $I$ be a subset of $X$ which is countable and everywhere dense.

This is guaranteed to exist by definition of separability.

Consider the set:
 * $\mathcal B = \left\{{N_{1/n} \left({x_i}\right): n \in \N^*, x_i \in X_i}\right\}$

Let $U$ be an open subset of $X$ and let $x\in U$.

For some $n\geq 1$, we have $N_{2/n} \left({x}\right) \subset U$.

Choose $i$ such that $d \left({x_i, x}\right) < \dfrac 1 n$.

Then $x \in N_{1/n} \left({x_i}\right)$, and the triangle inequality shows that:


 * $N_{1/n} \left({x_i}\right) \subset N_{2/n} \left({x}\right) \subset U$.

Therefore $\mathcal B$ is a countable basis for the topology on $X$.

Hence the result, by definition of second-countable space.