# Open and Closed Intervals

We will now be looking at both open and closed intervals, both of which you have already encountered in the Real Analysis section of this site as well as through Calculus.

## Bounded Open and Closed Intervals

Definition: If $a, b \in \mathbb{R}$ such that $a < b$, then the open interval determined by the endpoints $a$ and $b$ is the set $(a, b) := \{ x \in \mathbb{R} : a < x < b \}$. The closed interval determine by the endpoint $a$ and $b$ is $[a, b] := \{ x \in \mathbb{R} : a ≤ x ≤ b \}$. Similarly the half open interval determined by the endpoints $a$ and $b$ is $(a, b] := \{ x \in \mathbb{R} : a < x ≤ b \}$ or $[a, b) := \{ a ≤ x < b \}$. |

It is important to note that in an open interval, the endpoints are not necessarily in the interval. For example, consider the interval $(2, 3)$ which is analogous to the inequality $2 < x < 3$. Notice that the values $x = 2$ and $x = 3$ do not satisfy the inequality, that is $2 \not < 2 < 3$ and $2 < 3 \not < 3$, so these values of $x$ are not in this interval.

Definition: If $a ≤ b$ defines either an open or closed interval of real numbers, then the length of this interval is $b - a$. |

For example, the length of the interval $(2, 3)$ is $3 - 2 = 1$, which should make sense since $(2, 3)$ covers a length of $1$ on the real number line. Another example is the degenerate interval $[3, 3]$ whose length is $3 - 3 = 0$.

## Unbounded Open and Closed Intervals

In the section above, we looked at bounded open and closed intervals. There are five other types of intervals, all of which are unbounded and are defined as followed with $a, b \in \mathbb{R}$:

- $(a, \infty) = \{ x \in \mathbb{R} : x > a \}$.

- $[a, \infty) = \{ x \in \mathbb{R} : x ≥ a \}$.

- $(-\infty, a) = \{ x \in \mathbb{R} : x < a \}$.

- $(-\infty, a] = \{ x \in \mathbb{R} : x ≤ a \}$.

- $(-\infty, \infty) = \mathbb{R}$.