📘 CodingMarble Learn

Absolute Value and Intervals

The absolute value |x| is the distance of x from 0 on the number line, so it is never negative. |x - a| is the distance between x and a. Solving |x - a| = b gives x = a + b or x = a - b. An interval is a stretch of the number line, written with round brackets (end not included) or square brackets (end included).

đŸŽŦ Step-by-step story

  1. This is a number line. 0 is in the middle. The number 3 is 3 steps from 0.
  2. -3 is on the left, but it is still 3 steps from 0. A distance is never negative.
  3. |x| = 3 means: 3 steps from 0. There are two such places, 3 and -3.
  4. An interval is a stretch of the line, like -2 up to 4. A filled dot means included. An empty dot means not included.
  5. |x - 1| < 3 means: within 3 steps of 1. That is the same stretch, from -2 to 4.
  6. Free play: slide x and a. Watch the distance |x - a| change.

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

🤔 Common doubts, cleared

Why is |-3| equal to +3? Did the minus just disappear?

Absolute value does not erase a sign for fun. It measures the distance to 0. -3 is on the left, but the distance is still 3 steps. See the blue bar in 3D.

Why does |x| = 3 have two answers?

There are two places that are 3 steps from 0: one on the right (3) and one on the left (-3). Both orange dots show it.

What is the difference between a round and a square bracket?

Square means the end number is included (filled dot). Round means it is left out (empty dot).

How does |x - 1| < 3 become an interval?

It means x is less than 3 steps from 1. So x is between 1 - 3 and 1 + 3, which is the green stretch from -2 to 4.

Is |x - a| the same as |a - x|?

Yes. The distance from x to a is the same as from a to x. Swap the sliders and the distance does not change.

What is absolute value?

Put a number on the number line. Count the steps to 0. That count is its absolute value. We write it with two bars: |x|.

So |5| = 5 and |-5| = 5. Both are 5 steps from 0. |0| = 0.

In symbols: |x| = x if x is 0 or positive, and |x| = -x if x is negative. The "minus" in -x turns a negative number into a positive one, so |x| is never below 0.

Distance between two numbers: |x - a|

The distance between x and a on the line is |x - a|. It is the same as |a - x|. Example: the distance from 2 to 9 is |9 - 2| = 7. From -4 to 3 it is |3 - (-4)| = 7.

Remember: |x| is just |x - 0|, the distance from 0.

Solving |x + a| = b

Read |x - c| = b as: "x is b steps from c". Go b steps right and b steps left from c. There are two answers: x = c + b and x = c - b.

For |x + 3| = 5: write it as |x - (-3)| = 5. So x = -3 + 5 = 2 or x = -3 - 5 = -8. Check: |2 + 3| = 5 and |-8 + 3| = 5.

If b is negative, there is no answer, because a distance cannot be negative. If b = 0, there is one answer: x = c.

Intervals on the number line

An interval is all the numbers between two ends.

Link to absolute value: |x - c| < r means c - r < x < c + r, the interval (c - r, c + r). And |x - c| > r means x is outside it: x < c - r or x > c + r.

Try it: walk the line

Draw a line on the floor with chalk and mark -5 to 5. Stand on 0. Take 4 steps right, then go back to 0 and take 4 steps left. Where are you? 4 and -4. Both are |x| = 4. Now guess before you slide: where must x be so that |x - 2| = 3? Check in the 3D.

Key formulas and definitions

Worked examples

1. Find |-7|, |4| and |0|.

|-7| = 7 (7 steps from 0). |4| = 4. |0| = 0.

2. Find the distance between -2 and 5.

|5 - (-2)| = |7| = 7.

3. Solve |x| = 6.

x is 6 steps from 0, so x = 6 or x = -6.

4. Solve |x + 4| = 3.

Write as |x - (-4)| = 3. x = -4 + 3 = -1 or x = -4 - 3 = -7. Check: |-1 + 4| = 3 and |-7 + 4| = 3.

5. Write 2 < x ≤ 9 as an interval and say which dots are filled.

(2, 9]. The dot at 2 is empty (2 is not included). The dot at 9 is filled.

6. Solve |2x - 5| = 7.

2x - 5 = 7 gives x = 6. 2x - 5 = -7 gives x = -1. Check: |12 - 5| = 7 and |-2 - 5| = 7.

7. Write |x - 1| < 3 as an interval.

1 - 3 < x < 1 + 3, so (-2, 4).

8. Solve |x - 2| = |x + 6|.

x is the same distance from 2 and from -6, so it is the middle: (2 + (-6)) / 2 = -2. Check: |-4| = 4 and |4| = 4.

Common mistakes

Practice quiz

1. |-9| equals:
2. The solutions of |x| = 2 are:
3. The interval [1, 4) contains:
4. |x - 3| = 0 gives:
5. |x| = -4 has:

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 absolute value in simple words?

It is how far a number is from 0 on the number line. It is never negative. |-8| = 8.

How do you solve |x + a| = b?

Split it into two equations: x + a = b and x + a = -b. Solve both. If b is negative there is no answer.

What is the difference between (a, b) and [a, b]?

(a, b) leaves out a and b. [a, b] includes a and b.

Learn first

Learn next

Related lessons

All Maths lessons