{{Short description|All numbers between two given numbers}} {{About|intervals of real numbers and some generalizations|intervals in order theory|Interval (order theory)|other uses|Interval (disambiguation)}}

thumb|400px|The addition ''x'' + ''a'' on the number line. All numbers greater than ''x'' and less than ''x'' + ''a'' fall within that open interval. [[File:Numeric intervals.svg|thumb|Numeric intervals on the positive and negative sides of the number line.]]

In mathematics, a '''real interval''' is the set of all real numbers lying between two fixed endpoints with no "gaps". Each endpoint is either a real number or positive or negative infinity, indicating the interval extends without a bound. A real interval can contain neither endpoint, either endpoint, or both endpoints, excluding any endpoint which is infinite.

For example, the set of real numbers consisting of {{math|0}}, {{math|1}}, and all numbers in between is an interval, denoted {{math|[0, 1]}} and called the unit interval; the set of all positive real numbers is an interval, denoted {{math|(0, ∞)}}; the set of all real numbers is an interval, denoted {{math|(−∞, ∞)}}; and any single real number {{mvar|a}} is an interval, denoted {{math|[''a'', ''a'']}}.

Intervals are ubiquitous in mathematical analysis. For example, they occur implicitly in the epsilon-delta definition of continuity; the intermediate value theorem asserts that the image of an interval by a continuous function is an interval; integrals of real functions are defined over an interval; etc.

Interval arithmetic consists of computing with intervals instead of real numbers for providing a guaranteed enclosure of the result of a numerical computation, even in the presence of uncertainties of input data and rounding errors.

Intervals are likewise defined on an arbitrary totally ordered set, such as integers or rational numbers. The notation of integer intervals is considered in the special section below.

{{hatnote|Unless explicitly otherwise specified, all intervals considered in this article are real intervals, that is, intervals of real numbers. Notable generalizations are summarized in a section below possibly with links to separate articles.}}

==Definitions and terminology== ===Definition of an interval=== An ''interval'' is a subset of the real numbers that contains all real numbers lying between any two numbers of the subset. Examples are the numbers <math>x</math> from one to two, <math>1 \leq x \leq 2</math>, and the numbers <math>y</math> greater than 10, i.e. <math>y > 10</math>. In particular, the empty set <math>\varnothing</math> and the entire set of real numbers <math>\R</math> are both intervals.<ref name="bertsekas"/>

