[Math] How to show that $f(S) \subset Y $ is dense, when $f$ is continuous and surjective, and $S \subset X$ is dense in $X$

general-topology

Let $(X,d_x)$ and $(Y,d_y)$ be metric spaces. Furthermore, let $f:X \to Y$ be surjective and continuous. Furthermore: $S \subset X$ is dense in X.

Question: How to prove that $f(S) \subset Y$ is dense in Y?

I wrote down the definitions of continuity:

$\forall x \in X, \forall a \in \mathbb{R} : \exists \delta > 0 $ such that $\forall \epsilon > 0 : |x-a| < \delta \implies |(f(x) – f(a) | < \epsilon , $

and of $S \subset X$ being dense in X:
$ \bar{S} = \{ x \in X | \forall \epsilon > 0 : \exists y \in S $ such that $d(x,y) < \epsilon \} = X $,

and of $f$ being surjective:
$\forall p \in Y : \exists x \in X : f(x) = p $.

Using these definitions, I tried to prove:
$\overline{f(S)} = \{ p \in Y | \forall \epsilon ' > 0 : \exists z \in f(S) $ such that $d(p,z) < \epsilon ' \} = Y.$

I couldn't figure it out, though. I tried proving this by contradiction, but to no avail. Could you please help me out?

Best Answer

Note that in a metric space the closure of a set is the set of limits of all sequences. In particular a set $A$ is dense in a space $X$ iff for any $x \in X$ there is a sequence $a_n \in A$ such that $a_n \rightarrow x$.

Hint: Let $y \in Y$. Then $y = f(x)$ for some $x \in X$. Now think about how to use the fact that $S$ is dense in $X$.

Edit: Since $S$ is dense in $X$ there exists a sequence $s_n \in S$ such that $s_n \rightarrow x$. Can you now find a sequence in $f(S)$ that tends to $y = f(x)$? (Remember, $f$ is continuous!)

Edit 2: To prove this using epsilon delta methods, take any $y \in Y$ and let $\epsilon > 0$. $f$ is surjective so $\exists x \in X$ such that $f(x) = y$. Since $f$ is continuous, $\exists\delta > 0$ such that $d_X(x,z) < \delta \implies d_Y(f(x),f(z)) < \epsilon$. Since $S$ is dense in $X$ there exists some $x_0 \in S$ such that $d_X(x,x_{0}) < \delta$. Hence $d_Y(f(x),f(x_{0})) < \epsilon$ and $f(x_0) \in f(S)$. As such $f(S)$ must be dense in $Y$.

Related Question