WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center

Interval [{min,max}]

represents the range of values between min and max.

Interval [{min1,max1},{min2,max2},]

represents the union of the ranges min1 to max1, min2 to max2, .

Details
Details and Options Details and Options
Background & Context
Examples  
Basic Examples  
Scope  
Generalizations & Extensions  
Applications  
Properties & Relations  
Possible Issues  
See Also
Tech Notes
Related Guides
History
Cite this Page

Interval [{min,max}]

represents the range of values between min and max.

Interval [{min1,max1},{min2,max2},]

represents the union of the ranges min1 to max1, min2 to max2, .

Details

  • You can perform arithmetic and other operations on Interval objects.
  • Interval [{min,max}] represents the closed interval that includes both end points.
  • Min [interval] and Max [interval] give the end points of an interval.
  • For approximate machine or arbitraryprecision numbers x, Interval [x] yields an interval reflecting the uncertainty in x.
  • In operations on intervals that involve approximate numbers, the Wolfram Language always rounds lower limits down and upper limits up.
  • Interval can be used as a geometric region.
  • Interval can be generated by functions such as Limit .
  • Relational operators such as Equal and Less yield explicit True or False results whenever they are given disjoint intervals.

Background & Context

  • Interval [{min,max}] represents the closed interval of real values between min and max that includes both endpoints. The multi-argument form Interval [{min1,max1},{min2,max2},]
    represents the union of the ranges min1 to max1, min2 to max2, and is equivalent to IntervalUnion [Interval[{min1,max1}],Interval[{min2,max2}],]. The endpoints of an interval may be symbolic, real infinite or any real numeric expression, including exact, approximate machineprecision or arbitraryprecision numbers.
  • Arithmetic and relational operators may be applied to Interval objects in a process known as interval arithmetic. In the simplest case of interval of the form Interval [{min,max}], Min [interval] and Max [interval] return min and max, respectively.
  • Interval may also serve as a one-dimensional region specification over which a computation should be performed, and a number of functions including Limit can return expressions involving Interval objects.
  • NumberLinePlot may be used to visualize Interval objects on a number line.
  • Interval is related to a number of other symbols. IntervalUnion and IntervalIntersection are the Interval analogs of Union and Intersection , respectively, while IntervalMemberQ may be used to explicitly test whether values (or intervals) are contained in a given interval. RegionMember may be used to generate a RegionMemberFunction for a given Interval , the result of which can be used to test elements for interval membership. Interval is also related to Range , Piecewise , MinMax , Line , InfiniteLine and HalfLine .

Examples

open all close all

Basic Examples  (2)

Add intervals, getting an interval representing the result:

Wolfram Language code: Interval[{1, 6}] + Interval[{0, 2}]

Indeterminate limits can give intervals:

Wolfram Language code: Limit[Sin[x] + Sin[x ^ 2], x -> Infinity]

Scope  (8)

Squaring gives a non-negative interval:

Wolfram Language code: Interval[{-2, 5}] ^ 2

Some functions can be applied to an interval:

Wolfram Language code: Sin[Interval[{2.5, 5.5}]]

Exact inputs yield exact interval results:

Wolfram Language code: Sin[Interval[{2, 7}]]
Wolfram Language code: Sin[Interval[{2, 10}]]

Disjoint intervals can be generated:

Wolfram Language code: 1 / Interval[{-2, 5}]

Exact comparisons can be made with intervals:

Wolfram Language code: Interval[{5, 8}] > Pi

Solve an equation involving an interval:

Wolfram Language code: Solve[3x + 2 == Interval[{-2, 5}], x]

Approximate numbers automatically turn into intervals:

Wolfram Language code: Interval[1.]

Machine numbers always correspond to a certain interval:

Wolfram Language code: % - 1
Wolfram Language code: $MachineEpsilon

Interval can be used as a geometric region:

Wolfram Language code: ℛ = Interval[{0, 1}];
Wolfram Language code: RegionQ[ℛ]
Wolfram Language code: RegionMeasure[ℛ]

Generalizations & Extensions  (1)

Find the interval that the Wolfram Language considers consistent with machine number 0.:

Wolfram Language code: Interval[0.]

Specifying a different precision gives a different interval:

Wolfram Language code: Interval[0``500]

Applications  (5)

Watch the widening of intervals in a system with sensitive dependence on initial conditions:

