Prove that \(X\) is connected iff the only clopen subsets are \(\emptyset, X\).
Solution
1. If \(X\) is disconnected, then \(X=U\sqcup V\) for nonempty disjoint open sets \(U,V\).
This is the definition of disconnectedness.
2. Then \(U\) is a nontrivial clopen subset.
It is open, and its complement \(V\) is open, so \(U\) is closed; it is neither empty nor all of \(X\).
3. Conversely, if \(A\subset X\) is nontrivial and clopen, then \(X=A\sqcup(X\setminus A)\) is a separation.
Both pieces are nonempty, disjoint, and open because \(A\) is both open and closed.
4. Hence \(X\) is connected iff its only clopen subsets are \(\varnothing\) and \(X\).
Combine <1>1–<1>3.