The ''endpoints'' of an interval are its supremum (least upper bound), and its infimum (greatest lower bound), if they exist as real numbers.<ref name="bertsekas">{{cite book | last = Bertsekas | first = Dimitri P. | title = Network Optimization: Continuous and Discrete Methods | year = 1998 | url = https://books.google.com/books?id=qUUxEAAAQBAJ&pg=PA409 | page = 409 | publisher = Athena Scientific | isbn = 1-886529-02-7 }}</ref> If the infimum does not exist and the interval is not empty, one says often that the corresponding endpoint is negative infinity, written <math>-\infty.</math> Similarly, if the supremum of a non-empty interval does not exist, one says that the corresponding endpoint is positive infinity, written <math>+\infty.</math>

Non-empty intervals are completely determined by their endpoints and whether each endpoint belongs to the interval. This is a consequence of the least-upper-bound property of the real numbers, which implies that if the elements of a non-empty interval are all less than some finite value, then the interval has a supremum. This characterization is used to specify intervals by means of ''{{vanchor|interval notation}}'', where a square or rounded bracket (parenthesis) indicates whether or not an endpoint belongs to the inteval.

===Open and closed intervals=== An '''''{{visible anchor|open interval}}''''' does not include any endpoint and can be succinctly indicated with parentheses.<ref name="strichartz">{{cite book | last = Strichartz | first = Robert S. | title = The Way of Analysis | year = 2000 | url = https://books.google.com/books?id=Yix09oVvI1IC&pg=PA86 | page = 86 | publisher = Jones & Bartlett Publishers | isbn = 0-7637-1497-6 }}</ref> For example, <math>(0, 1) = \{x \mid 0 < x < 1\}</math> is the interval of all real numbers greater than <math>0</math> and less than <math>1</math>. (This interval can also be denoted by <math>]0,1[</math>, see below). The open interval <math>(0, +\infty)</math> consists of real numbers greater than <math>0</math>, i.e., positive real numbers. The open intervals have thus one of the forms :<math>\begin{align} (a,b) &= \{x\in\mathbb R \mid a<x<b\}, \\ (-\infty, b) &= \{x\in\mathbb R \mid x<b\}, \\ (a, +\infty) &= \{x\in\mathbb R \mid a<x\}, \\ (-\infty, +\infty) &= \R, \\ (a,a)&=\emptyset, \end{align}</math> where <math>a</math> and <math>b</math> are real numbers such that <math>a< b.</math> In the last case, the resulting interval is the empty set and does not depend on {{tmath|a}}. The open intervals are those intervals that are open sets for the usual topology on the real numbers, and they form a base of the open sets.

A '''''{{visible anchor|closed interval}}''''' is an interval which includes both endpoints, which are finite.<ref name="strichartz" /> A closed interval is denoted with square brackets. For example, {{closed-closed|0, 1}} is the closed interval with contents greater than or equal to {{math|0}} and less than or equal to {{math|1}}. Closed intervals are by definition non-empty. Thus every closed interval has the form :<math>\begin{align} \;[a,b] &= \{x\in\mathbb R \mid a\le x\le b\} \end{align}</math> where <math>a<b</math>. The interval consisting of a single point <math>[a,a]=\{a\}</math> is sometimes called a ''degenerate'' closed interval.<ref name="Apostol_1974">{{Cite book |title=Mathematical Analysis |url=https://archive.org/details/mathematicalanal00apos_530 |url-access=limited |author-last=Apostol |author-first=Tom M. |author-link=Tom M. Apostol |publisher=Addison Wesley |date=1974 |isbn=978-0-201-00288-1 |edition=2nd |location=Reading, Mass. |pages=4}}</ref>

In addition to the closed intervals <math>[a,b]</math> common in analysis, other intervals are topologically closed but unbounded, such as <math>[a,\infty)</math> or <math>(-\infty,b]</math>. The (bounded) closed intervals together with the semi-infinite closed intervals comprise those intervals that are closed sets for the usual topology on the real numbers.

===Half-open intervals=== A ''{{visible anchor|half-open interval}}'' has two distinct finite endpoints, and includes one but not the other. It is said to be ''left-open'' or ''right-open'' depending on whether the excluded endpoint is on the left or on the right. These intervals are denoted by mixing notations for open and closed intervals.<ref name=":2">{{Cite web|last=Weisstein|first=Eric W.|title=Interval|url=https://mathworld.wolfram.com/Interval.html|access-date=2020-08-23|website=mathworld.wolfram.com|language=en}}</ref> For example, {{open-closed|0, 1}} means greater than {{math|0}} and less than or equal to {{math|1}}, while {{closed-open|0, 1}} means greater than or equal to {{math|0}} and less than {{math|1}}. The half-open intervals have the form :<math>\begin{align} \left(a,b\right] &= \{x\in\R \mid a<x\le b\}, \\ \left[a,b\right) &= \{x\in\R \mid a\le x<b\}. \\ \end{align}</math>

In summary, a set of the real numbers is an interval, if and only if it is an open interval, a closed interval, or a half-open interval. The only intervals that appear twice in the above classification are {{tmath|\emptyset}} and {{tmath|\R}} that are both open and closed.<ref name="eom">{{eom|title=Interval and segment}}</ref><ref name="tao">{{cite book | last = Tao | first = Terence | author-link = Terence Tao | title = Analysis I | year = 2016 | url = https://books.google.com/books?id=ecTsDAAAQBAJ&pg=PA212 | page = 212 | edition = 3 | series = Texts and Readings in Mathematics | volume = 37 | publisher = Springer | location = Singapore | isbn = 978-981-10-1789-6 | issn = 2366-8725 | doi = 10.1007/978-981-10-1789-6 | lccn = 2016940817 }} See Definition 9.1.1.</ref>

===Degenerate intervals=== A ''{{visible anchor|degenerate interval}}'' is any set consisting of a single real number (i.e., an interval of the form {{closed-closed|''a'', ''a''}}).<ref name="cramer">{{cite book | last = Cramér | first = Harald | title = Mathematical Methods of Statistics | year = 1999 | url = https://books.google.com/books?id=CRTKKaJO0DYC&pg=PA11 | page = 11 | publisher = Princeton University Press | isbn = 0691005478 }}</ref> Some authors include the empty set in this definition. A real interval that is neither empty nor degenerate is said to be '''{{vanchor|proper}}''', and has infinitely many elements.

===Bounded intervals=== {{anchor|bounded interval|unbounded interval|half-bounded interval|finite interval}}An interval is said to be ''left-bounded'' or ''right-bounded'', if there is some real number that is, respectively, smaller than or larger than all its elements. An interval is said to be ''bounded'', if it is both left- and right-bounded; and is said to be ''unbounded'' otherwise. Intervals that are bounded at only one end are said to be ''half-bounded''. The empty set is bounded, and the set of all reals is the only interval that is unbounded at both ends. Bounded intervals are also commonly known as ''finite intervals''.

Bounded intervals are bounded sets, in the sense that their diameter (which is equal to the absolute difference between the endpoints) is finite. The diameter may be called the ''length'', ''width'', ''measure'', ''range'', or ''size'' of the interval. The size of unbounded intervals is usually defined as {{math|+∞}}, and the size of the empty interval may be defined as {{math|0}} (or left undefined).

The ''centre'' (midpoint) of a bounded interval with endpoints {{mvar|a}} and {{mvar|b}} is {{math|(''a'' + ''b'')/2}}, and its ''radius'' is the half-length {{math|{{mabs|''a'' − ''b''}}/2}}. These concepts are undefined for empty or unbounded intervals.

===Categorisation by minimum and maximum elements=== An interval is said to be ''left-open'' if and only if it contains no minimum (an element that is smaller than all other elements); ''right-open'' if it contains no maximum; and ''open'' if it contains neither. The interval {{math|{{closed-open|0, 1}} {{=}} {{mset|''x'' | 0 ≤ ''x'' &lt; 1}}}}, for example, is left-closed and right-open. The set of non-negative reals is a closed interval that is right-open but not left-open.

An interval is said to be ''left-closed'' if it has a minimum element or is left-unbounded, ''right-closed'' if it has a maximum or is right unbounded; it is simply ''closed'' if it is both left-closed and right closed.

===Sub-intervals and related constructions=== An interval {{mvar|I}} is a ''subinterval'' of interval {{mvar|J}} if {{mvar|I}} is a subset of {{mvar|J}}. An interval {{mvar|I}} is a ''proper subinterval'' of {{mvar|J}} if {{mvar|I}} is a proper subset of {{mvar|J}}.

The ''interior'' of an interval {{mvar|I}} is the largest open interval that is contained in {{mvar|I}}; it is also the set of points in {{mvar|I}} which are not endpoints of {{mvar|I}}. The ''closure'' of {{mvar|I}} is the smallest closed interval that contains {{mvar|I}}; which is also the set {{mvar|I}} augmented with its finite endpoints.

For any set {{mvar|X}} of real numbers, the ''interval enclosure'' or ''interval span'' of {{mvar|X}} is the unique interval that contains {{mvar|X}}, and does not properly contain any other interval that also contains {{mvar|X}}.

===Segments and intervals=== There is conflicting terminology for the terms ''segment'' and ''interval'', which have been employed in the literature in two essentially opposite ways, resulting in ambiguity when these terms are used. The ''Encyclopedia of Mathematics''<ref>{{Cite web|url=https://www.encyclopediaofmath.org/index.php/Interval_and_segment|title=Interval and segment - Encyclopedia of Mathematics|website=encyclopediaofmath.org|access-date=2016-11-12|url-status=live|archive-url=https://web.archive.org/web/20141226211146/http://www.encyclopediaofmath.org/index.php/Interval_and_segment|archive-date=2014-12-26}}</ref> defines ''interval'' (without a qualifier) to exclude both endpoints (i.e., open interval) and ''segment'' to include both endpoints (i.e., closed interval), while Rudin's ''Principles of Mathematical Analysis''<ref>{{Cite book|title=Principles of Mathematical Analysis|url=https://archive.org/details/principlesmathem00rudi_663|url-access=limited|last=Rudin|first=Walter|publisher=McGraw-Hill|year=1976|isbn=0-07-054235-X|location=New York|pages=[https://archive.org/details/principlesmathem00rudi_663/page/n39 31]}}</ref> calls sets of the form [''a'', ''b''] ''intervals'' and sets of the form (''a'', ''b'') ''segments'' throughout. These terms tend to appear in older works; modern texts increasingly favor the term ''interval'' (qualified by ''open'', ''closed'', or ''half-open''), regardless of whether endpoints are included.

==Notations for intervals== The interval of numbers between {{mvar|a}} and {{mvar|b}}, including {{mvar|a}} and {{mvar|b}}, is often denoted {{closed-closed|''a'', ''b''}}. The two numbers are called the ''endpoints'' of the interval. In countries where numbers are written with a decimal comma, a semicolon may be used as a separator to avoid ambiguity.

===Including or excluding endpoints=== To indicate that one of the endpoints is to be excluded from the set, the corresponding square bracket can be either replaced with a parenthesis, or reversed. Both notations are described in International standard ISO 31-11. Thus, in set builder notation,

:<math>\begin{align} (a,b) = \mathopen{]}a,b\mathclose{[} &= \{x\in\R \mid a<x<b\}, \\[5mu] [a,b) = \mathopen{[}a,b\mathclose{[} &= \{x\in\R \mid a\le x<b\}, \\[5mu] (a,b] = \mathopen{]}a,b\mathclose{]} &= \{x\in\R \mid a<x\le b\}, \\[5mu] [a,b] = \mathopen{[}a,b\mathclose{]} &= \{x\in\R \mid a\le x\le b\}. \end{align}</math>

Each interval {{open-open|''a'', ''a''}}, {{closed-open|''a'', ''a''}}, and {{open-closed|''a'', ''a''}} represents the empty set, whereas {{closed-closed|''a'', ''a''}} denotes the singleton set&nbsp;{{math|{''a''}{{null}}}}. When {{math|''a'' > ''b''}}, all four notations are usually taken to represent the empty set.

Both notations may overlap with other uses of parentheses and brackets in mathematics. For instance, the notation {{math|(''a'', ''b'')}} is often used to denote an ordered pair in set theory, the coordinates of a point or vector in analytic geometry and linear algebra, or (sometimes) a complex number in algebra. That is why Bourbaki introduced the notation {{math|]''a'', ''b''[}} to denote the open interval.<ref>{{cite web|url=http://hsm.stackexchange.com/a/193|title=Why is American and French notation different for open intervals (''x'', ''y'') vs. ]''x'', ''y''[?|website=hsm.stackexchange.com|access-date=28 April 2018}}</ref> The notation {{math|[''a'', ''b'']}} too is occasionally used for ordered pairs, especially in computer science.

Some authors such as Yves Tillé use {{math|]''a'', ''b''[}} to denote the complement of the interval&nbsp;{{open-open|''a'', ''b''}}; namely, the set of all real numbers that are either less than or equal to {{mvar|a}}, or greater than or equal to {{mvar|b}}.

===Infinite endpoints=== In some contexts, an interval may be defined as a subset of the extended real numbers, the set of all real numbers augmented with {{math|−∞}} and {{math|+∞}}.

In this interpretation, the notations {{closed-closed|−∞, ''b''}} , {{open-closed|−∞, ''b''}} , {{closed-closed|''a'', +∞}} , and {{closed-open|''a'', +∞}} are all meaningful and distinct. In particular, {{open-open|−∞, +∞}} denotes the set of all ordinary real numbers, while {{closed-closed|−∞, +∞}} denotes the extended reals.

Even in the context of the ordinary reals, one may use an infinite endpoint to indicate that there is no bound in that direction. For example, {{open-open|0, +∞}} is the set of positive real numbers, also written as <math>\mathbb{R}_+.</math> The context affects some of the above definitions and terminology. For instance, the interval {{open-open|−∞, +∞}}&nbsp;=&nbsp;<math>\R</math> is closed in the realm of ordinary reals, but not in the realm of the extended reals.

===Integer intervals=== When {{mvar|a}} and {{mvar|b}} are integers, the notations ⟦''a, b''⟧, {{closed-closed|''a'' .. ''b''}}, {{math|{''a'' .. ''b''}{{null}}}}, or just {{math|''a'' .. ''b''}}, are sometimes used to indicate the interval of all ''integers'' between {{mvar|a}} and {{mvar|b}} included. The notation {{closed-closed|''a'' .. ''b''}} is used in some programming languages; in Pascal, for example, it is used to formally define a subrange type, most frequently used to specify lower and upper bounds of valid indices of an array.

Another way to interpret integer intervals are as sets defined by enumeration, using ellipsis notation.

An integer interval that has a finite lower or upper endpoint always includes that endpoint. Therefore, the exclusion of endpoints can be explicitly denoted by writing {{math|''a'' .. ''b'' − 1}} , {{math|''a'' + 1 .. ''b''}} , or {{math|''a'' + 1 .. ''b'' − 1}}. Alternate-bracket notations like {{closed-open|''a'' .. ''b''}} or {{math|[''a'' .. ''b''[}} are rarely used for integer intervals.{{citation needed|date=February 2014}}

== Properties == The intervals are precisely the connected subsets of <math>\R.</math> It follows that the image of an interval by any continuous function from <math>\mathbb R</math> to <math>\mathbb R</math> is also an interval. This is one formulation of the intermediate value theorem.

The intervals are also the convex subsets of <math>\R.</math> The interval enclosure of a subset <math>X\subseteq \R</math> is also the convex hull of <math>X.</math>

The closure of an interval is the union of the interval and the set of its finite endpoints, and hence is also an interval. (The latter also follows from the fact that the closure of every connected subset of a topological space is a connected subset.) In other words, we have{{sfnp|Tao|2016|p=214|loc = See Lemma 9.1.12}} :<math>\operatorname{cl}(a,b)=\operatorname{cl}(a,b]=\operatorname{cl}[a,b)=\operatorname{cl}[a,b]=[a,b],</math> :<math>\operatorname{cl}(a,+\infty)=\operatorname{cl}[a,+\infty)=[a,+\infty),</math> :<math>\operatorname{cl}(-\infty,a)=\operatorname{cl}(-\infty,a]=(-\infty,a],</math> :<math>\operatorname{cl}(-\infty,+\infty)=(-\infty,\infty).</math>

The intersection of any collection of intervals is always an interval. The union of two intervals is an interval if and only if they have a non-empty intersection or an open end-point of one interval is a closed end-point of the other, for example <math>(a,b) \cup [b,c] = (a,c].</math>

If <math>\R</math> is viewed as a metric space, its open balls are the open bounded intervals&nbsp;{{open-open|''c'' + ''r'', ''c'' − ''r''}}, and its closed balls are the closed bounded intervals&nbsp;{{closed-closed|''c'' + ''r'', ''c'' − ''r''}}. In particular, the metric and order topologies in the real line coincide, which is the standard topology of the real line.

Any element&nbsp;{{mvar|x}} of an interval&nbsp;{{mvar|I}} defines a partition of&nbsp;{{mvar|I}} into three disjoint intervals {{mvar|I}}<sub>1</sub>, {{mvar|I}}<sub>2</sub>, {{mvar|I}}<sub>3</sub>: respectively, the elements of&nbsp;{{mvar|I}} that are less than&nbsp;{{mvar|x}}, the singleton&nbsp;<math>[x,x] = \{x\},</math> and the elements that are greater than&nbsp;{{mvar|x}}. The parts {{mvar|I}}<sub>1</sub> and {{mvar|I}}<sub>3</sub> are both non-empty (and have non-empty interiors), if and only if {{mvar|x}} is in the interior of&nbsp;{{mvar|I}}. This is an interval version of the trichotomy principle.

== Applications ==

=== Dyadic intervals === A ''dyadic interval'' is a bounded real interval whose endpoints are <math>\tfrac{j}{2^n}</math> and <math>\tfrac{j+1}{2^n},</math> where <math>j</math> and <math>n</math> are integers. Depending on the context, either endpoint may or may not be included in the interval.

Dyadic intervals have the following properties:

* The length of a dyadic interval is always an integer power of two. * Each dyadic interval is contained in exactly one dyadic interval of twice the length. * Each dyadic interval is spanned by two dyadic intervals of half the length. * If two open dyadic intervals overlap, then one of them is a subset of the other.

The dyadic intervals consequently have a structure that reflects that of an infinite binary tree.

Dyadic intervals are relevant to several areas of numerical analysis, including adaptive mesh refinement, multigrid methods and wavelet analysis. Another way to represent such a structure is p-adic analysis (for {{math|1=''p'' = 2}}).<ref>{{cite journal |last1=Kozyrev|first1=Sergey|year=2002|title=Wavelet theory as {{mvar|p}}-adic spectral analysis|journal=Izvestiya RAN. Ser. Mat.|volume=66|issue=2|pages=149–158|doi=10.1070/IM2002v066n02ABEH000381|url=http://mi.mathnet.ru/eng/izv/v66/i2/p149|access-date=2012-04-05|arxiv=math-ph/0012019|bibcode=2002IzMat..66..367K|s2cid=16796699}}</ref>

=== Real analysis === Intervals are ubiquitous in mathematical analysis, where they are used to express ideas and often occur in key results.

The integral of a real function is defined over an interval. The endpoints of the interval involved usually occur as a subscript and superscript, so the integral <math display="inline">\int_a^b f(x) \, dx</math> applies to all <math>x</math> belonging to the interval <math>[a, b]</math>.

Intervals occur implicitly in the epsilon-delta definition of continuity of a function <math>f(x)</math>: the following account makes them explicit. The function <math>f</math> is said to be continuous at a point <math>a</math> if for any given value <math>\varepsilon > 0</math> (epsilon greater than zero) there is a value <math>\delta > 0</math> (delta greater than zero) for which <math>f(x)</math> lies in the open interval <math>\left( f(a)-\varepsilon , f(a)+\varepsilon \right)</math> whenever <math>x</math> is chosen from the interval <math>\left( a-\delta, a+\delta \right)</math>. The possible values of <math>\varepsilon</math> and <math>\delta</math> themselves belong to the unbounded interval <math>(0, +\infty)</math>, but are usually considered to describe small positive increments. The idea is that a small symmetric interval around point <math>a</math> exists where the value of <math>f(x)</math> stays within an open interval of radius <math>\varepsilon</math> centred around <math>f(a)</math>.

The intermediate value theorem captures the intuition that if <math>f\colon [a, b]\to \R</math> is a real valued continuous function on an interval <math>[a, b]</math> and <math>d</math> is any value between <math>f(a)</math> and <math>f(b)</math>, then we expect to find a value <math>c</math> between <math>a</math> and <math>b</math> where <math>f(c)=d</math>. For example, if <math>f(x)=x^2</math> is defined on the interval <math>[3,4]</math>, then given <math>d=10</math> between <math>f(3)=3^2=9</math> and <math>f(4)=4^2=16</math>, there is a value <math>c</math> between <math>3</math> and <math>4</math> where <math>f(c)=c^2=10</math>. An equivalent formulation of the theorem asserts that the image of an interval by a continuous function is an interval.

=== Confidence intervals === Confidence intervals are important in statistical inference and provide a range of estimated values for an unknown statistical parameter, such as a population mean. Unlike other kinds of interval, a confidence interval is evaluated from a random sample and the interval endpoints are real-valued random variables. A different sample may well give a different result.

When sampling is repeated there is a pre-set probability, known as the ''confidence level'', that a corresponding interval contains the true value of the unknown parameter. For example, if the chosen confidence level were 0.95 and the same sampling procedure were repeated many times, in the long run approximately 95% of the resulting intervals would be expected to contain the true value.

The normal distribution provides a simplified illustration. It has a probability density function whose graph is the familiar bell curve. The peak occurs at its mean <math>\mu</math> (the Greek letter mu) and its width can be described by its standard deviation <math>\sigma</math> (sigma). These two parameters distinguish one bell curve from another, but in all cases the region within two standard deviations either side of the mean represents a probability of approximately 0.95. This can be written

<math display="block">P(\mu-2\sigma \leq X \leq \mu+2\sigma) \approx 0.95</math>

for a normally distributed random variable <math>X</math>.

Take <math>\bar{X}</math> to be the sample mean for a fixed sample size, which is an estimator for <math>\mu</math>. It also has a normal distribution with its own standard deviation <math>\sigma_\bar{X}</math>. The previous inequalities can then be written in terms of <math>\mu</math> to give

<math display="block">P(\bar{X}-2\sigma_\bar{X} \leq \mu \leq \bar{X}+2\sigma_\bar{X}) \approx 0.95.</math>

If the value of the standard deviation <math>\sigma_\bar{X}</math> is known, then the interval <math>[\bar{X}-2\sigma_\bar{X}, \bar{X}+2\sigma_\bar{X}]</math> will be a confidence interval for <math>\mu</math> with a confidence level of approximately 0.95. Its endpoints are the random variables <math>\bar{X}-2\sigma_\bar{X}</math> and <math>\bar{X}+2\sigma_\bar{X}</math>, whose actual values will depend on the sample taken.

=== In general topology === Every Tychonoff space is embeddable into a product space of the closed unit intervals <math>[0,1].</math> Actually, every Tychonoff space that has a base of cardinality <math>\kappa</math> is embeddable into the product <math>[0,1]^\kappa</math> of <math>\kappa</math> copies of the intervals.<ref name="Engelking">{{cite book |first=Ryszard|last=Engelking|title=General topology|language=en|edition=Revised and completed|series=Sigma Series in Pure Mathematics|volume=6|publisher=Heldermann Verlag|location=Berlin|date=1989|isbn=3-88538-006-4|mr=1039321|zbl=0684.54001}}</ref>{{rp|p. 83, Theorem 2.3.23}}

The concepts of convex sets and convex components are used in a proof that every totally ordered set endowed with the order topology is completely normal<ref name="Steen" /> or moreover, monotonically normal.<ref name="Heath" />

==Generalizations== === Balls ===

An open finite interval <math>(a, b)</math> is a 1-dimensional open ball with a center at <math>\tfrac12(a + b)</math> and a radius of <math>\tfrac12(b - a).</math> The closed finite interval <math>[a, b]</math> is the corresponding closed ball, and the interval's two endpoints <math>\{a, b\}</math> form a 0-dimensional sphere. Generalized to <math>n</math>-dimensional Euclidean space, a ball is the set of points whose distance from the center is less than the radius. In the 2-dimensional case, a ball is called a disk.

If a half-space is taken as a kind of degenerate ball (without a well-defined center or radius), a half-space can be taken as analogous to a half-bounded interval, with its boundary plane as the (degenerate) sphere corresponding to the finite endpoint.

=== Multi-dimensional intervals ===

A finite interval is (the interior of) a 1-dimensional hyperrectangle. Generalized to real coordinate space <math>\R^n,</math> an axis-aligned hyperrectangle (or box) is the Cartesian product of <math>n</math> finite intervals. For <math>n=2</math> this is a rectangle; for <math>n=3</math> this is a rectangular cuboid (also called a "box").

Allowing for a mix of open, closed, and infinite endpoints, the Cartesian product of any <math>n</math> intervals, <math>I = I_1\times I_2 \times \cdots \times I_n</math> is sometimes called an '''<math>n</math>-dimensional interval'''.{{cn|date=September 2023}}

A '''facet''' of such an interval <math>I</math> is the result of replacing any non-degenerate interval factor <math>I_k</math> by a degenerate interval consisting of a finite endpoint of <math>I_k.</math> The '''faces''' of <math>I</math> comprise <math>I</math> itself and all faces of its facets. The '''corners''' of <math>I</math> are the faces that consist of a single point of <math>\R^n.</math>{{cn|date=September 2023}}

=== Convex polytopes ===

Any finite interval can be constructed as the intersection of half-bounded intervals (with an empty intersection taken to mean the whole real line), and the intersection of any number of half-bounded intervals is a (possibly empty) interval. Generalized to <math>n</math>-dimensional affine space, an intersection of half-spaces (of arbitrary orientation) is (the interior of) a convex polytope, or in the 2-dimensional case a convex polygon.

=== Domains ===

An open interval is a connected open set of real numbers. Generalized to topological spaces in general, a non-empty connected open set is called a domain.

===Complex intervals=== Intervals of complex numbers can be defined as regions of the complex plane, either rectangular or circular.<ref>[https://books.google.com/books?id=Vtqk6WgttzcC Complex interval arithmetic and its applications], Miodrag Petković, Ljiljana Petković, Wiley-VCH, 1998, {{ISBN|978-3-527-40134-5}}</ref>

=== Intervals in posets and preordered sets === {{main article|interval (order theory)}}

==== Definitions ==== The concept of intervals can be defined in arbitrary partially ordered sets or more generally, in arbitrary preordered sets. For a preordered set <math>(X,\lesssim)</math> and two elements <math>a,b\in X,</math> one similarly defines the intervals<ref name="Vind">{{cite book |last=Vind |first=Karl |title=Independence, additivity, uncertainty |language=en |series=Studies in Economic Theory |volume=14 |publisher=Springer |location=Berlin |date=2003 |isbn=978-3-540-41683-8 |doi=10.1007/978-3-540-24757-9 |zbl=1080.91001 }}</ref>{{rp|11, Definition 11}} :<math>(a,b) =\{x\in X \mid a<x<b\},</math> :<math>[a,b] =\{x\in X \mid a\lesssim x\lesssim b\},</math> :<math>(a,b] =\{x\in X \mid a<x\lesssim b\},</math> :<math>[a,b) =\{x\in X \mid a\lesssim x<b\},</math> :<math>(a,\infty) =\{x\in X \mid a<x\},</math> :<math>[a,\infty) =\{x\in X \mid a\lesssim x\},</math> :<math>(-\infty,b) =\{x\in X \mid x<b\},</math> :<math>(-\infty,b] =\{x\in X \mid x\lesssim b\},</math> :<math>(-\infty,\infty) =X,</math> where <math>x<y</math> means <math>x\lesssim y\not\lesssim x.</math> Actually, the intervals with single or no endpoints are the same as the intervals with two endpoints in the larger preordered set :<math>\bar X=X\sqcup\{-\infty,\infty\}</math> :<math>-\infty<x<\infty\qquad(\forall x\in X)</math> defined by adding new smallest and greatest elements (even if there were ones), which are subsets of <math>X.</math> In the case of <math>X=\mathbb R</math> one may take <math>\bar\mathbb R</math> to be the extended real line.

==== Convex sets and convex components in order theory ==== {{main article|convex set (order theory)}}

A subset <math>A\subseteq X</math> of the preordered set <math>(X,\lesssim)</math> is '''(order-)convex''' if for every <math>x,y\in A</math> and every <math>x\lesssim z\lesssim y</math> we have <math>z\in A.</math> Unlike in the case of the real line, a convex set of a preordered set need not be an interval. For example, in the totally ordered set <math>(\mathbb Q,\le)</math> of rational numbers, the set :<math>\mathbb Q=\{x\in\mathbb Q \mid x^2<2\}</math> is convex, but not an interval of <math>\mathbb Q,</math> since there is no square root of two in <math>\mathbb Q.</math>

Let <math>(X,\lesssim)</math> be a preordered set and let <math>Y\subseteq X.</math> The convex sets of <math>X</math> contained in <math>Y</math> form a poset under inclusion. A maximal element of this poset is called a '''convex component''' of <math>Y.</math><ref name="Heath">{{cite journal |last1=Heath |first1=R. W. |last2=Lutzer |first2=David J. |last3=Zenor |first3=P. L. |title=Monotonically normal spaces |language=en |journal=Transactions of the American Mathematical Society |volume=178 |pages=481–493 |date=1973 |issn=0002-9947 |doi=10.2307/1996713 |jstor=1996713 |mr=0372826 |zbl=0269.54009 |doi-access=free }}</ref>{{rp|Definition 5.1}}<ref name="Steen">{{cite journal |last=Steen |first=Lynn A. |title=A direct proof that a linearly ordered space is hereditarily collection-wise normal |language=en |journal=Proceedings of the American Mathematical Society |volume=24 |pages=727–728 |date=1970 |issue=4 |issn=0002-9939 |doi=10.2307/2037311 |jstor=2037311 |mr=0257985 |zbl=0189.53103 |doi-access=free }}</ref>{{rp|727}} By the Zorn lemma, any convex set of <math>X</math> contained in <math>Y</math> is contained in some convex component of <math>Y,</math> but such components need not be unique. In a totally ordered set, such a component is always unique. That is, the convex components of a subset of a totally ordered set form a partition.

==== Properties ==== A generalization of the characterizations of the real intervals follows. For a non-empty subset <math>I</math> of a linear continuum <math>(L,\le),</math> the following conditions are equivalent.<ref name="Munkres">{{cite book |url=http://www.pearsonhighered.com/bookseller/product/Topology/9780131816299.page |first=James R. |last=Munkres |author-link=James Munkres |title=Topology |language=en |edition=2 |publisher=Prentice Hall |year=2000 |isbn=978-0-13-181629-9 |zbl=0951.54001 |mr=0464128 }}</ref>{{rp|153, Theorem 24.1}} * The set <math>I</math> is an interval. * The set <math>I</math> is order-convex. * The set <math>I</math> is a connected subset when <math>L</math> is endowed with the order topology.

For a subset <math>S</math> of a lattice <math>L,</math> the following conditions are equivalent. * The set <math>S</math> is a sublattice and an (order-)convex set. * There is an ideal <math>I\subseteq L</math> and a filter <math>F\subseteq L</math> such that <math>S=I\cap F.</math>

== Topological algebra == {{more citations needed|section|date=September 2023}}

Intervals can be associated with points of the plane, and hence regions of intervals can be associated with regions of the plane. Generally, an interval in mathematics corresponds to an ordered pair {{math|(''x'', ''y'')}} taken from the direct product <math>\R \times \R</math> of real numbers with itself, where it is often assumed that {{math|''y'' > ''x''}}. For purposes of mathematical structure, this restriction is discarded,<ref>Kaj Madsen (1979), Review of "Interval analysis in the extended interval space" by Edgar Kaucher, {{MR|586220}}</ref> and "reversed intervals" where {{math|''y'' &minus; ''x'' < 0}} are allowed. Then, the collection of all intervals {{math|[''x'', ''y'']}} can be identified with the topological ring formed by the direct sum of <math>\R</math> with itself, where addition and multiplication are defined component-wise.

The direct sum algebra <math>( \R \oplus \R, +, \times)</math> has two ideals, { [''x'',0] : ''x'' ∈ R } and { [0,''y''] : ''y'' ∈ R }. The identity element of this algebra is the condensed interval {{math|[1, 1]}}. If interval {{math|[''x'', ''y'']}} is not in one of the ideals, then it has multiplicative inverse {{math|[1/''x'', 1/''y'']}}. Endowed with the usual topology, the algebra of intervals forms a topological ring. The group of units of this ring consists of four quadrants determined by the axes, or ideals in this case. The identity component of this group is quadrant I.

Every interval can be considered a symmetric interval around its midpoint. In a reconfiguration published in 1956 by M Warmus, the axis of "balanced intervals" {{math|[''x'', &minus;''x'']}} is used along with the axis of intervals {{math|[''x'', ''x'']}} that reduce to a point. Instead of the direct sum <math>R \oplus R,</math> the ring of intervals has been identified<ref>D. H. Lehmer (1956) Review of "Calculus of Approximations", {{MR|0081372}}</ref> with the hyperbolic numbers by M. Warmus and D. H. Lehmer through the identification :<math>z = \tfrac12(x + y) + \tfrac12(x - y)j,</math> where <math>j^2 = 1.</math>

This linear mapping of the plane, which amounts of a ring isomorphism, provides the plane with a multiplicative structure having some analogies to ordinary complex arithmetic, such as polar decomposition.

==See also== *Arc (geometry) *Inequality *Interval graph *Interval finite element *Interval (statistics) *Line segment *Partition of an interval *Unit interval

==References== {{reflist}}

== Bibliography == * T. Sunaga, [http://www.cs.utep.edu/interval-comp/sunaga.pdf "Theory of interval algebra and its application to numerical analysis"] {{Webarchive|url=https://web.archive.org/web/20120309164347/http://www.cs.utep.edu/interval-comp/sunaga.pdf |date=2012-03-09 }}, In: Research Association of Applied Geometry (RAAG) Memoirs, Ggujutsu Bunken Fukuy-kai. Tokyo, Japan, 1958, Vol. 2, pp.&nbsp;29–46 (547-564); reprinted in Japan Journal on Industrial and Applied Mathematics, 2009, Vol. 26, No. 2-3, pp.&nbsp;126–143.

==External links== * ''A Lucid Interval'' by Brian Hayes: An [http://www.americanscientist.org/issues/pub/a-lucid-interval American Scientist article] provides an introduction. *[http://www.cs.utep.edu/interval-comp/main.html Interval computations website] {{Webarchive|url=https://web.archive.org/web/20060302095039/http://www.cs.utep.edu/interval-comp/main.html |date=2006-03-02 }} *[http://www.cs.utep.edu/interval-comp/icompwww.html Interval computations research centers] {{Webarchive|url=https://web.archive.org/web/20070203144604/http://www.cs.utep.edu/interval-comp/icompwww.html |date=2007-02-03 }} * [http://demonstrations.wolfram.com/IntervalNotation/ Interval Notation] by George Beck, Wolfram Demonstrations Project. * {{MathWorld |title=Interval |urlname=Interval}}

{{DEFAULTSORT:Interval (Mathematics)}} Category:Sets of real numbers Category:Order theory Category:Topology