Give an example of a complete metric space $X$ and a function $f: X \to X$ which is a continuous bijection such that $f^{-1}$ is not continuous. This is an offshoot of the following: Finding an (easy) example of a bijective continuous self mapping whose inverse is not continuous
There are examples where the domain and range are not the same and examples where completeness is not a requirement. Of course, OMT shows that we cannot take a linear map between Banach spaces. I tried some non-linear maps on Banach spaces but I didn't succeed in finding an example. Thank you for your time.
If we let $M$ be the union of countably infinitely many lines and lollipops in the plane, as shown above, with the induced Euclidean metric, then I claim that there exists a bijection which satisfies the conditions.
(the lines are infinitely long, and the lollipops extend infinitely off to the right).
Indeed, it suffices to show that there is such a bijection from a line to a lollipop -- if we label the lines $\ell_1,\ell_2,\ldots$ and the lollipops $\mathcal l_1,\mathcal l_2,l\ldots$, then it's trivial to find a bijection $f:\ell_{i+1}\to\ell_i$ for $i\ge1$ and similarly for the lollipops. To find a bijection with no continuous inverse, we just "wrap" the line around the lollipop as shown below:
Note that the endpoint of the line is open (so it's homeomorphic to "half" of a line), and thus this map is continuous, but the inverse isn't at that intersection.
If you further require this space to be connected, we can trivially draw a vertical line through all the lines and lollipops to the right, and move this line up with everything else.