Back to the blog

Intervals · 7 min read

Intervals on the number line

Solve inequalities and write them as intervals: open and closed ends, infinity, and/or, and quadratic inequalities.

At a water park, a sign stands by the highest slide: you must be at least 1.20 m tall. If you are exactly 1.20 m, you may go. If you are 1.19 m, you may not. Call your height h. The sign then says:

h ≥ 1.20

A condition like this is an inequality. All the numbers that satisfy it lie side by side on the number line. Such a piece of the number line is an interval. In this post you learn to draw intervals and to work with them.

A piece of the number line

Take all the numbers between −2 and 3. Whole numbers are not the only ones. 0.5 and √2 lie in between too. At the ends you still have a choice to make.

  • A filled dot means the end belongs to the interval. The inequality uses ≤ or ≥. The interval uses a square bracket: [ or ].
  • An open circle means the end does not belong to it. The inequality uses < or >. The interval uses a round bracket: ( or ).

Three examples with the same ends:

−2 < x < 3 is (−2, 3)
−2 ≤ x ≤ 3 is [−2, 3]
−2 < x ≤ 3 is (−2, 3]

Drag the ends below. The buttons make an end open or closed.

Drag the ends

−2 < x ≤ 3(−2, 3]

−6−5−4−3−2−10123456
Inequality
−2 < x ≤ 3
Interval
(−2, 3]
Whole numbers inside
5: −1, 0, 1, 2, 3
A filled dot belongs to the interval, an open circle does not.

The smaller number always comes first, just as on the number line. You read (−2, 3] as: all numbers greater than −2 and less than or equal to 3.

On to infinity

The sign at the slide has only one end. Every height from 1.20 m up is fine, however tall you are. An interval like this goes on forever on one side. It is called a half-line.

On that side there is no number. You write ∞ for infinity:

x ≥ 4 is [4, ∞)
x < 1 is (−∞, 1)

The bracket next to ∞ is always round. Infinity is not a number. You never reach it, so it never belongs to the interval.

Pick a sign below and drag the end.

A half-line

x ≥ 4[4, ∞)

−5−4−3−2−1012345
Inequality
x ≥ 4
Interval
[4, ∞)
End included
yes
The arrow goes on to infinity. The bracket there is always round.

Going back works the same way. (−1, 5] becomes −1 < x ≤ 5. And [0, ∞) becomes x ≥ 0.

Solving an inequality

You solve an inequality almost the same way as an equation. You may add or subtract the same number on both sides. You may multiply or divide both sides by the same positive number. A negative number works differently.

Take 3 − 2x < 7.

3 − 2x < 7
−2x < 4 (subtract 3 from both sides)
x > −2 (divide both sides by −2, the sign flips)

The solution is x > −2, so (−2, ∞).

The flip comes from a mirror. Times −1 mirrors the number line in 0. What lay on the left ends up on the right. Drag a and b below and watch the order.

Times −1 mirrors the number line
  • a
  • b
−6−5−4−3−2−10123456−6−5−4−3−2−10123456
Before times −1
2 < 5
After times −1
−2 > −5
Drag a and b. Below are −a and −b. The order turns around.
Show the numbers
pointnumbertimes −1
a2−2
b5−5

2 is less than 5. But −2 is greater than −5. Dividing by −2 is the same as times −1 and then dividing by 2. That is why the sign flips.

Check your answer with a number. Take x = 0. It lies in (−2, ∞). You get 3 − 0 = 3, and 3 < 7 is true. Take x = −3. It lies outside. You get 3 + 6 = 9, and 9 < 7 is false.

Two signs at once

Sometimes x sits between two bounds in one inequality. Then you do each step to all three parts.

−1 ≤ 2x + 3 < 9
−4 ≤ 2x < 6 (subtract 3 from all parts)
−2 ≤ x < 3 (divide all parts by 2)

The solution is [−2, 3).

Two conditions: and, or

Sometimes there are two conditions. The word between them matters a lot.

  • And: a number must satisfy both. You keep only the part where the two intervals overlap.
  • Or: a number must satisfy at least one. You take both pieces together. You write this with the sign ∪.

Two examples:

x > −1 and x ≤ 3 gives (−1, 3]
x < −2 or x ≥ 1 gives (−∞, −2) ∪ [1, ∞)

Drag the ends of A and B below. Then pick and or or.

A and B, A or B
  • A
  • B
  • Solution
ABand−6−5−4−3−2−10123456
A
[−4, 2]
B
[−1, 5]
A and B
[−1, 2]
Solution
−1 ≤ x ≤ 2
Drag the ends of A and B. The bottom line is the solution.

If A and B lie apart, and leaves no number at all. With or you then keep two separate pieces.

Quadratic inequalities

This part is mathematics B, MULO 4.

Take x² − 7x + 12 < 0. Look at the graph of y = x² − 7x + 12. You want the x-values where the graph lies below the x-axis.

First find the roots. Factor:

x² − 7x + 12 = (x − 3)(x − 4) = 0
x = 3 or x = 4

The number in front of x² is 1. It is positive, so the graph is a parabola that opens upward. It lies below the x-axis only between the roots. The ends do not belong, because y = 0 there. The solution is (3, 4).

Check with x = 3.5: 12.25 − 24.5 + 12 = −0.25. That is less than 0, so it fits.

Move c with the slider below and pick a sign. The thick piece on the x-axis is the solution.

Below or above the x-axis

x² − 7x + 12 < 0(3, 4)

  • y = x² − 7x + c
  • Solution
−4−202468−1012345678
Roots
x = 3 and x = 4
Solution
(3, 4)
Move c and pick a sign. The thick piece on the x-axis is the solution.
Show the numbers
xysign of y
012+
16+
22+
300
400
52+
66+
712+

At c = 12.25 the parabola touches the x-axis at one point. At c = 14 it no longer dips below the x-axis. Then x² − 7x + c < 0 has no solution.

The 2017 MULO exam in mathematics B asked this: −x² + 7x − 12 < 0. First multiply by −1. The sign flips:

x² − 7x + 12 > 0

Now you want where the parabola lies above the x-axis: left of 3 and right of 4. The answer is (−∞, 3) ∪ (4, ∞). The exam wrote it as ⟨←, 3⟩ ∪ ⟨4, →⟩.

Try it yourself

Solve 5 − 3x ≥ 11. Write the solution as an interval.

Show the answer

First subtract 5 from both sides: −3x ≥ 6. Then divide by −3, and the sign flips: x ≤ −2. The solution is (−∞, −2].

Which whole numbers satisfy 2x − 1 > −5 and x + 4 ≤ 6?

Show the answer

The first gives 2x > −4, so x > −2. The second gives x ≤ 2. Together that is (−2, 2]. The whole numbers are −1, 0, 1 and 2.

Mathematics B. Solve x² − x − 6 ≤ 0.

Show the answer

Factor: x² − x − 6 = (x − 3)(x + 2). The roots are x = −2 and x = 3. The parabola opens upward and lies below the x-axis between them. With ≤ the ends belong. The solution is [−2, 3].

Read next

  • Powers and roots

    Powers and roots: the rules

    What a power is, the four rules, negative exponents and how to simplify √72. With figures you can slide and count.

  • Solving equations

    Solving equations: balance and graph

    Solve equations with the balance method, through brackets and fractions, with two crossing lines and with x², from factorising to the quadratic formula.

  • Pythagoras' theorem

    Pythagoras in the plane and in space

    Why a² + b² = c² is true, how to work out a side, how to check for a right angle, and how to find distances and space diagonals.