# A map is continuous if and only if for every set, the image of closure is contained in the closure of image

As a part of self study, I am trying to prove the following statement:

Suppose $X$ and $Y$ are topological spaces and $f: X \rightarrow Y$ is a map. Then $f$ is continuous if and only if $f(\overline{A})\subseteq \overline{f(A)}$, where $\overline{A}$ denotes the closure of an arbitrary set $A$.

Assuming $f$ is continuous, the result is almost immediate. Perhaps I am missing something obvious, but I have not been able to make progress on the other direction. Could anyone give me a hint which might illuminate the problem for me?

If $$CC$$ is closed in $$YY$$, we need to show that $$D = f^{-1}[C]D = f^{-1}[C]$$ is closed in $$XX$$.
Now using our closure property for $$DD$$: $$f[\overline{D}] \subseteq \overline{f[D]} = \overline{f[f^{-1}[C]]} \subseteq \overline{C} = C,f[\overline{D}] \subseteq \overline{f[D]} = \overline{f[f^{-1}[C]]} \subseteq \overline{C} = C,$$ as $$CC$$ is closed.
This means that $$\overline{D} \subseteq f^{-1}[C] = D\overline{D} \subseteq f^{-1}[C] = D$$, making $$DD$$ closed, as required.