# Continuous image of countable dense set

I want to show that the continuous image of a countable dense subset is countable and dense as well. I've come up with this so far: Let $D \subset X$ be a countable and dense subset of X and $f:X \mapsto Y$ a continuous function. If $f(D)$ is dense in Y, then $\forall y \in Y, \ \epsilon > 0$ the intersection of the ball of radius $\epsilon$ around $y$ and $f(D)$ should be non-empty: $B(y,\epsilon) \cap f(D) \neq \emptyset$.

Then $f^{-1} (B(y,\epsilon) \cap f(D)) = f^{-1} (B(y,\epsilon)) \cap f^{-1} (f(D))) \supseteq f^{-1} (B(y,\epsilon)) \cap D \neq \emptyset$, since $D$ is a dense set and $f^{-1} (B(y,\epsilon))$ is open in $X$ . So I think that this shows that $f(D)$ is dense, but what about countability? Are my assumptions above correct? Any help is highly appreciated.

Kind regards,

• You need to assume $f$ is surjective, otherwise you cannot assume that $f^{-1}(B(y,\epsilon))$ is nonempty. – Mees de Vries Nov 4 '16 at 11:15
• Countability is obvious: if you have a surjection $g : \mathbb{N} \to D$, then $f \circ g$ is a surjection from $\mathbb{N}$ to $f(D)$. – Nate Eldredge Nov 4 '16 at 12:32
• Ok, thanks to both of you for pointing out these things! – user202542 Nov 4 '16 at 12:59
• The notation $f:X\mapsto Y$ is incorrect: it should be $f:X\to Y$. The symbol $\mapsto$ is used to show the operation of the function on an individual element of the domain, as in $f:\Bbb R\to\Bbb R:x\mapsto x^2$. – Brian M. Scott Nov 4 '16 at 15:01