Overview
In topology, a clopen set (a portmanteau of closed-open set) in a topological space is a set which is both open and closed. That this is possible may seem counter-intuitive, as the common meanings of and are antonyms, but their mathematical definitions are not mutually exclusive. A set is closed if its complement is open, which leaves the possibility of an open set whose complement is also open, making both sets both open closed, and therefore clopen. As described by topologist James Munkres, unlike a door, "a set can be open, or closed, or both, or neither!" emphasizing that the meaning of "open"/"closed" for is unrelated to their meaning for (and so the open/closed door dichotomy does not transfer to open/closed sets). This contrast to doors gave the class of topological spaces known as "door spaces" their name.
Examples
In any topological space the empty set and the whole space are both clopen.
Now consider the space which consists of the union of the two open intervals and of The topology on is inherited as the subspace topology from the ordinary topology on the real line In the set is clopen, as is the set This is a quite typical example: whenever a space is made up of a finite number of disjoint connected components in this way, the components will be clopen.
From Wikipedia (CC BY-SA 4.0).