What are some examples of functions which are continuous, but whose inverse is not continuous?
nb: I changed the question after a few comments, so some of the below no longer make sense. Sorry.
What are some examples of functions which are continuous, but whose inverse is not continuous?
nb: I changed the question after a few comments, so some of the below no longer make sense. Sorry.
1) Take any topological space,
2) Obtain another space by refining its topology,
3) ...
4) PROFIT!
In fact, consider the forgetful functor $F: \mathbf{Top} \to \mathbf{Set}$. For any set $S$ the continuous functions of the form $f: X \to Y$ such that $FX = FY = S$ and $Ff = 1_S$ form a linear order on the set of all topologies on $S$, and this order is in fact inverse to the usual one (formed by set inclusion of topologies).
For example, extending the answer by Marco, consider a simple curve $\gamma: I \to M$ on some manifold with the finite number of self-intersections. For each intersection, remove all corresponding points from $I$ except for one. Voila :) UPD: actually, you can remove all corresponding points, period!
A bijective map that is continuous but with non-continuous inverse is the following parametrization of the unit circle $\mathbb{S}^1$:
$$f: \colon [0, 2\pi) \to \mathbb{S}^1, \qquad f(\theta)=e^{i \theta}.$$
This map cannot have continuous inverse, because $\mathbb{S}^1$ is compact, while $[0, 2\pi)$ is not. Indeed, $f^{-1}$ jumps abruptly from $2\pi$ to $0$ when we travel round the unit circle.
Another example, somewhat similar in nature, is the map $g\colon [0,1] \cup (2, 3] \to [0, 2]$ defined by
$$g(x)=\begin{cases} x & 0 \le x \le 1 \\ x-1 & 2 < x \le 3 \end{cases}$$
The inverse map is $$g^{-1}(y)=\begin{cases} y & 0 \le y \le 1 \\ y+1 & 1 < y \le 2\end{cases}$$
and it is not continuous because of a jump at $y=1$. Note that, again, the range of $g$ is compact while the domain is not.
More generally, every bijective map $h\colon X \to K$ with $X$ non-compact and $K$ compact cannot have a continuous inverse.
Define $f: [0,1) \cup [2,3] \rightarrow [0,2]$ by
$$f(x)=\begin{cases} x & x \in [0,1) \\ x-1 & x \in [2,3] \end{cases}$$
Let $X$ be a set and $\tau_1,\tau_2$ two topologies on $X$ with $\tau_2\subsetneq\tau_1$. Then the identity function from the topological space $(X,\tau_1)$ to $(X,\tau_2)$ is a continuous bijection but the inverse function (the identity function from $(X,\tau_2)$ to $(X,\tau_1)$) is not continuous.
Let $\rm X$ be the set of rational numbers with the discrete topology. Then the identity map $\rm X\to \mathbb{Q} $ is bijective and continuous, with discontinuous inverse.
Take a "8"-shaped plane curve $\mathcal C \subset \mathbb R^2$ endowed with the subspace topology. Let $\phi: \mathbb R \to \mathcal C$ be a continuous injective parametrization of $\mathcal C$. The inverse function $\phi^{-1}: \mathcal C\to\mathbb R$ cannot be continuous because $\phi^{-1}((a,+\infty))$ is not an open set for some $a$.