Let $A$ be a closed bounded subset of $\mathbb{R}$. Suppose $f: A \rightarrow \mathbb{R}$ is a continuous injective function. Then $f^{-1} : f(A) \rightarrow A$ is also continuous.
That $A$ is closed and bounded are both crucial conditions. Therefore I need to give an example of a continuous injective function $f:A \rightarrow \mathbb{R}$ on a closed but unbounded set $A \subseteq \mathbb{R}$ for which $f^{-1}$ is not continuous. Can anyone give me a hint on this?
(I know the question has already been asked on A continuous injective function and its inverse, but the comment given does not make it clear to me yet.)
Let $A = [0,1] \cup [2,\infty).$ Then $A$ is closed. Define
$$f(x) = \begin{cases} \,x, & x\in [0,1]\\ 1+\dfrac{1}{x}, & x\in [2,\infty) \end{cases}$$
Then $f$ is continuous and injective on $A,$ and $f(A)= [0,3/2].$ But $f^{-1}: [0,3/2] \to A$ is discontinuous at $1,$ as $\lim_{x\to 1^-} f^{-1}(x) = 1,$ $\lim_{x\to 1^+} f^{-1}(x) = \infty.$
Previous answer: Hint: Think about the map $f:\mathbb N\to \mathbb R$ given by $f(1)=0,f(n)=1/n, n=2,3,\dots $