# Interval

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:

 In:= Out= Indeterminate limits can give intervals:

 In:= Out= ## Possible Issues(1)

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