In everyday speech, we may refer to intervals of time and, sometimes, intervals of distance. In each case, we are thinking of a quantity that can be represented by the real number line.
In mathematics, we take the word interval to mean a single portion of the number line. The real numbers have the property that, for any two distinct numbers, it is always true that one is greater than the other. We use this property to define particular intervals.
Suppose we have two numbers $a$a and $b$b that we can think of as end-points for an interval. Another number $x$x belongs to the interval if we can say both $a
If $a=2$a=2 and $b=15$b=15 are end-points of an interval, then every number $x$x such that $2
We often combine the two inequalities into the one statement: $2
Notice that in the example above, the end-points are not in the interval. Every number between the end-points is in the interval but the end-points themselves are excluded.
Intervals of this kind are called open intervals.
We define intervals that do include one or both end-points, using the idea of less than or equal to. Thus, we might have $a\le x\le b$a≤x≤b, where $x$x can be any number strictly between $a$a and $b$b or it can be either $a$a or $b$b.
A shorthand way of specifying such an interval is the notation $\left[a,b\right]$[a,b] using square brackets.
Intervals of this kind, that include both end-points, are called closed intervals.
We can also define half-open intervals that include one but not both end-points. The following ways of notating a half-open interval are equivalent.
In this case, the left end-point is included in the interval but the right end-point is excluded.
It is possible for an interval to be unbounded on one or both sides. In such a case we use the $\infty$∞ symbol. The interval is open on a side that is unbounded. So, we write
$(-\infty,\infty)$(−∞,∞) to mean the whole of the number line,
$\left[0,\infty\right)$[0,∞) to mean the non-negative real numbers, and
$\left(-\infty,0\right)$(−∞,0) to mean the negative real numbers.
Consider the intervals $\left(-\infty,2\right)$(−∞,2) and $\left(2,\infty\right)$(2,∞). The real number $2$2 is not in either interval. However, numbers very close to $2$2 are certainly in either the lower or the upper interval.
We say $2$2 is the least upper bound of the interval $\left(-\infty,2\right)$(−∞,2) and we say $2$2 is the greatest lower bound of the interval $\left(2,\infty\right)$(2,∞).