# Is a surjective continuous map with compact domain is open?

Let $f:X→Y$ be a continuous surjective map and $X$ is compact. Is $f$ is an open map?

$"$A function $f : X → Y$ is open if for any open set $U$ in $X$, the image $f(U)$ is open in $Y$.$"$

Since $f$ is continuous and $X$ is compact then image of $X$ under $f$ will be compact. But how can I prove that $f$ is an open map? If not please help me with a counterexample.

• Are you sure that $f$ is a closed map? If $A\subseteq X$ is closed then it is compact hence is sent by the continuous $f$ to a compact $f(A)\subseteq Y$. But there is no guarantee that $f(A)$ is closed. So I see no reason to believe that $f$ is a closed map. – drhab Apr 5 '18 at 12:23
• @drhab. Yah..I am sorry. $f$ may not be a closed map. – abcdmath Apr 5 '18 at 12:31

Take the identity function on set $X$ where the domain is equipped with discrete topology and the codomain with indiscrete topology.
If $X$ has exactly $2$ elements then $X$ is compact but the singletons (which are open and closed) will be sent to sets that are not open and are not closed.