Visualise in $\mathbb{R}$: inverse of open set is open $\implies f$ continuous

48 Views Asked by At

Theorem: Let $(S,d_S), (T,d_T)$ be metric spaces and $f: S\to T$. Then $f$ is continuous (1) iff every open set $D\subset T$ has an open inverse image $f^{-1}(D)$ (2).

The theorem in itself is very famous, but I have never seen something like it when $S,T\subset \mathbb{R}.$ Of course (1)$\implies$(2) is easy to imagine, but what about (2)$\implies$ (1)? It is obvious for $f(x)=x$. How about for $f(x)=x^2$? So when do the arguments work in laymans terms.

Can someone give an example, where the inverse of the open set is closed, hence $f$ is not continuous?