Given a completely metrizable space, say that it has property X if it can be embedded in some metric space such that its image is not closed. For example, the real line R can be embedded, topologically, in itself as (0,1) which is not closed. A compact space such as S^1, however, clearly cannot be embedded in any metric space in this way.


1. Is it true that a space has property X iff it can be embedded in itself in this way? My intuition says no, but I can't think of a counterexample offhand, partly because I don't know any interesting non-compact metric spaces.
2. Is property X equivalent to not being compact? If every non-compact (completely metrizable) space has a metrizable compactification then this is easy, but I don't know whether that is the case, although I suspect it might be. Which leads onto the following weaker question:
3. Given a space which does not have property X, can it be embedded in a space which does? Here my intuition says yes, this should be the case, but I can't think of a more general approach for constructing a suitable embedding space than compactification which, as I said, I can't prove will give a metrizable space. I don't think I know enough topology (I've only taken a couple of basic undergraduate courses).


Edit: 3. above should read "given a space which has property X, can it be embedded in a space which does not?



Topological embeddings of non-compact, complete metric spaces
The answer to 2 is yes. Let $(X,d)$ be complete but not compact, then for some $r>0$ it has a countable r-separated subset $S=\{s\_i\}:i=1,2,\dots$. Let $d'$ be the maximal metric on $X$ satisfying $d'\le d$ and $d'(s\_i,s\_j)\le r/\min(i,j)$ for all $i,j$. Then $(X,d')$ is homeomorphic to $(X,d)$ - in fact, the identity map is a local isometry - but $d'$ is not complete. So we have embedded the space into the completion of $(X,d')$ as a non-closed subset.


The metric $d'$ can be constructed explicitly: $d'(x,y)$ is the minimum of $d(x,y)$ and the infimum of sums $d(x,s\_i)+d(x,s\_j)+r/\min(i,j)$ over all pairs of $i,j$. Verifying the triangle inequality is straightforward.


As for 3, the answer is no, because you cannot embed any complete space into a compact space. For example, a non-separable Banach space cannot be so embedded, as Qiaochu Yuan explained in comments.


**Update.** It seems that I misunderstood Q3. As stated, it asks whether every compact space can be embedded into a complete non-compact one. The answer is of course yes, as Ady noticed.


