# Show that if $f$ is surjective, then $\overline{f(A)} = Y$.

Exercise: Let $f:(X,d)\to (Y,\rho)$ be a continuous function. Let $A\subset X$ such that $\overline{A} = X$. Show that if $f$ is surjective, then $\overline{f(A)} = Y$.

What I've tried: If $f$ is surjective then for every $y\in Y$ there exists at least one $x\in X$ such that $f(x) = y$. We have $f(A) = \{f(x)\text{ for } x\in A\}$, and so $\overline{f(A)} = \overline{\{f(x)\text{ for }x\in A\}}$. I don't really know how to translate this into something useful.

Question: How do I solve this exercise?

Hint:

It can be shown that function $f:X\to Y$ is continuous iff $f(\overline B)\subseteq\overline {f(B)}$ for every $B\subseteq X$.

For a proof of that see here.

Here is a fairly short proof that uses the following description of dense sets: if $A \subset X$ then $\overline A = X$ if and only if every nonempty open set in $X$ intersects $A$.

Let $U \subset Y$ be an open set. Then $f^{-1}(U)$ is open too, and nonempty since $f$ is surjective.

Since $A$ is dense in $X$, there exists a point $x \in A \cap f^{-1}(U)$. Consequently $f(x) \in f(A) \cap U$.

Thus $f(A)$ intersects every open set $U \subset Y$, so that $f(A)$ is dense in $Y$.