The sets R (the whole real line) and 0 (the empty set) are open and closed simultaneously.
- Take any point x contained in R. Clearly, any neighborhood of x consists of real numbers, and hence is also contained in R. Therefore, R is open.
- Take the empty set. Since it does not contain any point, we do not have to check whether any neighborhoods are contained in the empty set. It is therefore open vacuously.
- Since the complement of the real line is the empty set, and the empty set is open, the real line is also closed.
- Since the complement of the empty set is the real line, and the real line is open, the empty set is also closed.