Let $(X,\|\cdot \|)$ be a normed space and $M\subseteq X$. Show that if $X$ is separable, then $M$ is separable.
My attempt:
Since $X$ is separable $\Leftrightarrow$ $\exists E\subset X:$ $E$ is dense and countable.
We need to show that $M$ is separable. I'll do this by proving that the intersection $E\cap M =:V\subseteq M$ is countable and dense in $M$. It's clear that it's countable since $V\subseteq E$ and $E$ is countable.
Remains to show: $V$ is dense ($\Leftrightarrow V\cap O\neq \emptyset$ $\forall O\subseteq M$ open). Because $O\cap E\neq \emptyset$ (Because $E$ is dense), we have that $$O\cap E \overset{O\subseteq M}{=} O\cap (E\cap M) = O\cap V \neq \emptyset$$
Therefore, M is also separable.
My problem now is that I probably need $M$ to be open for this proof to work? If so, how can I fix this so that it holds true for any subset $M$?
Please notice that there's no reason for $E\cap M$ to be different from the empty set. So let $E=\{x_n\mid n\in\mathbb{N}\}$, then you can write $$X=\bigcup_{n,m} B\Big(x_n,\frac{1}{m}\Big)$$ Consider now all the pairs $(n,m)$ for which $M\cap B\Big(x_n,\frac{1}{m}\Big)\neq\emptyset$ and for each such pair select $a_{n,m}\in M\cap B\Big(x_n,\frac{1}{m}\Big)$, then now the collection $\tilde{E}=\{a_{n,m}\mid n,m\in\mathbb{N}\}$ is your candidate countable dense subset of $M$. Notice the density comes immediately from the definition of $a_{n,m}$ which belongs to a dense set (i.e. $E$)