TITLE: Continuous image of separable space
QUESTION [11 upvotes]: Prove that every continuous image of a separable space is separable.

Let $(X, \mathcal T)$ be a separable space. Then there exists some countable subset $A \subseteq X$ such that $\overline{A}=X$.
Let $f:X\to Y$ be a continuous mapping. Notice that $f:X \to f(X)\subseteq Y$ is clearly surjective.
Since $A\subseteq X$, and functions preserve set inclusion, we have that $$f(A) \subseteq f(X)= f(\overline{A}).$$ Also, it is clear that $f(A)$ is itself also countable.
What (I think) I need to show, however, is that $\overline{f(A)}=f(\overline{A})$ (which I am not sure if it's true). This will thus show that $f(A)$ is a countable, dense subset of $f(X).$
Is this the correct approach, or do I have a mistake in my method?  Can anyone please help show me how I can go about finishing this proof?

REPLY [3 votes]: With $Z=f(X) ,$ the function $f:X\to Z$ is a continuous surjection and we wish to show that $Z$ is separable.
With closure bars denoting closure in $X$ or in $Z,$ we have $$f(\overline A)\subset \overline {f(A)}\subset Z$$ because $f$ is continuous. We have $$Z=f(X)=f(\overline A)$$ because $X=\overline A.$ So we have $$Z=f(X)=f(\overline A)\subset \overline {f(A)}\subset Z.$$ Therefore $\overline {f(A)}=Z.$ So $f(A)$ is a countable dense subset of $Z.$