Show that nowhere dense set under homeomorphism is nowhere dense

Given homeomorphism $$f: X \to Y$$ and nowhere dense set $$B \subset X$$ show that $$f(B)$$ is nowhere dense set in $$Y$$.

I know that:

• $$f$$ is homeomorphism $$\implies$$ $$\left(U \text{ open in } X \iff f(U) \text{ open in } Y \right) (\star$$)
• homeomorphism preserves density ($$\star \star$$)

I tried using above two to prove it but it seems a little sketchy:

$$B \text{ is nowhere dense in } X \implies \\ B^\complement \text{ is open and dense in } X \implies \\ f(B^\complement) \text{ is open and dense in } Y \text{ (using } \star \text { and } \star\star ) \implies \\ f(B) \text{ is nowhere dense in Y }$$

• @YuiToCheng is it really the proof? It seemed too simple for me so I expected a flaw in my reasoning. – math_beginner Apr 22 at 11:33
• Notice a nowhere dense set needs not to be closed, e.g. $\{1/n\}_{n\in \Bbb N}$. See Henno Brandsma's answer for the correct definition. – YuiTo Cheng Apr 22 at 11:34
• Your equivalence of nowhere dense is wrong: you need the complement of the closure of $B$ to be open and dense. – Henno Brandsma Apr 22 at 11:35
• Use that $f[\overline{A}]=\overline{f[A]}$ and likewise for interior for all subsets $A$ of $X$. – Henno Brandsma Apr 22 at 11:37

If $$f: X \to Y$$ is a homeomorphism and $$B \subseteq X$$ is nowhere dense then $$f[B]$$ is nowhere dense too:
$$B$$ is nowhere dense iff $$\operatorname{int}(\overline{B}) = \emptyset$$
$$\operatorname{int}(\overline{f[B]}) = \emptyset$$ too and hence $$f[B]$$ is nowhere dense.
• $\operatorname{int}(\overline{f[B]}) = \operatorname{int}(f[\overline{B}])$ comes from another homeomorphism definition equivalence. How exactly did you conclude that $\operatorname{int}(\overline{B}) = \emptyset \implies \operatorname{int}(\overline{f[B]}) = \emptyset$ though? – math_beginner Apr 22 at 11:47
• @Tomasz $f[\emptyset]=\emptyset$; apply $f$ to both sides of the definition of nowhere denseness of $B$ and apply the facts about interior, closures and $f$-images. – Henno Brandsma Apr 22 at 11:50