If $A \subseteq B \subseteq \overline A$ and $A$ is connected then $B$ is connected

connectednessgeneral-topologyproof-verification

Could you please verify whether my attempt is fine or contains logical gaps/errors? Any suggestion is greatly appreciated!

Let $X$ be a metric space and $A \subseteq X$ such that $A$ is connected. Prove that if $A \subseteq B \subseteq \overline A$ then $B$ is connected.

My attempt:

Assume the contrary that $B$ is not connected. Then $B= B_1 \sqcup B_2$ where $B_1,B_2$ are nonempty and open in $B$. It follows that $A = (B_1 \cap A) \sqcup (B_2 \cap A)$ where $B_1 \cap A$ and $B_1 \cap A$ are open in $A$. If $B_1 \cap A = \emptyset$ then $B_1 \subseteq A^c$. Take $b \in B_1 \subseteq \overline A$. Because $B_1$ is open in $B$, there is $r>0$ such that $\mathbb B_B(b,r) \subseteq B_1$. On the other hand, $B_1 \subseteq A^c$, so $\mathbb B_B(b,r) \subseteq A^c$ and consequently $\mathbb B_A(b,r) \subseteq \mathbb B_B(b,r) \subseteq A^c$. This contradicts $b \in \overline A$. As such, $B_1 \cap A$ is nonempty. By similar reasoning, we get $B_ 2\cap A$ is nonempty. As such, $A$ is not connected. This is a contradiction. Hence $B$ is connected.

Best Answer

Your argument is correct, but since you started with a purely topological argument (without using the fact that your space is metric), you could continue as follows:

Suppose that $B$ is the disjoint union of two open sets $B_1$ and $B_2$. Then, as you observed, $A$ is the disjoint union of $B_1 \cap A$ and $B_2 \cap A$. Since $A$ is connected, one of these sets, say $B_1 \cap A$, is empty. Thus $A \subseteq B_1^c$ and since $B_1^c$ is closed, $\overline{A} \subseteq B_1^c$. But $B_1 \subseteq B \subseteq \overline{A}$. Thus $B_1$ is empty and $B$ is connected.