# Interval (mathematics)

In mathematics, an interval is a set of real numbers with the property that any number that lies between two numbers in the set is also included in the set. For example, the set of all numbers $x$ satisfying $0\le x\le 1$ is an interval which contains $0$ and $1$, as well as all numbers between them. The set of positive numbers is also an interval.

## Notations for intervals

The interval of numbers between $a$ and $b$ including $a$ and $b$ is often denoted $[a,b]$. If one of the endpoints is to be omitted, then the corresponding square bracket is replaced by a parenthesis. Thus, in set builder notation,

$(a,b)=\{x\in\R\,|\,a<x<b\}$,
$[a,b)=\{x\in\R\,|\,a\le x<b\}$,
$(a,b]=\{x\in\R\,|\,a<x\le b\}$,
$[a,b]=\{x\in\R\,|\,a\le x\le b\}$.

In the above, we may take $a=-\infty$ or $b=\infty$ at an omitted endpoint. For example, $(0,\infty)$ is the interval of positive numbers.

## Alternative notation

International standard ISO 31-11 also defines another notation for intervals, which is the one commonly taught in many European and South American countries (e.g., Germany, France, Brazil) in secondary school:

• $\left]a,b\right[ = \{x\,|\, a< x < b\}$
• $\left[a,b\right[ = \{x\,|\, a\le x < b\}$
• $\left]a,b\right] = \{x\,|\, a< x \le b\}$
• $[a,b] = \{ x \,| \,a \le x \le b \}$

This notation is somewhat easier to remember (inwards pointing bracket for inclusion, outwards-pointing bracket for exclusion). Another advantage is that this notation does not overlap with the tuple notation, which is equally commonly used in set theory.

Where numbers are written with a decimal comma, the endpoints in the interval notation may also be separated by a semicolon instead of a comma, to avoid ambiguity.

## Types of intervals

Intervals in $\mathbb{R}$ are of the following eleven different types (where $a$ and $b$ are real numbers, with $a < b$):

Bounded nondegenerate intervals:

1. $(a,b)=\{x\,|\,a<x<b\}$
2. $[a,b]=\{x\,|\,a\leq x\leq b\}$
3. $[a,b)=\{x\,|\,a\,\leq x<b\}$
4. $(a,b]=\{x\,|\,a<x\leq b\}$

Unbounded intervals:

1. $(a,\infty)=\{x\,|\,x>a\}$
2. $[a,\infty)=\{x\,|\,x\geq a\}$
3. $(-\infty,b)=\{x\,|\,x<b\}$
4. $(-\infty,b]=\{x\,|\,x\leq b\}$
5. $(-\infty,\infty)=\mathbb{R}$, the set of all real numbers

Degenerate intervals:

1. $\varnothing$, the empty set
2. $[a,a]=\{a\}\,$, singleton

## Terminology

In each case where they appear above, a and b are known as endpoints of the interval.

The bounded intervals are the intervals of types 1 – 4, 10 and 11. These are precisely the intervals that are bounded sets, in the sense that their diameter is finite.

The interior of an interval $I$ is the set of points in $I$ which are not endpoints of $I$.

An interval is open if it is equal to its interior. In the above list, the intervals of types 1, 5, 7, 9, and 10 are open. For example, the intervals $(-\infty,\infty)$ and $\varnothing$ do not have endpoints, and therefore are open.

An interval is closed if it contains all of its endpoints. In the above list, the intervals of types 2, 6, 8, 9, 10 and 11 are closed.

The intervals $\varnothing$ and $\R$ are open and closed.

The notions of interior, open and closed arise from topology. The open intervals are precisely the intervals that are open sets, and the closed intervals are precisely the intervals that are closed sets.

Intervals of the form $[a,b)$ and $(a,b]$ (with $-\infty<a<b<\infty$) are called either half-closed intervals or half-open intervals. These terms are specific to intervals, and do not extend to general topological spaces.

The intervals $\varnothing$ (which is open and closed) and $[a,a]=\{a\}$ (which is closed) are called degenerate intervals; these are exactly the intervals with empty interior.

## Alternative definitions

An interval can alternatively be defined as a connected subsets of $\mathbb{R}$. They are also precisely the convex subsets of $\mathbb{R}$. Since a continuous image of a connected set is connected, it follows that if $f\colon \mathbb{R}\rightarrow\mathbb{R}$ is a continuous function and I is an interval, then its image $f(I)$ is also an interval. This is one formulation of the intermediate value theorem.

## Use in the context of integration

Intervals play an important role in the theory of integration, because they are the simplest sets whose "size" or "measure" or "length" is easy to define (see above). The concept of measure can then be extended to more complicated sets, leading to the Borel measure and eventually to the Lebesgue measure.

A special class of intervals on the real line are the dyadic intervals. These are intervals of the form $\left[\frac{j}{2^n}, \frac{j+1}{2^n}\right)$, where j and n are integers. (In some literature, other intervals with the same endpoints, such as $\left[\frac{j}{2^n}, \frac{j+1}{2^n}\right]$ and $\left(\frac{j}{2^n}, \frac{j+1}{2^n}\right)$, are also considered to be dyadic intervals.) Dyadic intervals have some nice properties, such as the following:

• Every dyadic interval is contained in exactly one "parent" dyadic interval of twice the length.
• Every dyadic interval can be partitioned into two "child" dyadic intervals of half the length.
• If two dyadic intervals overlap, then one of them must be a subset of the other.

The dyadic intervals thus have a structure very similar to an infinite binary tree.

Dyadic intervals are often used in harmonic analysis, for instance to build the Haar wavelet system.

## Intervals in order theory

In order theory, the concept of an interval can be extended to totally ordered sets. An interval in a totally ordered set $(\Omega,\le)$ is a subset $S$ of $\Omega$ such that whenever $x<y<z$ and $x,z\in S$, then also $y\in S$. The notations $(a,b)$, $[a,b)$, etc. are also used in this context. Thus, $[a,b)=\{z\in \Omega\,|\,a\le z < b\}$, for example.

## Interval arithmetic

Interval arithmetic, also called interval mathematics, interval analysis, and interval computation, has been developed by mathematicians since the 1950s and 1960s as an approach to putting bounds on rounding errors in mathematical computation and thus developing numerical methods that yield very reliable results. Where classical arithmetic defines operations on individual numbers, interval arithmetic defines a set of operations on intervals:

T · S = { x | there is some y in T, and some z in S, such that x = y · z }.

The basic operations of interval arithmetic are, for two intervals [a, b] and [c, d] that are subsets of the real line (-∞,∞),

• [a,b] + [c,d] = [a + c, b + d]
• [a,b] − [c, d] = [ad, bc]
• [a,b] × [c,d] = [min (ac, ad, bc, bd), max (ac, ad, bc, bd)]
• [a,b] / [c,d] = [min (a/c, a/d, b/c, b/d), max (a/c, a/d, b/c, b/d)]

Division by an interval containing zero is not defined under the basic interval arithmetic. The addition and multiplication operations are commutative, associative and sub-distributive: the set X ( Y + Z ) is a subset of XY + XZ.

There are interval versions of standard algorithms, such as Newton's method.