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
-ften denoted . If one of the endpoints is to be omitted, then the corresponding square bracket is
replaced by a parenthesis. Thus, in set builder notation,
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
- \left[a,b\right[ = \{x\,|\, a\le x 
- \left]a,b\right] = \{x\,|\, a
-  = \{ 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 ):
Bounded nondegenerate intervals:
- (a,b)=\{x\,|\,a
- =\{x\,|\,a\leq x\leq b\}
- [a,b)=\{x\,|\,a\,\leq x
- (a,b]=\{x\,|\,a
Unbounded intervals:
- (a,\infty)=\{x\,|\,x>a\}
- [a,\infty)=\{x\,|\,x\geq a\}
- (-\infty,b)=\{x\,|\,x
- (-\infty,b]=\{x\,|\,x\leq b\}
- (-\infty,\infty)=\mathbb{R}, the set of all real numbers
Degenerate intervals:
- \varnothing, the empty set
- =\{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  (with -\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\} (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.

# Dyadic intervals
A special class of intervals on the real line are the dyadic intervals.  These are intervals of the form \left 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 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 , 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:
The basic operations of interval arithmetic are, for two intervals  and  that are subsets of the real line (-,),
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.
See also: comprehensive German Wikipedia article on  Interval arithmetic