# homotopy type of the closure of a subset

Let $X$ be a topological space and $N$ a subset of $X$. Is it true that the closure of

$N$ in $X$ is homotopy equivalent to $N$. I think it is not. take for example $N=\mathbb Q\subset \mathbb R=X$. Then $\bar Q=\mathbb R$ is contractible while $\mathbb Q$ is not even connected. This question came to my mind when i read that a submanifold with boundary keeps its homotopy type after removing its boundary.

Are there conditions where the closure of a subset has the homotopy type of the subset?

Thank you in advance.

-
You will certainly need closures of path connected subspaces to remain path connected. This problem was briefly discussed in this question and it doesn't seem to have a nice resolution. –  Miha Habič Oct 15 '12 at 19:42
keeping the path connectivity property when passing to the closure, only ensures having the same $\pi_0$ and it is far from proving having the same homotopy type –  palio Oct 15 '12 at 19:58
I still beleive that if $N$ deformation retracts onto a subset $V$ then $\bar N$ also deformation retracts onto $V$. –  palio Oct 15 '12 at 20:03
I mentioned the path connectedness thing as a necessary condition for what you want to achieve. Also, your claim in the second comment cannot possibly be correct as you main post shows. $\mathbb{Q}$ deformation retracts onto $\mathbb{Q}$ but $\mathbb{R}$ doesn't. –  Miha Habič Oct 15 '12 at 21:21
This is true for any open subset of R^n... and probably for any open subset of a smooth manifold... –  Dylan Wilson Oct 17 '12 at 23:13