Prove that $\overline{f(A)}\subseteq f(\overline{A})$ where $f: X \rightarrow Y$ is continuous, $X$ is compact and $A \subseteq X$ Suppose that $X$ and $Y$ are topological spaces, $f: X \rightarrow Y$ is a continuous map and $A \subseteq X$. It's not very hard to prove that $f(\overline{A})\subseteq \overline{f(A)}$, where $\overline{A}$ denotes the closure of $A$.
Now assume that $X$ is compact. I'm trying to prove the inclusion $\overline{f(A)}\subseteq f(\overline{A})$.
We know that $\overline{A}$ is compact so $f(\overline{A})$ is compact too. If $Y$ were a Hausdorff space, $f(\overline{A})$ would be closed, and $\overline{f(\overline{A})}=f(\overline{A})$, so $\overline{f(A)}\subseteq \overline{f(\overline{A})}=f(\overline{A})$, as required.
Nevertheless, I don't have the hypothesis that $Y$ is Hausdorff.
So I'm struggling either trying to prove the inclusion, or to find out a counterexample.
Thank you.
 A: The claim can be made false without the assumption that $Y$ is Hausdorff. To see this, let $Y\equiv\{1,2\}$ be endowed with the indiscrete topology (that is, the only open sets are the empty set and the whole set). Let $X\equiv\{1,2\}$ be endowed with the discrete topology (all subsets are open) and $f(1)\equiv 1$ and $f(2)\equiv 2$. Clearly, $f$ is continuous. But if $A\equiv\{1\}$ (a finite set is compact in any topological space), then
$$\overline{f(A)}=\overline{\{1\}}=\{1,2\},$$ yet $$f(\overline{A})=f(\{1\})=\{1\}.$$
A: This is false in general if $Y $ is not Hausdorff.
Take any map $f : X \to X $, where on the left, $X$ has the discrete topology and on the right the indiscrete topology (only $\emptyset  $ and $X$ are open), where $X $ is any finite set.
Finally,  let $A=\{x\} $. Is is not hard to see that this is a counterexample (if $X $ has more than one element).
A: Let $f : X \to Y$ be a map. Your claim follows from two well-known ingredients:

*

*$f$ is a closed map if and only $\overline{f(A)}\subset f(\overline{A})$ for all $A \subset X$.


*If $X$ is compact and $Y$ is Hausdorff, then $f$ is a closed map.
Obviously we cannot drop the assumption "$Y$ Hausdorff" in 2. As a counterexample take any compact $X \ne \emptyset$ and any map $f : X \to Y$ to a space $Y$ having the trivial topology such that $f(X) \subsetneqq Y$.
