# Mapping open on open dense subset => Mapping is open on whole space?

Let $X,Y$ be topological spaces, and let $f\colon X \to Y$ be a continuous function. Further suppose that there exist an open and dense subset $U$ of $X$, such that $f\vert_{U} \colon U \to Y$ is an open mapping.

Is it then true that $f$ itself is open? How is the situation if $X = \mathbb{R}^{n}$ and $Y=\mathbb{R}^{m}$?

• $X = [0,\infty),\; Y = \mathbb{R};\; f = \operatorname{id}$ – Daniel Fischer Jul 22 '14 at 16:01
• Thanks for the quick counterexample. – Sebastian Jul 22 '14 at 16:05
• $X = \Bbb{R}$, $U = \Bbb{R} \setminus \{0\}$, $f(x) = x^2$ gives a counter example for the case of a function defined on a complete $\Bbb{R}^n$. – PhoemueX Jul 22 '14 at 22:04