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

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$.


Another characterisation of $S$ being dense in a metric space $X$ is the following:

for all $x \in X$ and all $\epsilon > 0$ there is a $y \in S$ with $d(x,y) < \epsilon$.

Given $v \in Y$ and $\epsilon > 0$, by surjectivity there is an $x \in X$ with $f(x) = v$, and by continuity there is a $\delta > 0$ such that $d_Y ( f(x) , f(y) ) < \epsilon$ for all $y \in X$ with $d_X (x,y) < \delta$. As $S$ is dense in $X$ there must be a $y \in S$ such that $d_X (x,y) < \delta$. But now $f(y) \in f [ S ]$ and by choice of $\delta$, $d_Y ( v , f(y) ) < \epsilon$.


Let $x=f(y)$ and $\epsilon>0$. We want to find $z\in f(S): d(y,z)<\epsilon$.
Since $f$ is continues exists $\delta>0: d(x,w)<\delta \Longrightarrow d(f(x),f(w))<\epsilon.$
Now use the fact that $S$ is dense in $X$ to find $w\in S:d(x,w)<\delta.$