An open set in \(\mathbb{R}\) is a set \(A\) such that for every \(x \in A\) there exists an interval \((a, b)\) satisfying the following:
Open sets include sets or unions of sets of the following forms:
The set \((1, 2),\) which is interval notation for the set \(\{x \in \mathbb{R} : 1 < x < 2\},\) is an open set. Another open set is
\[(-\infty, 4) \cup (10, 12) \cup (59, \infty)\]
since a union of the sets listed above are open in \(\mathbb{R}.\)
A more complicated open set is
\[\bigcup_{i=1}^\infty \left(\frac{1}{4i}, \frac{1}{4i-1}\right)\]
The set \((1, 5]\) is not open because it includes the endpoint \(5\). A set of one point such as \(\{-2\}\) is not open because an open set must either be empty or contain an interval of points. In particular, neither \((1, 5]\) nor \(\{2\}\) are unions of the sets described above.
An closed set in \(\mathbb{R}\) is any set whose compliment is open.
Closed sets include sets or intersections of sets of the following forms:
The set \((-1, 3),\) which is interval notation for the set \(\{x \in \mathbb{R} : -1 \leq x \leq 3\},\) is a closed set. Another closed set is
\[(-\infty, 1] \cup [55, 58] \cup [67, \infty)\]
since the compliment is an open set.
A more complicated open set is
\[\bigcap_{i=1}^\infty \left[2-\frac{1}{i}, 2+\frac{1}{i}\right] = \{2\}\]
So, single point sets are closed sets. The compliment is \(\{2\}^C = (-\infty, 2) \cup (2, \infty)\) is open.
The set \((1, 5]\) is not closed because it does not include the endpoint \(1\).