# Every subspace of a separable metric space is separable

I'm trying to prove the following statement:

Every subspace of a separable metric space is separable.

Could you please verify if I correctly apply the concept relative topology? Thank you so much!

$$\textbf{My attempt}$$

First, I need the following lemma:

Let $$X$$ be a metric space. The following statements are equivalent:

• $$X$$ satisfies the second countability axiom.

• $$X$$ is a Lindelöf space.

• $$X$$ is separable.

Let $$(X,d)$$ be a separable metric space, $$Y \subseteq X$$, and $$d_Y$$ the induced metric of $$d$$ on $$Y$$. By Lemma, $$X$$ satisfies the second countability axiom. Then the topology induced by $$d$$ has a countable basis $$\mathcal M$$. Let $$\mathcal N = \{A \cap Y \mid A \in \mathcal M\}$$. By relative topology, $$\mathcal N$$ is a countable basis of the topology induced by $$d_Y$$. Hence $$(Y,d_Y)$$ satisfies the second countability axiom. Thus $$(Y,d_Y)$$ is separable by Lemma.

Update: From @Henno Brandsma's answer, I include the proof that $$\mathcal N$$ is a basis of the topology induced by $$d_Y$$.

Assume $$A \subseteq Y$$ is open in $$Y$$. Then $$A = O \cap Y$$ for some $$O \subseteq X$$ that is open in $$X$$. It follows from $$O$$ is open in $$X$$ that there is $$\mathcal M' \subseteq \mathcal M$$ such that $$O = \bigcup \mathcal M'$$. Let $$\mathcal N' = \{Y \cap B \mid B \in \mathcal M'\}$$ Then $$\mathcal N' \subseteq \mathcal N$$ and $$A = \bigcup \mathcal N'$$. Hence $$\mathcal N$$ is a basis of the topology induced by $$d_Y$$.

The fact that second countable implies that all subspaces are separable you have shown correctly. You need a small lemma that when $$\mathcal{B}$$ is a base for $$X$$, its intersections with $$Y$$ form a base for $$Y$$ too, but I assume you already showed that before.
• I've added a part that $\mathcal N$ is a basis of the topology induced by $d_Y$. Please have a check on my update! – LAD Feb 5 at 23:16