Definition:Real Interval

Definition
The set of all real numbers between any two given real numbers $$a$$ and $$b$$ is called a (real) interval.

An arbitrary interval is frequently denoted $$\mathbb{I}$$, although some sources use just $$I$$.

Endpoints
The numbers $$a, b \in \R$$ are known as the endpoints (or end points) of the interval.

$$a$$ is sometimes called the left hand endpoint and $$b$$ the right hand end point of the interval.

Length
The difference $$\left|{a - b}\right|$$ between the endpoints is called the length of the interval.

Midpoint
The midpoint of an interval is the number $$\frac {a + b} 2$$.

Property Defining an Interval
An interval has the property $$\forall x, y \in \mathbb{I}, x \le z \le y \implies z \in \mathbb{I}$$.

That is, if two numbers belong to an interval, then so does every number in between them.

This is proved in Interval Defined by Betweenness.

Definitions of Interval Types
It is usual to define intervals in terms of inequalities.

These are in the form of a pair of brackets, either round or square, enclosing the two endpoints of the interval separated by two dots.

Whether the bracket at either end is round or square depends on whether the end point is inside or outside the interval, as specified in the following.

Suppose $$a, b \in \R$$.

Open Interval
The open interval from $$a$$ to $$b$$ is defined as:


 * $$\left ({a \, . \, . \, b} \right) = \left\{{x \in \R: a < x < b}\right\}$$

Half Open Interval
There are two half open intervals from $$a$$ to $$b$$, defined as:


 * $$\left [{a \, . \, . \, b} \right) = \left\{{x \in \R: a \le x < b}\right\}$$


 * $$\left ({a \, . \, . \, b \,} \right] = \left\{{x \in \R: a < x \le b}\right\}$$

Closed Interval
The closed interval from $$a$$ to $$b$$ is defined as:


 * $$\left [{a \, . \, . \, b \,} \right] = \left\{{x \in \R: a \le x \le b}\right\}$$

Such an interval can also be referred to as compact.

Unbounded Half Open Interval
There are two unbounded half open intervals involving a real number $$a$$, defined as:


 * $$\left [{a \, . \, . \, \infty} \right) = \left\{{x \in \R: a \le x}\right\}$$


 * $$\left ({-\infty \, . \, . \, a\,} \right] = \left\{{x \in \R: x \le a}\right\}$$

Unbounded Open Interval
There are two unbounded open intervals involving a real number $$a$$, defined as:


 * $$\left ({a \, . \, . \, \infty} \right) = \left\{{x \in \R: a < x}\right\}$$


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

Using the same symbology, the set $$\R$$ can be represented as an unbounded open interval with no end points:


 * $$\left ({-\infty \, . \, . \, \infty} \right) = \left\{{x \in \R}\right\}$$

Empty Interval
When $$a > b$$, we have:


 * $$\left [{a \, . \, . \, b \,} \right] = \left\{{x \in \R: a \le x \le b}\right\} = \varnothing$$


 * $$\left [{a \, . \, . \, b} \right) = \left\{{x \in \R: a \le x < b}\right\} = \varnothing$$


 * $$\left ({a \, . \, . \, b \,} \right] = \left\{{x \in \R: a < x \le b}\right\} = \varnothing$$


 * $$\left ({a \, . \, . \, b} \right) = \left\{{x \in \R: a < x < b}\right\} = \varnothing$$

When $$a = b$$, we have:


 * $$\left [{a \, . \, . \, b} \right) = \left [{a \, . \, . \, a} \right) = \left\{{x \in \R: a \le x < a}\right\} = \varnothing$$


 * $$\left ({a \, . \, . \, b \,} \right] = \left ({a \, . \, . \, a \,} \right] = \left\{{x \in \R: a < x \le a}\right\} = \varnothing$$


 * $$\left ({a \, . \, . \, b} \right) = \left ({a \, . \, . \, a} \right) = \left\{{x \in \R: a < x < a}\right\} = \varnothing$$

Singleton Interval
When $$a = b$$, we have:


 * $$\left [{a \, . \, . \, b \,} \right] = \left [{a \, . \, . \, a \,} \right] = \left\{{x \in \R: a \le x \le a}\right\} = \left\{{a}\right\}$$

Higher Dimensional Intervals
An interval in $$\R^n$$ is the cartesian product:


 * $$\mathbb{I}_1 \times \mathbb{I}_2 \times \cdots \times \mathbb{I}_n$$

where $$\mathbb{I}_1, \ldots, \mathbb{I}_n$$ are intervals in $$\R$$.

The interval $$\R^n$$ is called an n-dimensional interval.

Real Number Line as a Metric Space
From Real Number Line is Metric Space, one can define an open interval in terms of an $\epsilon$-neighborhood.

Thus any open interval $$\left ({a \, . \, . \, b} \right)$$ can be expressed as: :$$\left ({\alpha - \epsilon \, . \, . \, \alpha - \epsilon} \right)$$ where $$\alpha - \frac {a + b} 2$$ and $$\epsilon = \frac {b - a} 2$$.

Hence $$\left ({\alpha - \epsilon \, . \, . \, \alpha - \epsilon} \right)$$ is the $\epsilon$-neighborhood $$N_\epsilon \left({\alpha}\right)$$.

Notation
The notation as used here is a fairly recent innovation, and was introduced by C. A. R. Hoare and Lyle Ramshaw.

These are the notations usually seen for intervals:


 * $$\left ( {a, b} \right )$$ for $$\left ({a \, . \, . \, b} \right)$$;
 * $$\left [ {a, b} \right )$$ for $$\left [{a \, . \, . \, b} \right)$$;
 * $$\left ( {a, b \,} \right ]$$ for $$\left ({a \, . \, . \, b \,} \right]$$;
 * $$\left [ {a, b \,} \right ]$$ for $$\left [{a \, . \, . \, b \,} \right]$$.

... but they can be confused with other usages for these (in particular, we have the danger of taking $$\left({a, b}\right)$$ to mean an ordered pair and goodness knows what else).

Some authors try to get around this ambiguity problem by using the following notations for open and half-open intervals:


 * $$\left ] {\, a, b \,} \right [$$ for $$\left ({a \, . \, . \, b} \right)$$;
 * $$\left [ {a, b \,} \right [$$ for $$\left [{a \, . \, . \, b} \right)$$;
 * $$\left ] {\, a, b \,} \right ]$$ for $$\left ({a \, . \, . \, b \,} \right]$$.

... but these are both ugly and confusing, and not many people like those either.

The "double dots" notation used to denote an interval has a worthy precedent in the sphere of computer languages. For example, Pascal uses the same notation for a closed interval.

Alternative Notation for Unbounded Intervals
Some authors prefer not to use the $$\infty$$ symbol and instead use:

$$ $$ $$ $$

Comment
Compare the definition of a closed interval on a general totally ordered set.

Note that only in the case of the closed interval are both endpoints actually included in the interval.