The Characterization Theorem for Intervals
We have just looked at Open and Closed Intervals. The following theorem will verify that if we have an interval, then this interval contains all points in between its endpoints, for example, the interval $(2, 4)$ must contain all values of $x$ such that $2 < x < 4$, e.g., $3 \in (2, 4)$.
 Theorem 1 (Characterization of Intervals): Let $S \subseteq \mathbb{R}$ that contains at least two points. Then if $S$ has the property such that if $x < y$ and $[x, y] \subseteq S$, then $S$ is an interval.
• Case 1: Suppose that the set $S$ is bounded. Since this set is nonempty and bounded, by the completeness property, this set contains an supremum (and similarly, an infimum). Let $a = \inf S$ and let $b = \sup S$. Therefore, for all $s \in S$ we have that $a \leq s \leq b$ and so $S \subseteq [a, b]$. Now we want to show that $(a, b) \subseteq S$. Let $z \in (a, b)$. Therefore $a < z < b$. Therefore $z$ is not a lower bound of the set $S$, so there exists an $x \in S$ such that $x < z$. Similarly, $z$ is not an upper bound of the set $S$ so there exists a $y \in S$ such that $z < y$. Combining these two inequalities we get that $x < z < y$. Now since $x < y$ and $[x, y] \subseteq S$, we thus have that $z \in [x, y]$. Therefore $(a, b) \subseteq S$. So $S$ is an interval. Either $S = [a, b]$, $S = [a, b)$, $S = (a, b]$ or $S = (a, b)$ depending on whether the end points $a, b$ are contained in $S$ or not.
• Case 2: Suppose that $S$ is bounded above only. Then let $b = \sup S$. Therefore, $\forall s \in S$ we have that $s ≤ b$ and so $S \subseteq (-\infty, b]$. We now want to show that $(-\infty, b) \subseteq S$. Let $z \in (-\infty, b)$. Then $z < b$, so $z$ is not an upper bound to this set. So there exists a $y \in S$ such that $z < y$. Furthermore, since this set is not bounded below, then there exists an $x \in S$ such that $x < z$. Combining these inequalities we have that $x < z < y$, and so $x < y$ and $[x, y] \subseteq S$ so $z \in [x, y]$, and once again, since $z$ is arbitrary this implies that $(-\infty, b) \subseteq S$. Therefore $S = (-\infty, b]$ or $S = (-\infty, b)$ depending on whether $b \in S$.
• Case 3: Suppose that $S$ is bounded below only. Then let $a = \inf S$. Therefore $\forall s \in S$ we have that $a ≤ s$ and so $S \subseteq [a, \infty)$. We now want to show that $(a, \infty) \subseteq S$. Let $z \in (a, \infty)$. Then $a < z$, so $z$ is not a lower bound to this set. So there exists an $x \in S$ such that $x < z$. Furthermore, since this set is not bounded above, then there exists a $y \in S$ such that $z < y$. Combining these inequalities we have that $x < z < y$, and so $x < y$ and $[x, y] \subseteq S$ so $z \in [x, y]$, and since $z$ is arbitrary this implies that $(a, \infty) \subseteq S$. Therefore $S = [a, \infty)$ or $S = (a, \infty)$ depending on whether $a \in S$.
• Case 4: Suppose that $S$ is not bounded above and not bounded below. Then clearly $S \subseteq (-\infty, \infty)$. We now want to show that $(-\infty, \infty) \subseteq S$. Let $z \in (-\infty, \infty)$. Then since this set is unbounded there exists $x, y \in S$ such that $x < z < y$. We have that $x < y$ and $[x, y] \subset S$, so then $z \in [x, y]$. Since $z$ is arbitrary this implies that $(-\infty, \infty) \subseteq S$. Therefore $S = (-\infty, \infty)$. $\blacksquare$