We have now characterized compactness and perfectness. We turn to a third property: connectedness. Informally, a connected set is one that is "all in one piece." Making this precise is more subtle than it sounds.
Let A = (1,2) and B = (2,5). Work through the following:
Observation: For A = (1,2) and B = (2,5): neither set contains a limit point of the other, even though they share the limit point 2. For C = (1,2] and D = (2,5): the closure of C hits D, so they are not separated in the same way. This "mutual closure-disjointness" is the right notion of separation.
Two nonempty sets A, B ⊆ ℝ are separated if $$\overline{A} \cap B = \emptyset \quad\text{and}\quad A \cap \overline{B} = \emptyset.$$ A set E ⊆ ℝ is disconnected if it can be written as E = A ∪ B for some nonempty separated sets A and B. A set is connected if it is not disconnected.
Example 1: Let A = (1,2) and B = (2,5). Consider: E = (1,2) ∪ (2,5). Is the set E connected?
Example 2: Let C = (1,2] and D = (2,5), so that C ∪ D = (1,5). Does the pair C, D give a separation of (1,5)?
The surprising result is that in ℝ, connected sets are exactly intervals.
A set E ⊆ ℝ is connected if and only if: whenever a, b ∈ E and a < c < b, we have c ∈ E.
In other words, E is connected ⟺ E is an interval.
Proof sketch:
(⟹): Suppose E is connected. Let a, b ∈ E with a < c < b. Define: $$A = (-\infty, c) \cap E \quad \text{and} \quad B = (c, \infty) \cap E.$$
Therefore this direction is proved. ∎
(⟸): Conversely, assume that E is an interval: whenever a, b ∈ E satisfy a < c < b for some c, then c ∈ E.
Let E = A ∪ B with A, B nonempty and disjoint. We show A and B are not separated.
Pick a0 ∈ A, b0 ∈ B, and assume WLOG a0 < b0.
Step 1: Why is I0 = [a0, b0] ⊆ E?
Step 2: Bisect I0 at its midpoint m. The midpoint lies in A or B. Explain why we can always choose a half I1 = [a1, b1] ⊆ I0 so that a1 ∈ A and b1 ∈ B.
Step 3: Continuing, we get nested intervals I0 ⊇ I1 ⊇ I2 ⊇ ⋯ with:
By the Nested Interval Property, there exists
Step 4: Show that an → x and bn → x.
Step 5: Prove that A and B are not separated.
Therefore, E is connected. ∎