# path-connected boundary implies path-connected closure

Let $X$ be a path-connected space and $Y\subset X$ a subspace. If the boundary $\partial Y$ is path-connected then $\overline{Y}$ is also path-connected.

I tried to construct a path joining any two points in $\overline{Y}$ using the path-connectedness of $\partial Y$ but I don't see a way to do it. Also trying to show the contrapositive seems not very helpful. (Unlike statements about connectedness.) Could anyone come up with a hint?

Take $x,y \in \overline{Y}$: you need to construct a path in $\overline{Y}$ connecting $x$ with $y$. Since $X$ is path connected, there exist a path $f:[0,1] \longrightarrow X$ with $f(0)=x$ and $f(1)=y$. If $f([0,1]) \subseteq \overline{Y}$, you are done. Otherwise, call $$a= \inf \{ t \in [0,1] : f(t) \notin Y\}$$ $$b= \sup \{ t \in [0,1] : f(t) \notin Y\}$$ Show that $f(a), f(b) \in \partial Y$ (check). Connect $f(a)$ with $f(b)$ by a path $g: [0,1] \longrightarrow \partial Y$ and finally glue the three paths $f|_{[0,a]}, g , f|_{[b,1]}$ to get a path in $\overline{Y}$ connecting $x$ with $y$.