๐Ÿ“˜ CodingMarble Learn

Intervals of Real Numbers

An interval is all the real numbers between two ends. A square bracket [ ] means the end is included, a round bracket ( ) means it is left out. [a, b] is closed, (a, b) is open, [a, b) and (a, b] are half-open. Intervals can go on for ever, like [1, โˆž), but โˆž always gets a round bracket. On the number line a filled dot means in and a hollow dot means out. The intersection A โˆฉ B is the part in both intervals; the union A โˆช B is everything in at least one of them.

๐ŸŽฌ Step-by-step story

  1. Colour every number from โˆ’2 to 3 on the number line. Both ends are filled dots, so they are in: the closed interval [โˆ’2, 3].
  2. Now make the dots hollow. The ends are left out: the open interval (โˆ’2, 3). The number 3 is not in it, but 2.999 is.
  3. One end hollow, one end filled: the half-open interval (โˆ’2, 3]. Round bracket means out. Square bracket means in.
  4. Some intervals never stop. [1, โˆž) goes right for ever, so we draw an arrow. โˆž is not a number, so it always gets a round bracket.
  5. Two intervals, A and B. Where both are coloured is the intersection A โˆฉ B. All the colour together is the union A โˆช B.
  6. Your turn. Slide the ends of A and B, switch the ends in or out, and read the intersection and the union.

Tip: drag the 3D scene to turn it. Use two fingers to zoom.

๐Ÿค” Common doubts, cleared

What is the biggest number in the open interval (โˆ’2, 3)?

There is none. Whatever number you pick, like 2.999, there is a bigger one, like 2.9999, that is still less than 3. That is why the ends stay hollow.

What is the difference between ( ) and [ ]?

A square bracket includes the end number. A round bracket leaves it out. Look at the filled and hollow dots in the 3D.

Why does โˆž always get a round bracket?

Infinity is not a number. You can never reach it, so it cannot be an end that is "in".

Is the union of two intervals always one interval?

No. If the two intervals have a gap between them, the union is two pieces. Slide B far from A in the free play and see.

How can the intersection be empty?

When the intervals do not overlap, or only touch at an end that one of them leaves out. Then no number is in both, and we write โˆ….

Does the order of the numbers matter, like (5, 2)?

Yes. The smaller end always comes first, because we read the number line from left to right.

Types of intervals

An interval is a set of real numbers that sit between two ends, with no gaps. The two ends are called endpoints. Each end can be in the interval or out of it.

NameInequalityIntervalEnds
Closeda โ‰ค x โ‰ค b[a, b]both in
Opena < x < b(a, b)both out
Half-opena โ‰ค x < b[a, b)a in, b out
Half-opena < x โ‰ค b(a, b]a out, b in

Some intervals have no end on one side. They are unbounded: [a, โˆž) means x โ‰ฅ a, (a, โˆž) means x > a, (โˆ’โˆž, b] means x โ‰ค b, (โˆ’โˆž, b) means x < b, and (โˆ’โˆž, โˆž) is the whole line โ„. The symbol โˆž ("infinity") only says "it never stops". It is not a number, so it always gets a round bracket.

Drawing intervals on the number line

To draw an interval, follow four small steps.

  1. Draw a number line and mark the two ends.
  2. At each end put a filled dot if the end is in, or a hollow dot if it is out.
  3. Colour the line between the ends.
  4. If the interval is unbounded, end the colour with an arrow.

Example: x > โˆ’1 is (โˆ’1, โˆž). Hollow dot at โˆ’1, colour to the right, arrow at the end.

Integers inside an interval: count only the whole numbers that are in. For (โˆ’2, 3] they are โˆ’1, 0, 1, 2, 3, which makes 5 numbers. But the interval itself holds infinitely many numbers, such as 0.5 and 2.75.

Intersection and union of intervals

Take two intervals A and B.

Intersection A โˆฉ B: the numbers that are in A and in B. On the line, it is the overlap. Its left end is the bigger of the two left ends. Its right end is the smaller of the two right ends. If an end number is shared, it is in only when it is in both intervals.

Union A โˆช B: the numbers that are in A or in B (or both). On the line, it is all the colour. If A and B overlap or touch, the union is one interval. If there is a gap, the union is written as two pieces joined by โˆช.

Example: A = [โˆ’3, 1], B = (โˆ’1, 4]. Left end of overlap: the bigger of โˆ’3 and โˆ’1 is โˆ’1, which B leaves out, so (. Right end: the smaller of 1 and 4 is 1, which A includes, so ]. A โˆฉ B = (โˆ’1, 1]. A โˆช B = [โˆ’3, 4].

If the intersection is empty we write โˆ…. For A = [0, 1] and B = [2, 3] there is no overlap, so A โˆฉ B = โˆ… and A โˆช B = [0, 1] โˆช [2, 3].

Try it: the number-line game

Play with a friend. One person says an interval, like (โˆ’1, 4]. The other draws it, then names one number that is in it and one number that is just outside. Now change roles with two intervals and find A โˆฉ B and A โˆช B. The 3D in the last story step lets you check your answers.

Key formulas and definitions

Worked examples

1. Write โˆ’1 โ‰ค x < 4 as an interval and say how to draw it.

It is [โˆ’1, 4). Filled dot at โˆ’1 (in), hollow dot at 4 (out), colour between them.

2. Write x > 5 as an interval.

x is bigger than 5 and never stops: (5, โˆž). 5 is out and โˆž always has a round bracket.

3. A = [โˆ’2, 3] and B = (1, 6]. Find A โˆฉ B and A โˆช B.

Overlap starts at the bigger left end, 1. B leaves 1 out, so (. It ends at the smaller right end, 3. A has 3 in, so ]. A โˆฉ B = (1, 3]. The colour goes from โˆ’2 to 6: left end โˆ’2 is in A, right end 6 is in B. A โˆช B = [โˆ’2, 6].

4. A = [0, 2] and B = (2, 5). Find A โˆฉ B and A โˆช B.

The number 2 is in A but not in B, so no number is in both: A โˆฉ B = โˆ…. But A ends at 2 (included) and B starts just after 2, so there is no gap. A โˆช B = [0, 5).

5. A = (โˆ’โˆž, 3) and B = [โˆ’1, โˆž). Find A โˆฉ B and A โˆช B.

Overlap: from โˆ’1 (in B) to 3 (out of A): [โˆ’1, 3). Together they cover every number: A โˆช B = (โˆ’โˆž, โˆž) = โ„.

6. How many integers are in (โˆ’2, 3]? List them.

โˆ’2 is out, 3 is in. The integers are โˆ’1, 0, 1, 2, 3. That is 5 integers.

Common mistakes

Practice quiz

1. Which interval includes both ends?
2. x โ‰ฅ 7 is written as:
3. Which number is in (2, 5]?
4. A = [1, 5], B = [3, 8]. A โˆฉ B is:
5. A = [1, 5], B = [3, 8]. A โˆช B is:

Practice: answer these yourself

Type or choose your answer, then press Check. Use a hint if you are stuck; the full solution appears after you answer.

Frequently asked questions

What is an interval in maths?

An interval is all the real numbers between two ends, with no gaps. We write it with brackets, like [2, 7) or (โˆ’โˆž, 4].

What is the difference between open and closed intervals?

A closed interval [a, b] includes both end numbers. An open interval (a, b) leaves both ends out.

How do I find the union and intersection of intervals?

Draw both on one number line. The overlap is the intersection. All the coloured part together is the union.

Learn first

Learn next

Related lessons

All Maths lessons