Sets that are both open and closed — clopen. In R only ∅ and R qualify (proved in full), but change the ambient space and the same set's fate changes: [0,1] is merely closed in R, yet clopen inside [0,1]∪[2,3].
Let A⊆R be both open and closed (clopen), with ∅=A=R. Derive a contradiction, proving completely that the only clopen subsets of R are ∅ and R itself.
clopen in R⟹A=∅ or A=R
X=R, A=(0,1): open but not closed — no nontrivial clopen set exists in R.Show proof
If A is clopen then so is its complement Ac: A open makes Ac closed, and A closed makes Ac open. Since A=R we have Ac=∅, and since A=∅, A itself is nonempty.
Hence R=A∪Ac is a decomposition into two disjoint nonempty open sets — a separation of R. Now we show R is connected. Suppose R=U∪V with U,V disjoint nonempty open; pick a∈U, b∈V (renaming so a<b).
Put c=sup(U∩[a,b]) (nonempty, containing a; bounded above by b). U is not only open but also closed, since U=R∖V. Now c lies in the closure of U∩[a,b], so c∈U=U. We have c≤b, and c=b (as b∈V and the sets are disjoint), so c<b. Since U is open, (c−ε,c+ε)⊆U for some ε>0; but then c+ε/2∈[a,b] exceeds c while belonging to U∩[a,b] — contradicting c=sup. Hence no separation of R exists.
This contradicts the separation from the second step, so the assumed nontrivial clopen set A cannot exist: the only clopen subsets of R are ∅ and R. The scene's A=(0,1) is open but not closed, dodging this theorem — closing it would require adding the missing limit points 0,1, which would break openness.
For the subspace X=[0,1]∪[2,3]⊆R and A=[0,1], prove completely that A is clopen in X but not open in R.
[0,1]=X∩(−1/2,3/2)=X∩[−1/2,3/2]
x=1, ε=0.5: even at the boundary point 1, (1−0.5,1+0.5)∩X=(0.5,1]⊆A, so the ball stays in A relative to X — openness in X made visible.Show proof
Openness in X: check [0,1]=X∩(−1/2,3/2). The inclusion ⊆ is clear; conversely a point of X∩(−1/2,3/2) lies in [0,1] or in [2,3]∩(−1/2,3/2), and the latter is empty, so it lies in [0,1]. Since (−1/2,3/2) is open in R, [0,1] is open in X.
Closedness in X: the same argument gives [0,1]=X∩[−1/2,3/2] (since [2,3]∩[−1/2,3/2]=∅). As [−1/2,3/2] is closed in R, [0,1] is closed in X. Hence [0,1] is clopen in X.
Not open in R: 1∈[0,1], yet every ball (1−ε,1+ε) contains 1+ε/2∈/[0,1]. So the same set [0,1] is clopen in X while in R it is merely closed, not open — clopenness is relative to the ambient space.
Let X be a topological space and A⊆X clopen. Prove completely that if ∅=A=X then X is disconnected.
X=A∪Ac,A∩Ac=∅,A,Ac=∅ open in X
X=(0,1)∪(1,2), A=(0,1): X=A∪Ac is a separation into disjoint nonempty opens — showing X is disconnected.Show proof
If A is clopen then so is its complement Ac=X∖A: complementation swaps openness and closedness (A open makes Ac closed; A closed makes Ac open).
Since ∅=A=X, both A and Ac are nonempty. Moreover X=A∪Ac, A∩Ac=∅, and both are open in X — a separation of X. Hence X is disconnected.
The converse holds too: if X=U∪V is a separation then U=X∖V is also closed, hence clopen. So "a nontrivial clopen set exists" is equivalent to "disconnected". Problem 1 above is the special case X=R — since R is connected, no nontrivial clopen set can exist there.