An interval is the set of all real numbers lying between two given numbers, with the endpoints either included or excluded. A square bracket marks an endpoint that belongs to the set, and a parenthesis marks one that does not. That single convention accounts for every notation in this section.
Quick Reference
| Notation | Set-builder form | Name |
|---|---|---|
| Finite, closed | ||
| Finite, open | ||
| Finite, half-open | ||
| Finite, half-open | ||
| Infinite, closed | ||
| Infinite, open | ||
| Infinite, closed | ||
| Infinite, open | ||
| The whole real line |
Rules of thumb. A square bracket includes the endpoint, a parenthesis excludes it. The symbols and are not numbers, so they always take a parenthesis. To intersect two intervals, take the larger left endpoint and the smaller right endpoint.
In this section, we introduce the concept of intervals that are extensively used in calculus. The set of all real numbers that lie between two given numbers and may or may not include these end points is called an interval.
Closed interval is the set of real numbers that satisfy the inequalities .
Open interval is the set of real numbers that satisfy the inequalities .
Another notation for the open interval is .
- Note that the open interval does not include its endpoints and , while the closed interval include both of them.
We also have half-open intervals that include only one endpoint. In addition to finite intervals, we have infinite intervals that extend indefinitely in one or both directions. If an interval extends indefinitely in the positive direction, we write (or sometimes ) in place of the right end and if it extends indefinitely in the negative direction, we write in place of the left end. All of these cases are shown in the following table.
- We always denote the inclusion of an end in an interval by square bracket and its exclusion by a parenthesis.
- The symbols and (read "infinity" and "minus infinity") are not real numbers. We use these symbols to indicate that the interval extends indefinitely in a direction.
Notation Definition Graph Classification 
finite, closed .png)
finite, open .png)
finite, half-open 
finite, half-open .png)
infinite, closed .png)
infinite, open 
infinite, closed .png)
infinite, open .png)
infinite, open and closed - Because intervals are sets, we can calculate the union, intersection, and difference of intervals. For example the setcan be written asorSee the following figure.

Different ways to symbolically express the set shown above: - To avoid any mistakes in set calculations on intervals, you can picture them graphically.
Example 1.If and then find and .
Solution
The results are explained in the next two figures.

and

