Connected subsets one of which meets the closure of the other

Exercise 224 (Chapter 32, “Connectedness”):

Let A and B be connected subsets of topological space X such that A intersects \Cl(B). Prove that A \cup B is connected. Find an example to show that it is not enough to assume that \Cl(A) intersects \Cl(B).

Let us assume that V and W are open subsets of X such that V \cap W \cap (A \cup B) is empty and that A \cup B \subseteq V \cup W. To show that A \cup B is connected, we need to show that either V or W does not intersect A \cup B.

Since A is connected, and V \cap W \cap A is empty and A \subseteq V \cup W, necessarily A is entirely in V or in W. Similarly, B is entirely in V or entirely in W.

Let us suppose that they are not both in V or both in W; for instance, that A \subseteq V and B \subseteq W.

If a \in A, then a \in V with V open in X. Since V does not intersect B, a cannot be in \Cl(B). Hence A cannot intersect \Cl(B). This contradicts our assumption.

Hence it is impossible that A \subseteq V and B \subseteq W. Similarly, it is impossible that A \subseteq W and B \subseteq V. Thus, A and B are either both in V or both in W, which implies that either V or W does not intersect A \cup B. \blacksquare

If we only assume that \Cl(A) and Cl(B) intersect, it does not always follow that A \cup B is connected. For instance, let X be the topological plane and A and B two open disks that “almost touch”, that is such that the corresponding closed disks ‑ which are their closures ‑ intersect in one point. The union of A and B is then not connected.