# Proving that $A \cup B$ is connected

Let $$A,B \subseteq \mathbb{R}^n$$ be connected subsets of $$\mathbb{R}^n$$ with $$A \cap B \neq \emptyset$$. Prove that $$A \cup B$$ is connected

Heres what I have so far:

Assume for the sake of contradiction that $$A \cup B$$ is not connected. Then we have by definition that $$U$$ and $$V$$ are non-empty relatively open sets in $$A \cup B$$ with $$U \cap V = \emptyset$$ and $$A \cup B = U \cup V$$. We also know that as $$U$$ and $$V$$ are non-empty relatively open sets in $$A \cup B$$, $$U$$ and $$V$$ such that $$U \subseteq A \cup B$$ and for some open set $$C$$ that $$U = (A \cup B) \cap C$$ and similarly $$V \subseteq A \cup B$$ and for some open set $$D$$ we have $$V = (A \cup B)\cap D$$.

This is about all I have from the givens, we have to come to some contradiction, but I'm not sure where it'll come from.

If anyone has any hints, I don't want the solution to this problem just a place to head towards.

• You titled this "Prove A∪B is open" but in the text you say "prove A∪B is connected". Is the second what you want? Oct 21, 2020 at 21:39
• You are correct I want to prove its connected I'll fix that right now
– Joey
Oct 21, 2020 at 21:42

## 2 Answers

Hint: Pick a point $$p\in A\cap B$$. If $$A\cup B$$ is a union of two disjoint open sets, say $$U,V$$, then $$p$$ must lie in one of them, say, $$U$$. Prove that $$U\cap A$$ is open and closed in $$A$$.

I will use this characterisation of connected space : a topological space $$X$$ is connected if and only if every continuous function $$f : X \to \{0,1\}$$ is constant.

Suppose $$A$$ and $$B$$ are connected topological spaces and that $$A\cap B \neq \varnothing$$. Let $$x\in A\cap B$$.

Let $$f : A\cup B \to \{0,1\}$$ be continuous. Then its restrictions $$f_A$$ to $$A$$ and $$f_B$$ to $$B$$ are continuous too. As $$A$$ is connected and $$x \in A$$, $$f_A$$ is constant and takes only $$f(x)$$ as a value. Similarly, $$f_B$$ is constant and takes only $$f(x)$$ as a value. Thus, $$f$$ is constant, and $$A\cup B$$ is connected.