Wolfram Language code: NestList[4#(1 - #)&, Interval[0.5], 4]

With machine-precision evaluation, this gives a definite but incorrect value:

Wolfram Language code: Sin[N[Pi]]

With Interval , the result spans the correct value:

Wolfram Language code: Sin[Interval[N[Pi]]]

Show how the bounds of an interval vary with a parameter:

Wolfram Language code: Plot[With[{u = Sin[Interval[{6, x}]]}, {Min[u], Max[u]}], {x, 0, 15}]

Test for points within an Interval :

Wolfram Language code: ℛ = Interval[{0, 1}]; gr = NumberLinePlot[ℛ]
Wolfram Language code: mf = RegionMember[ℛ]

Apply it to a list of points to test membership:

Wolfram Language code: pts = RandomVariate[UniformDistribution[{{-0.5, 1.5}}], 100]; col = mf[pts] /. {False -> Gray, True -> Red};
Wolfram Language code: gp = Graphics[{AbsolutePointSize[1.6], Table[{col[[i]], Point[{pts[[i, 1]], 3}]}, {i, 100}]}];
Wolfram Language code: Show[gr, gp, PlotRange -> All]

Construct the Cantor set by starting with a {0,1} interval and remove the middle third of each interval in each step:

Wolfram Language code: cantor = {a_, b_} :> {{a, a + (b - a) / 3}, {a + (b - a)2 / 3, b}};
Wolfram Language code: CantorRegion[n_Integer ? NonNegative] := Interval@@Nest[Flatten[Map[Function[s, s /. cantor], #], 1]&, {{0, 1}}, n]

Some steps:

Wolfram Language code: CantorRegion[1]
Wolfram Language code: CantorRegion[2]
Wolfram Language code: NumberLinePlot[Table[CantorRegion[i], {i, 3}], PlotRange -> {{0, 1}, Automatic}]

Find the length of the region:

Wolfram Language code: Table[RegionMeasure[CantorRegion[i]], {i, 5}]

Find a formula for the sequence of lengths using FindSequenceFunction :

Wolfram Language code: FindSequenceFunction[%, n]

Properties & Relations  (2)

Use Max and Min to find end points of intervals:

Wolfram Language code: Interval[{2, 4}]
Wolfram Language code: Max[%]

CenteredInterval represents real intervals or complex rectangles:

Wolfram Language code: CenteredInterval[1, 1 / 10]
Wolfram Language code: CenteredInterval[1 + 2I, 1 / 100 + I / 100]

Convert a bounded Interval to CenteredInterval representation:

Wolfram Language code: CenteredInterval[Interval[{1, 2}]]

Convert it back:

Wolfram Language code: Interval[Information[%, "Bounds"]]

When interval endpoints are not binary rationals, conversion makes the interval larger:

Wolfram Language code: Interval[{0, 1 / 3}]
Wolfram Language code: CenteredInterval[%]
Wolfram Language code: Interval[Information[%, "Bounds"]]
Wolfram Language code: N[%[[1]] - %%%[[1]]]

Possible Issues  (1)

Intervals are always assumed independent:

Wolfram Language code: u = Interval[{-1, 1}]
Wolfram Language code: u + u ^ 2

A single real variable over the same range yields an interval with a different lower limit:

Wolfram Language code: Minimize[{x + x ^ 2, -1 < x < 1}, x]

Tech Notes

History

Introduced in 1996 (3.0) | Updated in 2014 (10.0)

Wolfram Research (1996), Interval, Wolfram Language function, https://reference.wolfram.com/language/ref/Interval.html (updated 2014).

Text

Wolfram Research (1996), Interval, Wolfram Language function, https://reference.wolfram.com/language/ref/Interval.html (updated 2014).

CMS

Wolfram Language. 1996. "Interval." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/Interval.html.

APA

Wolfram Language. (1996). Interval. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Interval.html

BibTeX

@misc{reference.wolfram_2026_interval, author="Wolfram Research", title="{Interval}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/Interval.html}", note=[Accessed: 04-September-2026]}

BibLaTeX

@online{reference.wolfram_2026_interval, organization={Wolfram Research}, title={Interval}, year={2014}, url={https://reference.wolfram.com/language/ref/Interval.html}, note=[Accessed: 04-September-2026]}

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /