Question about bijective functions and homeomorphism Is it true that 
"If two metric spaces each of which is the image of the other under a bijective continuous function, then the two metric spaces are homeomorphic."??
Thank you so much!!
 A: I posted a very similar question on mathoverflow (link) and one of the replies there is a reasonably easy metrisable one:
Let $X$ and $Y$ be spaces with underlying set $\mathbb{R}$. On $X$ we put the topology that consists of the usual topology on $(0,\infty)$ and the discrete metric on all $x \le 0$. On $Y$ we put the topology that is the usual one on $(-1,0)$ and $(1,\infty)$ and is discrete everywhere else. 
Now $f(x) = x+1$ is a continuous bijection from $X$ to $Y$ and also a continuous bijection from $Y$ to $X$.
But they are not homeomorphic as $X$ as one non-trivial component, and $Y$ has two.
A: This is the case if one is compact. This is the case because metric spaces are Hausdorff. If you know one is compact then you only need the existence of one continues bijection. (the compactness of the other then follows from the homeomorphism). More detail can be found here: https://proofwiki.org/wiki/Continuous_Bijection_from_Compact_to_Hausdorff_is_Homeomorphism
A: From the definition of two homeomorphic spaces, we would require that the bijection has a continuous inverse. If one of the spaces is compact, then we are guaranteed a continuous inverse.
So if one space is compact, then the bijection is indeed a homeomorphism. It then follows that, since compactness is a topological property (i.e., topologically invariant), the other space will be compact as well.
