Definition 1.1. A topological space (X,T) is disconnected if and only if there exist disjoint, non-empty open subsets A and B of X such that X = A ∪ B. Otherwise, we say that (X,T) is connected.
As the next exercise illustrates, connectedness relies on the topology on X, not the set itself.
Exercise 1.2. (HW) Show that ℑ with the discrete topology is disconnected and that ℑ with the trivial topology is connected.
Proposition 1.3. Let (X,T) be a topological space. Then X is disconnected if and only if there are non-empty, disjoint closed subsets A, B of X such that X = A ∪ B.
Proposition 1.4. A topological space (X,T) is connected if and only if the only subsets of X that are both open and closed are ∅ and X.
Connectedness of a subspace of a topological space has a similar description.
Proposition 1.5. Let Y be a subspace of a topological space (X,T). The following are equivalent:
(1) Y is disconnected.
(2) There exist open subsets A, B of X such that Y ⊆ A ∪ B, A ∩ Y ≠ ∅, B ∩ Y ≠ ∅, and A ∩ B ⊆ X - Y.
(3) There exist closed subsets A, B of X such that Y ⊆ A ∪ B, A ∩ Y ≠ ∅, B ∩ Y ≠ ∅, and A ∩ B ⊆ X - Y.