# Given $A\cap \overline{B}\neq \emptyset$, prove $A\cup B$ connected.

$A,B$ are connected subsets of a topological space $X$.

What I've tried:

As $B$ is connected, so is its closure $\overline{B}$. We have:

$\overline{B}\cap A\neq \emptyset$

$\overline{B} \cap B\neq \emptyset$

hence, $\overline{B}\cup A \cup B$ is connected. However, this isn't what I want.

I was thinking of trying to show that $A\cap \overline{B} \neq \emptyset$ implies $A \cap B \neq \emptyset$, though I don't think this would be true if $A$ is closed.

Any hints?

• Let $A=[0,1]$ and $B=(1,2)$. Then $A \cap \bar{B} = \{1\} \neq \emptyset$ however $A \cap B = \emptyset$. So $A \cap \overline{B} \neq \emptyset$ does not imply $A \cap B \neq \emptyset$. – Hetebrij Sep 11 '15 at 17:22

Hint: Use that $X$ is connected $\iff$ the only continuous functions $f:X\to\{0,1\}$ are constant, where $\{0,1\}$ is endowed with the discrete topology.
Consider a continuous function $f :A \cup B \to \{0,1\}$ and restrict it to $A$ and $B$ and use the fact $A$ and $B$ are connected.Can you conclude from here i.e. can you show that $f$ is constant ?
• $f:A\rightarrow {0,1}$ and $f:B\rightarrow {0,1}$ are both constant. Consider $x\in A\cap \overline{B}$. Whatever it maps to, every element in $A$ maps that same element. However, $x$ need not be in $B$, so how can I conclude that every element in $B$ maps to the same thing that every element in $A$ maps to? – man_in_green_shirt Sep 11 '15 at 17:43
• Can you show that $f$ on $\overline B$ is also constant?(Since $f$ is continuous) – Arpit Kansal Sep 11 '15 at 17:44
• As $B$ is connected, so is $\overline{B}$. Hence, $f$ on $\overline {B}$ is constant and this proves the claim. Thanks! – man_in_green_shirt Sep 11 '15 at 18:09
• However, I haven't used the continuity of $f$ to prove it. The proof I know that $B$ connected implies $\overline{B}$ connected doesn't use continuous functions. How would you show it using the continuity of $f$? – man_in_green_shirt Sep 11 '15 at 18:10
• Well,note that initially $f$ is not defined on $\overline B$ So You can't use connectedness of $\overline B$.But for an element b in $\overline B$ \B choose a sequence $b_n$ in $B$ which converges to $b$,and use continuity of $f$ on $B$ – Arpit Kansal Sep 11 '15 at 18:13