TITLE: Prove that a subset of a separable set is itself separable
QUESTION [31 upvotes]: The problem statement, all variables and given/known data:
Show that if $X$ is a subset of $M$ and $(M,d)$ is separable, then $(X,d)$ is separable. [This may be a little bit trickier than it looks - $E$ may be a countable dense subset of $M$ with $X\cap E = \varnothing$.] 
Definitions
Per our book:
A metric space $(M,d)$ is separable if there exists a countable dense $E$ contained in $M$. 
$E$ contained in $M$ is dense if $\forall m\in M$, $\forall ε>0\in\mathbb R$, $\exists e\in E$ s.t. $d(m,e) < ε$ 
The attempt at a solution
My best attempt was doomed from the start, because I don't quite understand the hint. My thought process went as follows:
Since $X$ is a subset of $M$, $\forall x\in X, x\in M$. Thus, since $E$ is dense in $M$,
$\forall x\in X$, and ε > 0, $\exists e\in E$ st $d(x,e)<ε $. 
At this point, I was done, because the set of $e$'s satisfying the above, is a subset of $E$, a countable set. So a subset of a countable set is dense in $X$, and $X$ is separable. This is incorrect, but I cannot see why. 
Any help clearing up the confusion would be greatly appreciated.
Thanks!
Edit: I wish I could upvote all of you for your help! I really appreciate the speedy replies and attempts to make this information clear to me.

REPLY [4 votes]: This answered here which is the approach in the Brian M. Scott's answer.
Since you pointed out that you are not used to the terms used, and that this came from a course of math for economists, I'll try to give an answer using the definitions that you provided.
First, as an advice, when you are asked to proof something, at least at the beginning, it is better to look at the definitions and write down what you have to prove for the object you are supposed to prove things about.
In this case you have to prove that $(X,d)$ is separable.
What is $(X,d)$? It is the metric space formed by the subset $X$ of $M$, in which we measure distances just as we do in $M$.
What you have to prove about $(X,d)$? You have to prove that there exist a countable subset $E$ of $X$ such that $E$ is dense in $X$.
But you know that $(M,d)$ is separable, so there exist a countable subset $D$ of $M$, say $$D = \{x_1,x_2,x_3,\ldots\},$$
which is dense in $M$.
Now, let's enumerate the positive rationals as $$\Bbb Q \cap (0,\infty) = \{r_1,r_2,r_3,\ldots\}.$$
Define $$\Delta = \{(i,j) : B(x_i,r_j)\cap X\neq\emptyset\}.$$ $\Delta$ is not empty because otherwise $D$ is not dense in $M$.
Then, for each $(i,j)\in\Delta$ there is an $e_{(i,j)}\in B(x_i,r_j)\cap X$. Define then $$E = \{e_{(i,j)}: (i,j)\in \Delta\}.$$
This $E$ is a countable dense subset of $X$, so we are done.
If this last statement is not clear, let me know it and I'll elaborate on it. 
Edit Indeed, Let $x\in X$ and $\epsilon\gt 0$. There's an $r_j$ such that $r_j\lt \epsilon/2$. Since $D$ is dense in $M$ there exist some $x_i\in D$ such that $d(x,x_i)\lt r_j$. So both $x$ and $e_{(i,j)}$ are elements of the ball $B(x_i,r_j)$, therefore
$$d(x,e_{(i,j)})\leq d(x,x_i) + d(x_i,e_{(i,j)}) = 2r_j \lt \epsilon.$$