Interval
Intervals are used widely in maths and appear in all sorts of definitions. An interval is a set of points bounded by two endpoints. We also distinguish between open and closed intervals.
Basic description
We use intervals in everyday speech too, for example “for the wrong colour of your eyes you can be fined an amount in the range £100 to £200”. The example uses the word “range”, but mathematically speaking it is an interval. Now the tricky questions arise: can you be fined exactly £100, or is the end of the range not included? How finely can the fine be set? Could I be fined £185.42? Or can it only go up in whole pounds? That is, either £185 or £186?
All of this is settled by mathematical notation. With it we have to say two important things: which set we are working in (in the context of the example – pence? Whole pounds? Tens of pounds?) and whether the endpoints belong to the interval (can I be fined exactly £100 or £200?).
The good news is that in the vast majority of cases in maths we want an interval to work with the set of real numbers, so if you come across an interval with no set specified, it is certainly the real numbers.
We already have the underlying set, so how do we show whether we want to count the endpoints? Intervals are written with brackets. A round bracket means that the endpoint does not belong to the interval, and a square bracket means that it does. We call this openness and closedness. If an endpoint belongs to the interval, the interval is closed there; if it doesn't, the interval is open there.
Examples
Here are some examples (all in the set of real numbers unless stated otherwise):
- [1, 2] The closed interval from one to two. The interval contains all the real numbers between one and two, including one and two themselves.
- (1, 2) The open interval from one to two. The interval contains all the real numbers between one and two, but the numbers one and two themselves do not belong to it.
- [0, 1) The interval is closed on the left and open on the right. The interval contains all the numbers between zero and one, including zero itself, but one does not belong to the interval.
- (p, q] The interval is open on the left and closed on the right. The interval contains all the numbers between p and q, including q but excluding p.
- [0, ∞) Closed on the left and open on the right. If an interval has infinity in it, use an open end on that side: infinity has no finite endpoint, so a closed end makes no sense there.
- [1, 5] ⊆ ℤ+ Here comes a change: we are not working with the set of real numbers but with the set of positive integers. We have an interval closed on both sides, and it contains five numbers in total: 1, 2, 3, 4 and 5.
- (1, 5] ⊆ ℤ+ The same case as a moment ago, except that the interval is open on the left, so one does not belong to the interval and the list of all its elements is: 2, 3, 4 and 5.
An interval as a set
As you can see, an interval is nothing other than a subset of the set it is defined over. So we can work with intervals as with sets and carry out set operations on them. For example, a union could look like this:
Watch out for open intervals, because there the equality would not hold, since five does not belong to the resulting interval:
It could correctly look, for example, like this:
When to use an open interval
You need to understand the difference between an open and a closed interval. A common use of an open interval is, for example, the domain of the logarithm. We can use the logarithm with any positive real number, which means that we can't use it with a negative number, or with zero. How do we write that? The domain of ln is the interval
This notation says that we can use the logarithm with any positive number, however small, but we must not use it with zero. So, for example, the number 1 belongs to the interval, and so do 0.001, 0.0000000001 and 10−666. But zero does not belong to the interval. Similarly, we could write the domain of a function containing a fraction, for example the ordinary f(x) = 1/x. The domain of f is
This marks out the set of real numbers without zero. In neither interval is zero at the end of a closed interval, so zero will not be in the resulting union either. However, we can use any small positive number or any large negative number (for negative numbers, −0.001 is greater than −0.1, which is why it is “any large number” and not “any small number”).
Geometric interpretation
We usually show intervals on a number line as line segments, and we choose the endpoints according to whether the interval is closed or open. If the interval is closed, the dot showing the point is filled in; if it is open, the dot is not filled in – it is just an outline, just a circle.
The following figure shows three intervals, each from two to six, but differing in whether their ends are closed. So in order, the intervals shown are: [2, 6], (2, 6], (2, 6).