Question about continuous but neither open nor closed function on topological space X

55 Views Asked by At

Define a function from topological space $\mathrm{X}$ into topological space $\mathrm{X}$, $f:\mathrm{X}\rightarrow \mathrm{X}$ such that $f$ is continuous but neither open nor closed

My attempt

I take $X=\mathbb{R}$ and with I defined function $f:(\mathbb{R},\tau)\rightarrow(\mathbb{R},\tau^{\prime})$,where $\tau$ is discrete topology on $\mathbb{R}$ and $\tau^{\prime}$ is indiscrete topology on $\mathbb{R}$.$f$ is given by $f(x)=x$ In this case we have a continuous function since $\tau^{\prime}=\lbrace \mathbb{R}, \emptyset \rbrace$ and $\tau$ is discrete space. But since any set, $\mathrm{U}$,other than $\mathbb{R}$ and $\emptyset$ we have neither open nor closed set.

Do I make any mistake? Thanks in advance!