# Identity function continuous function between usual and discrete metric space

Let $X = (\mathbb R, d)$ be the usual real line and $Y =(\mathbb R, d')$ be the set R with discrete metric.

Show that identity map from $X$ to $Y$ is not continuous but open as well as closed.

On the other hand, the identity map from $Y$ to $X$ is continuous which is neither open nor closed.

My attempt : we know that for continuity we want to show that inverse image of the open set is open.

Any singleton set $\{x\}$ is open in discrete metric space and hence its inverse image under identity map is also $\{x\}$, which is not an open set in usual metric.

Hence, identity map is not continuous.

Again if identity map have domain with discrete metric then it is always continuous.

Am I correct??

Now for open map (closed), we want to show that image of open (closed) set is open (closed).

• Your answer is correct. Note that every map out of a discrete space is continuous. Note also that every subset of a discrete space is both open and closed. – Tyrone Aug 5 '18 at 10:53

Now, you have to keep in mind that, with respect to the discrete metric every set is open and every set is closed. In fact, given a set $S$, $S=\bigcup_{x\in S}\{x\}$ and, since each singleton is open, $S$ is open. And since every set is open, every set is closed too. Therefore, every map from an arbitrary metric space into a discrete one is both open and closed.
In order to prove the the identity from $Y$ to $X$ is neither open nor closed, you can take, for instance, the set $A=[0,1)$. It is neither open nor closed in $X$ but it is both open and closed in $Y$. Since $\operatorname{id}(A)$, $\operatorname{id}$ is neither open nor closed.