# Show continuous functions need not be open maps and open maps need not be continuous.

A function from one metric space to another is said to be an open map if it maps open sets to open sets. Similarly one can define a closed map.

1-Provide a continuous function which does not map an open set to another open set?

2- Provide a function which maps every open set to another one but it is not a continuous function?

For 2) take the identity $$\mathbb R\to\mathbb R$$ where codomain is discrete (so $$d(x,y)=0$$ if $$x=y$$ and $$d(x,y)=1$$ otherwise) and domain is not discrete.
• For 1) You mean the range of the constant function be singletons? Then how it can be constant? Could you explain it or represent is using $f: X \rightarrow Y$? – Saeed Nov 13 '18 at 14:26
• Every constant function is continuous. If $U$ is an open subset of $Y$ and $f$ is prescribed by $x\mapsto c$ where $c$ is an element of $Y$ then $f^{-1}(U)=\varnothing$ (this if $c\notin U$) or $f^{-1}(U)=X$ (this if $c\in U$). The sets $\varnothing$ and $X$ are always open. Further open set $U$ is sent to the not open set $\{c\}$ (provided that singletons in $Y$ are not open). – drhab Nov 13 '18 at 14:31