[Math] An example of open but not closed map.

closed-mapgeneral-topologyopen-map

Exercise: Find an example of mapping which is open but not closed, which is closed but not open.

I am thinking of trivial examples with $X=\{1,2,3\}$ however I have no idea on how to build a function that preserves the open interval but no the closed ones. Since this is my first exercise of this kind.

Question:

Can someone give me a hint?

Thanks in advance!

Best Answer

Consider the projection mapping $f:\Bbb R^2\to \Bbb R$ defined as $f(x_1,x_2)=x_1$. $f $ is continuous and open, but not closed. (Consider the image of the hyperbola $x_1x_2=1$ under $f $.)