Connectedness of a Set between a Set and Its Closure Let $\ (M, d)$ be a metric space and $\ A ⊂ M $ and $\ A $ is connected. $\ (A, d_A)$ is a notation of induced metric. 
Here I want to show that "if $\ A⊂B⊂cl(A)$,  B is  connected".
I had already shown that if $\ A $ is connected, then $\ cl(A)$ is also connected. and try to use the notion of induced metric of $\ (B, d_B)$, however, can't proceed from this point. 
 A: Lemma $M$ is connected iff every continuous function $f:M\to \{0,1\}$ is constant.
Let $A$ connected, $A\subseteq B\subseteq \bar{A}$ and $f:B\to \{0,1\}$ continuous. By the lemma, $f$ is constant in $A$. Since for every continuous function we have $f(\bar{A})\subseteq \overline{f(A)}$ we deduce
$$ f(B)=f(\bar{A})\subseteq \overline{f(A)}=f(A) $$
In the last step we used that $f$ is constant in $A$.
Note: this proof works in any topological space.
A: Suppose that $B$ is not connected, or equivalently that a separation of $B$ exists.
That is a pair of sets $\left\{ P,Q\right\} $ with:


*

*$P\neq\varnothing$ and $Q\neq\varnothing$

*$P\cup Q=B$

*$\overline{P}\cap Q=\varnothing$ and $P\cap\overline{Q}=\varnothing$. 


If $P\cap A\neq\emptyset$
and $Q\cap A\neq\emptyset$ then $\left\{ P\cap A,Q\cap A\right\} $
is a separation of $A$. 
No such separation exists since $A$ is connected,
so we conclude that $P\cap A=\emptyset$ or $Q\cap A=\emptyset$.
If $Q\cap A=\emptyset$ then $A\subseteq P$ and consequently $Q\subseteq B\subseteq\overline{A}\subseteq\overline{P}$.
Then we find that $\overline{P}\cap Q=Q\neq\varnothing$ contradicting that
$\left\{ P,Q\right\} $ is a separation. 
Likewise the assumption $P\cap A=\varnothing$
leads to a contradiction.
Proved is now that no separation of $B$ exists, or equivalently that $B$ is connected.
A: Let $C,D$ be open in $M$ with $C\cup D\supset B$ and ($C \cap B)\cap (D\cap B)=\phi.$ We need to show that $C\cap B=\phi \lor D\cap B=\phi.$ 
Since $A\subset B$ we have $C\cup D\supset A$ and $(X\cap A)\cap (D\cap A)=\phi.$ And since $A$ is connected, we have $(C\cap A)=\phi \lor (D\cap A)=\phi.$ So WLOG $$(*)\quad C\cap A=\phi.$$ 
Now if $p\in C\cap B$ then, as $p\in \bar A$ and $C$ is a nbhd of $p,$ we have $C\cap A\ne \phi,$ contrary to (*).
So $C\cap B=\phi.$
Equivalently  we can note  that  an open set $C$ which is disjoint from $A$ is disjoint from $\bar A$, and therefore is disjoint from $B.$  
Remark: The case where $A$ is dense in $M$ shows that if $M$ has a connected dense subspace then $M$ is connected.
A: Assume $B = X\sqcup Y$, where $X$ and $Y$ are open in $B$. Suppose $X\neq \varnothing$. Letting $X_A = X\cap A, Y_A = Y\cap A$, we have  $A=X_A \sqcup Y_A$ (since $A\subseteq B$, $X_A$ and $Y_A$ are open in $A$). Since $A$ is connected, either $X_A = \varnothing$ or $Y_A = \varnothing$. These two cases are handled separately. 
If $X_A = \varnothing$, then $X\subseteq \partial_M A$. In paricular, there exists $x\in X\cap \partial_M A$ (since $X$ is assumed to be nonempty). Any $B$-neighborhood of $x$ then contains points from $A$, and therefore points from $Y$ (why?). This means that $X$ is not open in $B$, a contradiction. 
Now suppose $Y_A = \varnothing$, so that $A\subseteq X$. The same argument as above shows that $Y=\varnothing$, for if $Y$ contained a boundary point of $A$, then $Y$ would not be open in $B$. 
Thus, $X=B$ and $Y=\varnothing$. It follows that $B$ is connected. 
