Here's Theorem 4.17 in the book Principles of Mathematical Analysis by Walter Rudin, 3rd edition:
Suppose $f$ is a continuous 1-1 mapping of a compact metric space $X$ onto a metric space $Y$. Then the inverse mapping $f^{-1}$ defined on $Y$ by $$ f^{-1}( f(x) ) = x \ \ \ \ \ \ \ ( x \in X ) $$ is a continuous mapping of $Y$ onto $X$.
Now in Example 4.21 Rudin illustrates that compactness of $X$ is essential in Theorem 4.17.
So here is Example 4.21:
Let $X$ be the half open interval $[0, 2 \pi )$ on the real line, and let $\mathbf{f}$ be the mapping of $X$ onto the circle $Y$ consisting of all points whose distance from the origin is $1$, given by $$ \mathbf{f}(t) = ( \cos t, \sin t ) \ \ \ \ \ \ ( 0 \leq t < 2 \pi). $$ Then this function $\mathbf{f}$ is of course continuous and injective. But Rudin asserts that the inverse function is discontinuous at the point $(1, 0) = \mathbf{f}(0)$. How to demonstrate this fact rigorously?
So far in the book, Rudin has not discussed the functions $\cos$ and $\sin$. So can we come up with an example that uses only what Rudin has discussed?