Prove that a subset of a separable set is itself separable

Note that it’s very important here that you’re working in a metric space, because the statement isn’t true in topological spaces in general.

Since $X$ is a subset of $M$, $\forall x\in X, x\in M$. Thus, since $M$ is dense in $E$,

$\forall x\in X$, and $\epsilon > 0$, $\exists e\in E$ st $d(x,e)< \epsilon $.

‘Since $M$ is dense in $E$’ doesn’t make sense. First, you never defined $E$. I can guess that it’s supposed to be a countable dense subset of $M$, but then your statement is just backwards: $E$ is dense in $M$. In any case, finding points of $E$ near $x$ doesn’t help to show that $X$ is separable: to show that you must find a countable subset of $X$ that is dense in $X$, and $E$ might be completely disjoint from $X$. For a concrete example of this possibility, let $M=\Bbb R$ with the usual metric, and let $X$ be the set of irrational numbers. We know that $\Bbb R$ is separable, because $\Bbb Q$ is a countable dense subset of $\Bbb R$. The theorem that you’re to prove says that $X$ is also separable, i.e., that there is some countable set $D$ of irrational numbers that is dense in $X$, but $D$ certainly can’t be $\Bbb Q$, our familiar countable dense set of reals: no member of $\Bbb Q$ is even in $X$.

One way to prove the theorem is to show that if $E$ is a countable dense subset of $M$, then $$\mathscr{B}=\{B(e,r):e\in E\text{ and }0<r\in\Bbb Q\}$$ is a base for $M$, meaning that if $x\in M$, and $U$ is an open set containing $x$, then there is some $B(e,r)\in\mathscr{B}$ such that $x\in B(e,r)\subseteq U$. Note that $\mathscr{B}$ is a countable family of open balls. Then let $$\mathscr{B}_0=\{B\cap X:B\in\mathscr{B}\text{ and }B\cap X\ne\varnothing\}\;,$$ and show that $\mathscr{B}_0$ is a base for $X$. Since $\mathscr{B}$ is countable, so is $\mathscr{B}_0$. Finally, for each $B\in\mathscr{B}_0$ pick one point $x_B\in B$, and let $D=\{x_B:B\in\mathscr{B}_0\}$; $D$ is countable, and it’s not too hard to show that it’s dense in $X$ and hence that $X$ is separable.


EDIT: Fixed a mistake.

Here is a slightly different answer, though of course basically equivalent to the other two.

$X$ is a subset of $M$. $E$ is a countable dense subset of $M$. We would like to find a countable dense subset of $X$.

The problem, as hashed out in the comments above, is that we would like to use $E$ as our countable dense subset of $X$, but the points of $E$ may not actually belong to $X$.

So one thing we can do is this: Every point $e$ in $E$ has some distance $$ d(e, X) = \inf\{ d(e, x) : x\in X\} $$ i.e. how far it is from the set $X$.

For every $e$ in $E$, choose points $a_n$ in $X$ whose distance from $e$ is, say, less than $d(e,X) + 1/n$. (I may not be able to get $a$ exactly distance $d(e,X)$ from $e$, but I can get close.)

Now, let $A$ be the set of all $a_n$ that I made, countably many from each $e$ in $E$. (Okay, some $a_n$ may belong to multiple $e$'s, but so what.) $A$ is in $X$, by definition, and $A$ is countable, as $E$ was (countable union of countable sets is countable).

So I just have to show that $A$ is dense in $X$. Let $x$ be any point of $X$, and take any $\epsilon>0$. Then there is some $e\in E$ within $\epsilon/3$ of $x$, i.e. $d(x,e)<\epsilon/3$. That means $d(e, X)\leq \epsilon/3$, so there is some $a\in A$ such that $$ d(e,a) < d(e,X) + \epsilon/3 \leq 2\epsilon/3. $$

So $$ d(x,a) \leq d(x,e) + d(e,a) < \epsilon/3 + 2\epsilon/3 = \epsilon. $$

So $A$ is dense in $X$.


Hint (for a different proof strategy): Show that $(M,d)$ is second countable, i.e. there is a countable collection $\mathcal B = \{U_n : n \in \omega\}$ of open sets of $M$ such that any open set $U$ in $M$ can be written as a union of elements of $\mathcal B$. Then show that that $X$ also is second countable. And finally show that second countable implies separable.