An interval on the real line is the set of all numbers that fall between two specified endpoints.
Let a and b be real numbers with a < b. We can have the following types of finite intervals:




The values a and b are called endpoints because they're the points at either end of the interval.
To remember which of the two intervals (a,b) or [a,b] includes the endpoints a and b, try thinking of the interval notation like arms. If the arms are like the brackets [a,b] then they are holding a and b firmly in there. If arms are like the parentheses (a,b), then the endpoints a and b slip out.
The interval (a,b) is called open, while the interval [a,b] is called closed. The intervals [a,b) and (a,b] are neither open nor closed. We might hear these intervals called "half-closed," "semi-closed," "half-open", or "semi-open".
We can also have infinite intervals. Since ∞ isn't a number, we'll always have parentheses around ∞ or ∞, not the closed brackets. Here are the types of infinite intervals we can have, assuming that a is some finite number:
The infinite intervals (-∞, ∞), (-∞, a], and [a,∞) are closed intervals. The infinite intervals (-∞,a) and (a,∞) are open.
The infinite intervals (-∞, ∞), (-∞, a], and [a,∞) are closed intervals. The infinite intervals (-∞,a) and (a,∞) are open.