Looking for an example of an infinite metric space $X$ such that there exist a continuous bijection $f: X \to X$ which is not a homeomorphism I am looking for an example of an infinite metric space $X$ such that there exists a continuous bijection $f: X \to X$ which is not a homeomorphism. Please help. Thanks in advance. 
 A: Let $A=\left\{\frac1n:n\in\Bbb Z^+\right\}$, let $Y=\{0\}\cup A$, and let $X=\Bbb Z\times Y$. Define a metric $d$ on $X$ as follows:
$$d\big(\langle m,y_0\rangle,\langle n,y_2\rangle\big)=\begin{cases}
1,&\text{if }m\ne n\\
1,&\text{if }m=n\le 0\text{ and }y_1\ne y_2\\
0,&\text{if }m=n\le 0\text{ and }y_1=y_2\\
|y_1-y_2|,&\text{if }m=n>0
\end{cases}$$
If we let $Y_n=\{n\}\times Y$ for $n\in\Bbb Z$, this definition amounts to saying that $Y_n$ is a countably infinite space with the discrete metric if $n\le 0$, $Y_n$ is homeomorphic to $Y$ with the usual Euclidean metric if $n>0$, and if $p\in Y_m$, $q\in Y_n$, and $m\ne n$, then $d(p,q)=1$. I leave it to you to check that $d$ is a metric on $X$.
Now let $f:X\to X:\langle n,y\rangle\mapsto\langle n+1,y\rangle$. It’s not hard to verify that $f$ is a continuous bijection. To see that $f$ is not a homeomorphism, consider $f(\langle 0,0\rangle)$.
A: Consider $X= \sqcup_{n\in \mathbb Z} I_n$ (i.e disjoint union)where $I_n = [0,1) when \ \ n\leq 0$ and $I_n=S^1 when \ \ n\geq 1$.
Define $f: X\to X$ s.t $f|_{I_n} : I_n \to I_{n+1}$ is a homeomorphism for $n\neq 0$ ( since in that case $I_n,I_{n+1}$ are either both intervals or circles) and for $n=0$, $f|_{I_0} : I_0 \to I_1 = S^1$ is a continuous bijection (for example exponential map).
Then $f$ is a continuous bijection , but not a homeomorphism.
A: The Cantor set minus one point.
Indeed, in general let $u:U\to V$ is a non-open continuous bijection between topological spaces. Define $X=U\times\mathbf{N}^c\sqcup V\times\mathbf{N}$ (I assume $0\in\mathbf{N}$ and I mean the complement in $\mathbf{Z}$). Define $f(x,n)=(x,n+1)$ for $n\neq 0$ and $f(x,-1)=(u(x),0)$. Then $f$ is a non-open continuous permutation of $X$.
We can apply this to $V$ Cantor, $U$ Cantor minus one point. Indeed, fix a point $x\in U$ and let $U'=U\cup\{y\}$ be the 1-point compactification of $U$ and $V$ the quotient of $U'$ identifying $x$ and $y$. Then $V$ is a Cantor space, and the canonical map induced by inclusion $U\to V$ works.
Then $X$ is also homeomorphic to $U$. Indeed, first both $U\times\mathbf{N}$ and $V\times\mathbf{N}$ are homeomorphic to $U$, and hence so is their disjoint union $X$.
(I'm using that every metrizable, non-compact locally compact, non-empty, perfect and totally disconnected topological space $X$ is homeomorphic to $U$. Indeed, the 1-point compactification of $X$ then satisfies the same properties with non-compact replaced by compact, hence is a Cantor space, so $X$ is homeomorphic to a Cantor space minus a point, and this is unique, because the Cantor space is homogeneous under self-homeomorphisms, e.g., because it admits topological group structures.)

Added: For every $(X,f)$, $X$ topological space and $f$ bijective continuous non-open self map of $X$, we can obtain a another connected example taking the cone. So all examples here can be used to provide examples to the same question for restricted to connected spaces (2011 MSE post).
