TITLE: $f$ is continuous $ \iff $ $f^{-1}$ is continuous?
QUESTION [11 upvotes]: Is the following true?

Let $A, B \subseteq \Bbb R$ and let $f : A \to B$ be a bijective map.
  Then 
$\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;f$ is continuous on $A$  $
 \iff $ $f^{-1}$ is continuous on $B$

It seems like such an obvious result but I can't seem to prove it. At least is the result true if we restrict $A$ and $B$ to be intervals?
My Attempt at a Proof: 
$\implies $: Let $b \in B$. I was going nowhere after considering an arbitrary sequence $ (x_n) $ in $B$ which converges to $b$. So I instead assumed that $V$ was any neighbourhood around $f^{-1}(b)$. Now suppose there is no neighbourhood $U$ of $b$ such that $ x \in U \implies f^{-1}(x) \in V $. But for every neighbourhood $U'$ of $b$ there is a neighbourhood $V'$ of $f^{-1}(b)$ such that $ f^{-1}(x) \in V' \implies x \in U' $. This is by considering $b = f(f^{-1}(b))$ and since $f$ is continuous. If one of these $V'$s is a subset of $V$ then we are done. But suppose not. I cannot proceed further. I considered arbitrarily small neighbourhoods $U'_n = \{ x \ | \ |x - b| \lt \frac 1 n \}$ but still got nowhere. 
Any help is appreciated.

REPLY [4 votes]: In general it is not true, but you can show that (supposing $f$ continuos) for every point in which $\lim_{x\to x_0} f^{-1} (x)$ exists, then it equals $f^{-1}(x_0)$.
In fact,
Let $f$ be continuos. 
We want to prove $\lim_{x \to x_0} f^{-1}(x) = f^{-1}(x_0)$.
Now, $\lim_{x \to x_0} f^{-1}(x) = (f^{-1} \circ f)(\lim_{x \to x_0} f^{-1}(x))$
But given that $f$ is continuos, we have $f^{-1}( \lim_{x \to x_0} f(f^{-1}(x)) = f^{-1}( \lim_{x \to x_0} x) = f^{-1}(x_0) $ and we are done.