Exercises
Exercise 1.Write each interval in set-builder notation and classify it as open, closed, or half-open.
(a) (b) (c) (d)
Answer
(a) , closed (b) , open (c) , half-open (d) , closed
Solution
The rule to apply every time is the one stated in this section: a square bracket means the endpoint is included, and a parenthesis means it is excluded. An included endpoint gives ; an excluded one gives .
(a) . Both brackets are square, so both endpoints belong:
Both endpoints included makes it a closed interval.
(b) . Both brackets are parentheses, so neither endpoint belongs:
Neither endpoint included makes it an open interval. Note that itself is not in this set, though numbers as close to as you like, such as , are.
(c) . The left bracket is a parenthesis and the right one is square, so is excluded and is included:
Exactly one endpoint included makes it half-open.
(d) . The left bracket is square, so belongs. On the right we have the symbol , and this section stresses that is not a real number — it merely records that the interval runs on for ever to the right. That is why a parenthesis is always used there. Following the table,
and the table classifies this as closed, since the only genuine endpoint, namely , is included.
A remark on notation that trips people up: in part (b) looks exactly like the coordinates of a point in the plane. Only the surrounding context tells you which is meant. Some books avoid the clash by writing the open interval as , a notation this section also mentions.
Exercise 2.Write each set using interval notation.
(a)
(b)
(c)
(d)
Answer
(a) (b) (c) (d)
Solution
This is the previous exercise run backwards: now we read the inequality symbols and choose the brackets to match. A becomes a square bracket, a becomes a parenthesis.
(a) . The left end is with , so a square bracket. The right end is with , so a parenthesis:
(b) . Only one endpoint is named. Since is bigger than , the set runs from rightwards for ever, so the right end is . The inequality is strict, so is excluded and takes a parenthesis; always takes a parenthesis. Hence
Be careful to write the smaller end first. The notation always lists the left end before the right end, so would be wrong.
(c) . Now is at most , so the set runs leftwards for ever from . The left end is , taking a parenthesis, and the right end is with , taking a square bracket:
(d) . The set of all real numbers extends for ever in both directions, so both ends are infinite:
The last row of the table in this section records exactly this, noting that .
A check worth doing on every answer of this type: name one number that should be in the set and one that should not, then test both against your interval. For (b), the number should be in — and does lie in . The number should not be, since is false — and correctly is excluded by the parenthesis.
Exercise 3.Say whether each statement is true or false.
(a) (b) (c) (d)
Answer
(a) True (b) False (c) True (d) False
Solution
Every part here turns on a single endpoint, so the bracket next to that endpoint decides the answer.
(a) . The interval is . Test : we need , which is true because is satisfied by equality, and we need , which is true. Both conditions hold, so the statement is true. The square bracket at the left end is what lets in.
(b) . Test in . The first condition, , holds. The second condition, , does not hold, since is not strictly less than itself. So the statement is false. The parenthesis at the right end keeps out.
Parts (a) and (b) together make the point of the whole notation: contains its left endpoint but not its right one, and you can tell which is which purely by looking at the brackets.
(c) . This interval is , that is, all numbers at most . Test : we need , which holds by equality. So the statement is true. Do not be put off by the parenthesis on the left; that one sits next to and has nothing to say about .
(d) . This interval is , that is, all strictly positive numbers. Test : we need , which is false. So the statement is false.
This case deserves a moment's thought. Every positive number, however small, lies in — including , , and . Yet itself does not. There is no "first" number in the interval, which is exactly what an open end means.
Exercise 4.Let and . Find and .
Answer
Solution
As this section advises, sketch the two intervals one above the other on a number line before doing anything else. Draw running from (filled dot, since it is included) to (hollow dot, since it is excluded), and running from (hollow) to (filled). The two overlap in the stretch between and .
The union . The union collects every point lying in or in . Because the two intervals overlap, they merge into one unbroken stretch, running from the leftmost point of either to the rightmost point of either.
- The left end is , coming from . It is included in , so it is included in the union: square bracket.
- The right end is , coming from . It is included in , so it is included in the union: square bracket.
What about the endpoints and in the middle? They cause no trouble. The point is missing from , but it lies in since , so the union does contain it. Likewise is missing from but lies in , so the union contains it. Each interval plugs the other's gap, which is why the answer has no holes.
The intersection . The intersection keeps only the points lying in both, so we take the overlapping stretch. It runs from the larger of the two left ends to the smaller of the two right ends.
- The left ends are and ; the larger is . Since is excluded from , it cannot be in the intersection: parenthesis.
- The right ends are and ; the smaller is . Since is excluded from , it cannot be in the intersection: parenthesis.
The rule for endpoints in an intersection is strict: a point must be in both sets, so if either set leaves it out, the intersection leaves it out.
Check with sample points. Take . It lies in , since , and in , since . So it should be in both answers, and indeed and . Now take . It lies in but not in , so it should be in the union but not the intersection — and indeed while .
Exercise 5.Let and . Find and .
Answer
, which cannot be written as a single interval.
Solution
Sketch the two intervals again. This time stops at and does not begin until , so there is a gap between them containing the numbers from to . The intervals do not touch at all.
The intersection . A point in the intersection would have to satisfy both
The first condition forces and the second forces . No number can be both smaller than and larger than , since that would require , and there is no such number. So nothing qualifies, and
the empty set met in the earlier section on sets.
The union . The union does exist — it simply consists of both pieces:
The important point is that this cannot be simplified into a single interval. It is tempting to write , but that would be wrong, because contains numbers such as that lie in neither nor . Test it: is in ? No, since fails. Is in ? No, since fails. So has no business being in the union, and any single interval stretching from to would wrongly include it.
Comparison with the previous exercise. There, the two intervals overlapped and the union collapsed into one interval. Here they are separated by a gap, and the union must be left as two pieces joined by . Whether a union of intervals simplifies depends entirely on whether the pieces meet — which is precisely why this section recommends drawing the picture first.
Exercise 6.Find (sometimes written as ) and write the answer using interval notation.
Answer
Solution
Recall the definition of set difference from the earlier section on sets: consists of the elements of that are not in . So we begin with the whole of and cut out whatever belongs to .
What is being removed. The set is . Both ends are open, so the numbers and themselves are not in it. Only the numbers strictly between them are removed.
What survives. Take a point in and ask whether it is removed.
- If : such an is not strictly greater than , so it is not in and it survives. Note that survives, because is false, so was never in the removed set.
- If : this is exactly the removed set, so these points go.
- If : such an is not strictly less than , so it is not in and it survives. Again survives, since is false.
So what is left consists of two pieces, and :
The point to be careful about. Because the interval removed was open, its endpoints and were never taken away, and they appear in the answer with square brackets. Students very often write here by reflex, excluding them. Always ask whether the endpoint actually belonged to the set being subtracted.
To see the contrast, suppose we had been asked for instead, with a closed interval removed. Then and would be taken away, and the answer would be .
Check. Test : it lies in , and it does not lie in , so it should survive — and . Test : it lies in and also in , so it should be removed — and is in neither nor . Both checks agree.
Exercise 7.Write each set using interval notation.
(a) (b)
Answer
(a) (b)
Solution
Each part needs two steps: first strip the absolute value bars using the properties of the previous section, then translate the resulting inequality into brackets.
Part (a): .
Property 7 form (i) of the previous section says is equivalent to when . Here and , which is positive, so
Add to all three parts to leave alone in the middle:
Both inequalities are strict, so both endpoints are excluded and both brackets are parentheses:
Read geometrically, this is the set of points within distance of — that is, the -neighbourhood of — which does indeed reach from to .
Part (b): .
Property 7 form (ii) says is equivalent to or . Here , so
These are two separate conditions joined by or, so the set breaks into two pieces and we take their union.
- runs leftwards for ever from , with included: .
- runs rightwards for ever from , with included: .
The contrast between the two parts. A "less than" condition on an absolute value traps near the centre and gives one interval. A "greater than or equal" condition pushes away from the centre in both directions and gives two intervals joined by . Trying to write part (b) as a single interval is impossible, since the numbers between and must be left out.
Check. For (a), gives , so it belongs, and indeed ; gives , which is not less than , and indeed . For (b), gives , and ; gives , which is not at least , and correctly lies in neither piece.
Exercise 8.Write the -neighbourhood of using interval notation.
Answer
Solution
The previous section defines the -neighbourhood of a point as the set of all points whose distance from is less than :
Here the centre is and the radius is .
Working out the two ends. The left end is
and the right end is
Choosing the brackets. The definition of a neighbourhood uses a strict inequality, , so points at distance exactly are not included. Both endpoints are therefore excluded and both brackets are parentheses:
A neighbourhood is always an open interval, for exactly this reason.
Check. Make sure the two ends are in the right order — the left one must be the smaller. Since , they are. This is the step to watch with a negative centre, because subtracting the radius from a negative number moves further left, which can feel counter-intuitive.
Test a point: has distance from , and , so it should belong. Indeed . Now test : its distance is , which is not less than , so it should not belong, and correctly .
Exercise 9.A lift carries a load of kilograms. It only operates when there is something inside, and it is rated for a maximum of kg. Write the set of loads for which the lift operates, using interval notation, and say whether the interval is open, closed, or half-open.
Answer
, half-open.
Solution
Translate each phrase of the problem into an inequality, paying close attention to whether the boundary value itself is allowed.
"There is something inside." The load must be more than nothing, so
This is strict: a load of exactly means the lift is empty, and we are told it does not operate then. So is excluded.
"Rated for a maximum of kg." The word maximum means is the largest permitted value, and a permitted value it is. So
with included.
Putting them together. Both conditions must hold at once:
Now choose brackets. The left endpoint is excluded, so a parenthesis; the right endpoint is included, so a square bracket:
Exactly one endpoint is included, so by the table in this section the interval is half-open.
Why the endpoints deserve care. The whole difficulty in problems of this kind lies in two or three words. "Maximum of ", "at most ", and "no more than " all include . But "under ", "less than ", and "below " exclude it. Reading past those words is the commonest source of error, and the difference is real: a load of exactly kg either is or is not allowed.
Check. A load of kg should be allowed, and because of the square bracket. A load of kg should not be, and because of the parenthesis. A load of kg should not be, and indeed .
Exercise 10.A student writes . Find the error and give the correct answer.
Answer
The correct answer is .
Solution
The error. The student has used square brackets next to . A square bracket means the endpoint is included, so the first piece contains , and the second piece contains as well.
But the whole purpose of the set is to leave out. The student has written a set that not only fails to exclude but includes it twice over.
In fact the student's expression is the whole of . Every real number lies in one piece or the other: numbers less than in the first, numbers greater than in the second, and itself in both. So instead of removing one point, the student's answer removes nothing at all.
The correct answer. To exclude , both brackets beside it must be parentheses:
which is exactly the form given in this section. The first piece holds every number strictly below and the second every number strictly above it, leaving a single point missing in between. The section also records the alternative way of writing the same set, , using the set difference of the earlier section.
How to catch this yourself. After writing an interval answer, test the boundary value against the original condition. Here the original says , so must fail to belong. Substituting into the student's answer shows it belongs — so the answer must be wrong. This single test takes a few seconds and catches almost every bracket mistake.
Exercise 11.Explain why it is never correct to write an interval as .
Solution
The trouble is the square bracket next to .
A square bracket has one specific meaning in this notation: the endpoint next to it is a number that belongs to the set. So would be claiming that is one of the elements of the set.
But this section states plainly that and are not real numbers. They are symbols used to record that an interval runs on without stopping in a given direction. There is no point on the real number line called , so there is nothing there to include. Writing claims membership for something that does not exist as a number.
Look at what the set-builder form would have to say. Following the pattern of the table, would mean
and the condition is not a statement about real numbers at all, since compares numbers and is not one.
The correct form. The interval of all numbers at least is written
with a square bracket on the left, because is a genuine real number that does belong, and a parenthesis on the right, because there is no endpoint there to include. The table in this section still calls this interval closed, since its only real endpoint is included.
The rule to remember. A parenthesis always sits next to and next to , without exception. So , and are all correctly written, while and are not.
Exercise 12.Is the following statement always true, sometimes true, or never true? "The union of two intervals is an interval." Justify your answer.
Answer
Sometimes true.
Solution
The answer is sometimes. We need one example where the union is an interval and one where it is not.
Keep in mind the description given at the start of this section: an interval is the set of all real numbers lying between two given numbers, possibly including the ends. The key words are all the numbers in between — an interval is one unbroken stretch of the line with no gaps.
A case where the union is an interval. Take and . These overlap, since the numbers from to belong to both. Pooling them gives every number from to with nothing missing:
which is an interval.
A case where the union is not an interval. Take and . These are separated by a gap. Their union is
and this is not an interval. To see why, notice that and both belong to the set, but the number , which lies between them, does not: it fails and it fails . An interval containing and would have to contain everything in between, and this set does not.
Since both outcomes occur, the statement is sometimes true.
What decides it. The union of two intervals is again an interval exactly when the two pieces meet or overlap, leaving no gap. This is the same distinction seen in earlier exercises: and overlapped and merged into , while and were separated and had to be left as two pieces.
A borderline case worth noticing. Consider and . They share no points at all, so their intersection is empty — yet their union is , a perfectly good interval, because the first piece stops precisely where the second begins and the point is supplied by the second. So overlapping is not required; what matters is that no gap is left.
A contrast for interest. The corresponding statement about intersections behaves differently: the intersection of two intervals never has a gap in it, because a point missing from the middle would have to be missing from one of the two originals, and neither original has gaps.
Exercise 13.Find the value of for which , and explain why no other value works.
Answer
Solution
Working out the intersection in general. A number lies in exactly when it lies in both, that is, when
For to clear both lower bounds it must be at least the larger of and . For it to stay under both upper bounds it must be at most the smaller of and , which is . So the intersection runs from the larger of and up to .
Matching the required answer. We want the intersection to be , so its left end must be . The left end is the larger of and , so we need
Since is not , the larger of the two must be itself, giving
Confirming it works. With ,
because sits entirely inside — every number between and is certainly between and . This matches the requirement.
Why nothing else works. Test the other possibilities.
- If , say : then the larger of and is , so the intersection is , not . The number would be in it but is not wanted. Any below gives the same answer , since the bound from the second interval takes over.
- If , say : the intersection is , which again contains and so is too big.
- If , say : the intersection is , which is missing the numbers from up to and so is too small.
- If : then no can satisfy at all, and the intersection is empty.
Only places the left end exactly where it is needed, so the value is unique.
A remark on the method. The useful fact extracted along the way is worth remembering for future work: intersecting two intervals means taking the larger of the two left ends and the smaller of the two right ends. Drawing the two intervals one above the other, as this section recommends, makes this obvious at a glance.
Frequently Asked Questions
What is an interval?
An interval is the set of all real numbers lying between two given numbers, which are called its endpoints. The endpoints may or may not be included, and the interval may extend without bound in one or both directions. Because an interval is a set of numbers, all the set operations apply to it: intervals can be unioned, intersected, and subtracted.
When do I use a square bracket and when do I use a parenthesis?
A square bracket means the endpoint is included, and a parenthesis means it is excluded. So contains both and , while contains neither, and contains but not . The bracket matches in the corresponding inequality and the parenthesis matches . Some texts write the open interval as instead, which avoids any clash with the notation for an ordered pair.
Why does infinity always get a parenthesis and never a bracket?
Because and are not real numbers. They are symbols indicating that the interval continues without end in that direction, so there is no endpoint there to include. Writing would claim that is a member of the set, which is meaningless. The correct forms are and , where the bracket, when present, applies only to the genuine numerical endpoint.
What is the difference between an open and a closed interval?
An open interval excludes both endpoints, a closed interval includes both, and a half-open interval includes exactly one. The distinction is not a technicality. The closed interval has a largest element, namely , while the open interval has none, because whatever candidate you name there is always a larger number still below . Note that counts as both open and closed, since it has no endpoints to include or exclude.
How do I take the union or the intersection of two intervals?
Draw them one above the other on the same number line. The union is everything covered by at least one of them, and the intersection is the part covered by both. For the intersection there is a shortcut: keep the larger of the two left endpoints and the smaller of the two right endpoints. With and this gives , while the union is . Watch the bracket type at each surviving endpoint, since it comes from whichever interval supplied that endpoint.
Is the union of two intervals always an interval?
Only when they overlap or at least touch. The union is a single interval because the two pieces share the stretch from to . By contrast has a gap at and is not an interval at all, merely a union of two of them. This is the standard way of writing the set , which can equally well be written as .
How do I write "all numbers except 3" in interval notation?
Split the line at the excluded point and take the union of the two remaining pieces:
Both endpoints at take parentheses, which is exactly what removes the single point. The same idea handles domains of rational functions: to exclude both and , write .