Absolute Value and Distance

The absolute value | x | strips the sign off a number and keeps only its size, so it measures the distance from x to 0 on the number line. Distance between two points, the triangle inequality, and the neighborhoods used throughout calculus are all built from this one idea.

Quick Reference

Expression Meaning Equivalent form
| x | Distance from x to 0 x if x 0 , and x if x < 0
| a | 0 Never negative | a | = 0 only when a = 0
| a | = | a | Sign does not matter | a b | = | b a |
| a b | = | a | | b | Splits over products | a b | = | a | | b | , b 0
| x | r x is within r of 0 r x r
| x | r x is at least r from 0 x r or x r
| x | = r Two solutions x = r or x = r
| a + b | | a | + | b | Triangle inequality Equality when a and b have the same sign
d ( P , Q ) = | b a | Distance between two points Same value in either order
| x a | < δ δ -neighborhood N δ ( a ) a δ < x < a + δ
0 < | x a | < δ Deleted neighborhood N δ ( a ) N δ ( a ) with the center a removed

Absolute Value

It is frequently desirable to measure how large a quantity is, regardless of its sign. In such cases, we use merely the *absolute value *of the quantity.

Definition 1.

The absolute value (or modulus) of a real number x , is a nonnegative real number denoted by | x | , and defined as follows

|x|=\begin{cases} x & \text{if }x>0\\ 0 & \text{if }x=0\\ -x & \text{if }x<0 \end{cases}
  • Geometrically the absolute value of a number x is its distance from 0 regardless of the direction.
Example 1.

Find | 2 | , | 2 | , | 0 | , | 3 3 | , | 3 3 |

Solution

Because 2 , 0 , 3 3 are nonnegative [ 3 1.73 , so 3 3 1.27 ], we have

| 2 | = 2 ,   | 0 | = 0 ,   | 3 3 | = 3 3

but 2 and 3 3 are negative, so we have

| 2 | = ( 2 ) = 2 , | 3 3 | = ( 3 3 ) = 3 3 .
  • In computer languages and mathematical packages, the absolute value of x is often denoted by abs(x).
  • We have by definition: | x | x | x | because if x > 0 , then | x | = x and we have the sign of equality on the right and the sign of inequality on the left (a positive number is larger than a negative one). If x < 0 , then | x | = x , and we have the sign of equality on the left and the sign of inequality on the right.

[Note that a b means a < b or a = b ]

From the above definition, it follows that for every real numbers a and b we have:

  1. | a | 0
  2. | a | = 0 if and only if a = 0
  3. | | a | | = | a | (because | a | 0 )
  4. | a | = | a | .
  5. | a b | = | a |   | b | .
  6. | a b | = | a | | b | (provided b 0 )
  7. If r > 0
|x|\le r\qquad\text{is equivalent to}\qquad-r\le x\le r \tag{i}r\le|x|\qquad\text{is equivalent to}\qquad x\le-r\quad\text{or }\quad r\le x \tag{ii}|x|=r\qquad\text{is equivalent to}\qquad x=r\quad\text{or}\quad x=-r \tag{iii}
Geometric Interpretation

Let r > 0 and

| x | r .

The above relationship implies that x is nearer to 0 than r , and you can see from the following figure that this is possible if and only if x lies between r and r :

r x r .

<img
src="https://adaptivebooks.org/book-images/precalculus/Ch0-AbsoluteValue-Equivalence.png"
alt="Number line showing that |x| ≤ r means x lies between −r and r, with the interval [−r, r] highlighted and |x| marked as the distance from 0 to x."

Geometric interpretation of |x| ≤ r: the value x lies within distance r from the origin, i.e., −r ≤ x ≤ r.

You can show the significance of the other two statements geometrically.

  1. | a + b | | a | + | b | (known as triangle inequality)
  • If a and b are either both positive, both negative, or at least one of them is zero, then | a + b | = | a | + | b | . Otherwise, when a and b have opposite signs, | a + b | < | a | + | b | .
Proof of the triangle inequality

We know

| a | a | a |

and

| b | b | b | .

Adding two inequalities we obtain

( | a | + | b | ) a + b | a | + | b | .

Let c = | a | + | b | and x = a + b . Because c x c , it follows from (1) that | x | c or

| x | = | a + b | | a | + | b | .

This is what we were trying to prove.

Example 2.

Show that

\bbox[8px, #E6F0FA, border: 3px solid #0066CC]{|a| - |b| \leq |a+b| \leq |a| + |b|.}
Solution

This result follows from the triangle inequality and the fact that | b | = | b | (Property 4). Using the triangle inequality, we have:

| a | = | ( a + b ) b | | a + b | + | b | = | a + b | + | b | .

By subtracting | b | from both sides of the inequality, we obtain:

| a | | b | | a + b | .

Combining the above inequality with the standard triangle inequality | a + b | | a | + | b | , we conclude that:

| a | | b | | a + b | | a | + | b | .
Example 3.

Prove that for all real number a and b , we have

| a b | | a | + | b |
Solution

This follows directly from the triangle inequality and the fact that | b | = | b | . Applying the triangle inequality to a + ( b ) , we get:

| a b | = | a + ( b ) | | a | + | b | = | a | + | b | .

Thus, | a b | | a | + | b | holds for all real numbers a and b .

Example 4.

Prove that for all real numbers a and b ,

| a | | b | | a b | .
Solution

We start by adding and subtracting b and then applying the triangle inequality. Specifically:

| a | = | ( a b ) + b | | a b | + | b | .

Subtracting | b | from both sides gives:

| a | | b | | a b | .

Thus, the inequality | a | | b | | a b | holds for all real numbers a and b .

It follows from (4) that

  1. | a b | = | b a |

Distance Between Points on the Real Line

Look at the following figure. The distance between 2 and 10 is 12 units. The distance can be calculated as the difference 10 ( 2 ) , which involves subtracting the smaller value from the larger one. However, since the absolute value of 10 ( 2 ) equals | 12 | = 12 , and similarly, | 2 10 | = | 12 | = 12 , we can use the absolute value function to find the distance between two points without worrying about which number is larger or smaller.

Illustration for Absolute Value and Distance
Definition 2.

If P and Q are two points located on a number line with coordinates a and b , the distance between P and Q , denoted by d ( P , Q ) , is calculated as:

d ( P , Q ) = | b a |

Since | b a | is the same as | a b | , it follows that the distance from P to Q is equal to the distance from Q to P :

d ( P , Q ) = d ( Q , P ) .

It follows from Equation (ii) that for any real number a and any positive number r ,

| x a | < r

is equivalent to

r < x a < r

or

a-r

This means that the distance of x from a is less than r if and only if x is between a r and a + r .

Illustration for Absolute Value and Distance
Example 5.

Find the set I , if it consists of all points whose distance from the point 2 is less than 0.6.

Solution

As discussed above

\begin{aligned} I & =\{x|\ |x-2|<0.6\} & =\{x|\ -0.6

This set is graphed in the following figure.

Illustration for Absolute Value and Distance
The set of all points whose distance from 2 is less than 0.6

Neighborhoods and Deleted Neighborhoods

Let I be the set of all points whose distance from a fixed point a is less than a number δ > 0 . Then

\begin{aligned} I & =\{x \mid |x-a|<\delta\}\\ & =\{x \mid -\delta0)\\ & =\{x \mid a-\delta

Such a set is called a neighborhood (or, more precisely, the δ -neighborhood) of a, and δ is called the radius of the neighborhood. The δ -neighborhood of a, which is often denoted by N δ ( a ) , is shown in the following figure.

Number line showing the δ-neighborhood of a: an open interval (a−δ, a+δ) centered at a, with radius δ marked on both sides and open circles at the endpoints.
The δ -neighborhood of a is the set of all points whose distance from a is less than δ > 0 . The radius of this neighborhood is δ .

Now let's consider the set of all points such that

0 < | x a | < δ

or

J = { x 0 < | x a | < δ }

Here we have two inequalities

0 < | x a | and | x a | < δ

Recall that the absolute value is always nonnegative (that is, 0 | t | for every t), so

0 < | x a |

means

| x a | 0

or equivalently

x a

[Here we used the fact that | t | = 0 if and only if t = 0 .] Therefore,

\begin{aligned} J & =\{x \mid 0<|x-a|<\delta\}\\ & =\{x \mid |x-a|<\delta \quad\text{and}\quad x\neq a\} \end{aligned}

That is, J is the δ -neighborhood of a with the center a removed. The set J is called a deleted neighborhood or punctured neighborhood of a. The deleted δ -neighborhood of a, which is often denoted by N δ ( a ) , is shown in the following figure. It is clear that N δ ( a ) = N δ ( a ) { a } .

Number line showing the deleted δ-neighborhood of a: the open interval (a−δ, a+δ) with an open circle at the center a, indicating that a itself is excluded.
The deleted δ -neighborhood of a is the δ -neighborhood of a with its center a removed.

Exercises

Exercise 1.

Find | 7 | , | 7 | , | 0 | , | 5 5 | and | 5 5 | . You may use 5 2.24 .

Answer

7 ,   7 ,   0 ,   5 5 ,   5 5

Solution

The definition splits into three cases according to the sign of the number inside the bars. So for each one, the first job is to decide whether the quantity inside is positive, zero, or negative.

| 7 | . The number 7 is positive, so the first line of the definition applies and | 7 | = 7 .

| 7 | . The number 7 is negative, so the third line applies: | x | = x when x < 0 . Here x = 7 , so

| 7 | = ( 7 ) = 7.

Do not be alarmed by the minus sign in the rule. Attaching a minus to a negative number produces a positive one, which is exactly what we want, since absolute values are never negative.

| 0 | . The middle line of the definition covers this directly: | 0 | = 0 .

| 5 5 | . We must decide the sign of 5 5 before choosing a line of the definition. Since 5 2.24 ,

5 5 5 2.24 = 2.76 ,

which is positive. So the first line applies and the bars simply come off:

| 5 5 | = 5 5 .

Leave the answer in this exact form. Replacing it by 2.76 would only be an approximation.

| 5 5 | . Now the two terms are the other way round, so

5 5 2.24 5 = 2.76 ,

which is negative. The third line applies:

| 5 5 | = ( 5 5 ) = 5 + 5 = 5 5 .

Notice that the last two answers came out the same. That is no accident: it is property 9 of this section, | a b | = | b a | . The bars measure a distance, and the distance between two numbers does not depend on which one you start from.

The habit to build here: never strip the bars off an expression until you know the sign of what is inside them.

Exercise 2.

Find the distance on the real line between the following pairs of points.

(a) 3 and 8    (b) 8 and 3    (c) 6 and 1

Answer

(a) 11    (b) 11    (c) 5

Solution

The definition in this section says that if P and Q have coordinates a and b , then

d ( P , Q ) = | b a | .

Subtract one coordinate from the other, then take the absolute value. Because of the bars, we never have to worry about which number is larger.

(a) From 3 to 8 . Take a = 3 and b = 8 :

d = | 8 ( 3 ) | = | 8 + 3 | = | 11 | = 11.

Watch the double negative: subtracting 3 is adding 3 . Dropping that step and writing | 8 3 | = 5 is the commonest error in this exercise.

(b) From 8 to 3 . Now take a = 8 and b = 3 :

d = | 3 8 | = | 11 | = 11.

Here the quantity inside the bars came out negative, and the bars turned it positive. The answer matches part (a), as the section says it must: d ( P , Q ) = d ( Q , P ) . Distance does not depend on the direction of travel.

(c) From 6 to 1 . Take a = 6 and b = 1 :

d = | 1 ( 6 ) | = | 1 + 6 | = | 5 | = 5.

Check against the picture. Both points lie to the left of 0 . Counting along the number line from 6 to 5 , 4 , 3 , 2 , 1 takes five steps, so the distance is 5 . The formula agrees.

Exercise 3.

Take a = 6 and b = 2 . Verify properties 4, 5 and 6 of this section by computing both sides of each.

(a) | a | = | a |    (b) | a b | = | a | | b |    (c) | a b | = | a | | b |

Answer

(a) Both sides 6    (b) Both sides 12    (c) Both sides 3

Solution

To verify an identity we work out each side separately and only compare at the end. Never carry a result from one side into the other; that assumes what we are checking.

(a) | a | = | a | with a = 6 .

Left side. First find a . Since a = 6 , we get a = ( 6 ) = 6 . Then

| a | = | 6 | = 6.

Right side.

| a | = | 6 | = ( 6 ) = 6.

Both sides equal 6 , so the property holds here.

(b) | a b | = | a | | b | with a = 6 , b = 2 .

Left side. First multiply inside the bars: a b = ( 6 ) ( 2 ) = 12 , a negative number, so

| a b | = | 12 | = 12.

Right side. Take each absolute value first, then multiply:

| a | | b | = | 6 | | 2 | = 6 2 = 12.

Both sides equal 12 .

(c) | a b | = | a | | b | with a = 6 , b = 2 .

The property requires b 0 , and here b = 2 , so we are allowed to use it.

Left side. Divide inside the bars first: 6 2 = 3 , so

| a b | = | 3 | = 3.

Right side. Take absolute values first, then divide:

| a | | b | = 6 2 = 3.

Both sides equal 3 .

What these three checks show. Absolute value passes cleanly through multiplication and division: it makes no difference whether you take the bars first or last. It is important not to over-generalise from this. The same is not true for addition — property 8 gives only an inequality, | a + b | | a | + | b | , and with our numbers | a + b | = | 6 + 2 | = 4 while | a | + | b | = 8 , so the two really are different.

Exercise 4.

Rewrite each statement without absolute value bars, using property 7.

(a) | x | 4    (b) 3 | x |    (c) | x | = 9

Answer

(a) 4 x 4    (b) x 3 or 3 x    (c) x = 9 or x = 9

Solution

Each part is a direct use of one of the three statements in property 7. In all of them r must be positive, and here r is 4 , 3 and 9 in turn, so the property applies every time.

(a) | x | 4 . This matches form (i), | x | r , with r = 4 . The property says it is equivalent to r x r , so

4 x 4.

In words: x is within distance 4 of 0 , so it lies somewhere between 4 and 4 , endpoints allowed. Note this is a single statement squeezing x from both sides — both conditions hold at once.

(b) 3 | x | . This matches form (ii), r | x | , with r = 3 . The property says it is equivalent to x r or r x , so

x 3 or 3 x .

In words: x is at least 3 away from 0 , which can happen by being far to the right or far to the left. Here the two conditions are joined by or, and only one of them holds at a time.

Parts (a) and (b) are worth comparing carefully, because they are easy to confuse. A "less than" statement traps x between two numbers and gives one combined inequality; a "greater than" statement pushes x out to the two ends and gives two separate alternatives. Writing " 3 x 3 " for part (b) would be meaningless, since no number is both at least 3 and at most 3 .

(c) | x | = 9 . This matches form (iii), | x | = r , with r = 9 , which is equivalent to x = r or x = r :

x = 9 or x = 9.

Check: | 9 | = 9 and | 9 | = 9 , so both really do work. The second answer is the one students lose. Since the bars destroy the sign, two different numbers always give the same absolute value, apart from the single case r = 0 .

Exercise 5.

Find the set I of all points whose distance from 5 is less than 0.2 , writing your answer in the form { x   < x < } .

Answer

I = { x   4.8 < x < 5.2 }

Solution

Step 1: write the condition with absolute value. The distance from x to 5 is | x 5 | , by the distance definition of this section. Asking for that distance to be less than 0.2 gives

I = { x   | x 5 | < 0.2 } .

Step 2: remove the bars. Property 7, form (i), says | t | < r is equivalent to r < t < r when r > 0 . Here the quantity playing the role of t is x 5 , and r = 0.2 , which is positive. So

I = { x   0.2 < x 5 < 0.2 } .

Step 3: get x by itself. At the moment the middle of the inequality reads x 5 ; we want it to read x . Add 5 to all three parts. By property 3 of the previous section, adding the same number to both sides of an inequality preserves its direction, and here we apply that to each of the two inequalities packed into this statement:

0.2 + 5 < x 5 + 5 < 0.2 + 5 , 4.8 < x < 5.2 .

So

I = { x   4.8 < x < 5.2 } . TikZ figure

Check. The number 5.1 should belong: its distance from 5 is | 5.1 5 | = 0.1 , which is indeed less than 0.2 . And 5.1 does satisfy 4.8 < 5.1 < 5.2 . The number 5.4 should not belong: | 5.4 5 | = 0.4 , which is not less than 0.2 , and correctly 5.4 fails x < 5.2 .

A useful observation. The answer runs from 5 0.2 to 5 + 0.2 — the centre with the radius subtracted, then added. In the language of this section, I is the δ -neighbourhood of 5 with radius δ = 0.2 . Recognising this shape saves work: a set of the form | x a | < δ always stretches from a δ to a + δ .

Exercise 6.

Write "the set of all x whose distance from 3 is less than 2 " first using absolute value, then as an inequality with x alone in the middle.

Answer

{ x   | x + 3 | < 2 } = { x   5 < x < 1 }

Solution

Step 1: absolute value form. The distance between x and a point a is | x a | . Here the fixed point is a = 3 , so the distance is

| x ( 3 ) | .

Subtracting 3 is the same as adding 3 , so this simplifies to | x + 3 | . Requiring the distance to be less than 2 :

{ x   | x + 3 | < 2 } .

This is the step students most often get wrong. The formula has a minus sign built into it, so a negative centre produces a plus sign in the final expression. If you find | x 3 | appearing, you have used a = 3 instead of a = 3 .

Step 2: remove the bars. Property 7, form (i), with r = 2 , applied to the quantity x + 3 :

2 < x + 3 < 2.

Step 3: isolate x . Subtract 3 from all three parts, which preserves the directions of the inequalities:

2 3 < x + 3 3 < 2 3 , 5 < x < 1.

So the set is { x   5 < x < 1 } .

Check. Read the answer back as a picture. It should be the stretch of the line reaching 2 units either side of 3 . Going 2 to the left of 3 lands on 5 ; going 2 to the right lands on 1 . That matches.

Test a point too. Take x = 4 , which satisfies 5 < 4 < 1 . Its distance from 3 is | 4 ( 3 ) | = | 1 | = 1 , and 1 < 2 , so it does belong. Take x = 0 , which fails the inequality. Its distance from 3 is | 0 ( 3 ) | = 3 , and 3 is not less than 2 , so it correctly does not belong.

Exercise 7.

The set { x   1 < x < 9 } is a neighbourhood of some point. Find its centre a and its radius δ , and write the set in the form { x   | x a | < δ } .

Answer

a = 5 , δ = 4 ; the set is { x   | x 5 | < 4 } .

Solution

This runs the previous exercises backwards. There we were given the centre and radius and found the two endpoints; now we are given the endpoints and must recover the centre and radius.

Finding the centre. This section shows that a neighbourhood of a with radius δ runs from a δ to a + δ . So a sits exactly half way between the two endpoints. The point half way between 1 and 9 is found by averaging them:

a = 1 + 9 2 = 10 2 = 5.

Finding the radius. The radius is the distance from the centre to either endpoint. Using the distance formula of this section,

δ = | 9 5 | = 4 ,

and checking against the other endpoint gives the same value,

| 1 5 | = | 4 | = 4.

The two agree, which is a good sign that the centre was correctly placed. Had they disagreed, the centre would have been wrong.

An alternative route to the radius is to take half the total width:

δ = 9 1 2 = 8 2 = 4.

Writing the set. With a = 5 and δ = 4 ,

{ x   1 < x < 9 } = { x   | x 5 | < 4 } .

Check by going forwards again. Starting from | x 5 | < 4 and using property 7 form (i),

4 < x 5 < 4 ,

and adding 5 throughout,

1 < x < 9 ,

which is the set we began with. The two descriptions match.

Exercise 8.

A machine is meant to cut metal rods 50 cm long. A rod passes inspection if its length L differs from 50 cm by at most 0.3 cm.

(a) Write the passing condition using absolute value.   (b) Write it as an inequality on L with no bars.   (c) Does a rod of length 50.4 cm pass?

Answer

(a) | L 50 | 0.3    (b) 49.7 L 50.3    (c) No

Solution

(a) The phrase "differs from 50 by at most 0.3 " is a statement about how far L is from 50 , with no interest in whether the rod is too long or too short. That is precisely what absolute value is for: this section opens by saying we use it to measure how large a quantity is regardless of its sign.

The difference between L and 50 is L 50 , and its size is | L 50 | . "At most 0.3 " means this size is less than or equal to 0.3 :

| L 50 | 0.3 .

Using rather than < matters here — "at most" allows the value 0.3 itself.

(b) Apply property 7, form (i), with r = 0.3 , to the quantity L 50 :

0.3 L 50 0.3 .

Now add 50 to all three parts to leave L alone in the middle:

0.3 + 50 L 0.3 + 50 , 49.7 L 50.3 .

So a rod passes exactly when its length is between 49.7 cm and 50.3 cm, both endpoints allowed.

(c) Test L = 50.4 against either form.

Using (a):

| 50.4 50 | = | 0.4 | = 0.4 ,

and 0.4 0.3 is false, so the rod fails.

Using (b): the condition needs L 50.3 , but 50.4 > 50.3 . Again it fails.

Both forms agree, as they must. The rod is 0.4 cm too long, which exceeds the allowance of 0.3 cm, so it is rejected.

Notice how naturally the absolute value handles this problem. Without it we would have to write two separate conditions — one forbidding rods that are too long and one forbidding rods that are too short — and remember to check both.

Exercise 9.

Describe the set J = { x   0 < | x 4 | < 1 } in words, and write it without absolute value bars.

Answer

All x with 3 < x < 5 except x = 4 . It is the deleted 1 -neighbourhood of 4 .

Solution

There are two inequalities packed into this statement, and they must be handled separately:

0 < | x 4 | and | x 4 | < 1.

The right-hand condition, | x 4 | < 1 . By property 7 form (i) with r = 1 ,

1 < x 4 < 1 ,

and adding 4 throughout,

3 < x < 5.

This says x lies within distance 1 of the point 4 .

The left-hand condition, 0 < | x 4 | . Recall that an absolute value is never negative, so | x 4 | is always at least 0 . Saying it is strictly greater than 0 therefore rules out one single possibility, namely that it equals 0 :

| x 4 | 0.

Property 2 of this section says | t | = 0 if and only if t = 0 . So | x 4 | 0 is the same as x 4 0 , that is,

x 4.

Putting them together. Both conditions must hold at once, so

J = { x   3 < x < 5    and    x 4 } .

In words: J consists of every point whose distance from 4 is less than 1 , apart from the point 4 itself.

This is what the section calls a deleted (or punctured) neighbourhood: the 1 -neighbourhood of 4 with its own centre removed. The hole in the middle is created entirely by the innocent-looking 0 < on the left.

TikZ figure

Check with sample points. Take x = 3.5 : then | 3.5 4 | = 0.5 , and 0 < 0.5 < 1 holds, so 3.5 J . Take x = 4 : then | 4 4 | = 0 , and 0 < 0 is false, so 4 J — the centre really is excluded. Take x = 6 : then | 6 4 | = 2 , and 2 < 1 is false, so 6 J .

Exercise 10.

Property 8 says | a + b | | a | + | b | . Work out both sides for the following pairs and say in each case whether the two sides are equal or whether the inequality is strict.

(a) a = 3 , b = 5    (b) a = 3 , b = 5    (c) a = 3 , b = 5

Answer

(a) 8 = 8 , equal    (b) 2 < 8 , strict    (c) 8 = 8 , equal

Solution

In each part, work out the left side by adding first and taking bars second, and the right side by taking bars first and adding second. The order is what makes the difference.

(a) a = 3 , b = 5 .

| a + b | = | 3 + 5 | = | 8 | = 8 , | a | + | b | = | 3 | + | 5 | = 3 + 5 = 8.

The two sides are equal.

(b) a = 3 , b = 5 .

| a + b | = | 3 + ( 5 ) | = | 2 | = 2 , | a | + | b | = | 3 | + | 5 | = 3 + 5 = 8.

Here 2 < 8 , so the inequality is strict — the two sides genuinely differ.

(c) a = 3 , b = 5 .

| a + b | = | 3 + ( 5 ) | = | 8 | = 8 , | a | + | b | = | 3 | + | 5 | = 3 + 5 = 8.

The two sides are equal again.

Reading the pattern. In (a) both numbers were positive and in (c) both were negative; in each of those cases the sides matched. In (b) the numbers had opposite signs, and the left side came out smaller. This is exactly the remark made in this section: equality holds when a and b are both positive, both negative, or at least one is zero, and the inequality is strict when they have opposite signs.

Why this happens. When the two numbers point the same way, adding them piles their sizes together, so the size of the sum is the sum of the sizes. When they point opposite ways, they partly cancel — in (b) the 5 ate up the 3 and left only 2 — so the size of the sum falls short. Cancellation can never make the sum larger, which is why the relation is always and never > .

Exercise 11.

A student writes " | x 3 | = x 3 " and uses it for every value of x . Explain why this is wrong, give a value of x for which it fails, and state the values of x for which it is correct.

Answer

It fails whenever x < 3 ; for example x = 1 . It is correct exactly when x 3 .

Solution

What went wrong. The student has treated the bars as though they could always simply be erased. But the definition of absolute value has three cases, and which case applies depends on the sign of the quantity inside:

|t|=\begin{cases} t & \text{if }t>0\\ 0 & \text{if }t=0\\ -t & \text{if }t<0 \end{cases}

Here the quantity inside is t = x 3 , and its sign is not fixed — it changes as x changes. The student has assumed the first line applies always, when in fact it applies only for some values of x .

A value where it fails. Take x = 1 . Then

| x 3 | = | 1 3 | = | 2 | = 2 ,

while

x 3 = 1 3 = 2.

So the claim would say 2 = 2 , which is false. Notice the shape of the failure: the left side came out positive, as an absolute value must, while the right side was negative. An absolute value can never equal a negative number, so the student's rule is bound to break whenever x 3 is negative.

When it is correct. The first line of the definition applies when x 3 > 0 , and the middle line gives | x 3 | = 0 = x 3 when x 3 = 0 . Combining these two, the equation | x 3 | = x 3 holds exactly when

x 3 0 ,

that is, adding 3 to both sides,

x 3.

What happens otherwise. When x < 3 , the quantity x 3 is negative and the third line applies:

| x 3 | = ( x 3 ) = 3 x .

Check this with x = 1 : it gives 3 1 = 2 , matching the correct value found above.

So the full description is

|x-3|=\begin{cases} x-3 & \text{if }x\geq 3\\ 3-x & \text{if }x<3 \end{cases}

The habit worth forming: before removing absolute value bars from an expression containing a letter, decide the sign of what is inside, and if it can go either way, split into cases.

Exercise 12.

Is the statement | a b | = | a | | b | always true, sometimes true, or never true? Justify your answer.

Answer

Sometimes true.

Solution

The answer is sometimes. We produce one pair of numbers where it holds and one where it fails.

A case where it holds. Take a = 5 and b = 3 .

| a b | = | 5 3 | = | 2 | = 2 , | a | | b | = | 5 | | 3 | = 5 3 = 2.

The two sides agree.

A case where it fails. Swap the numbers: take a = 3 and b = 5 .

| a b | = | 3 5 | = | 2 | = 2 , | a | | b | = | 3 | | 5 | = 3 5 = 2.

Now the left side is 2 and the right side is 2 , so the statement is false here.

Since both outcomes occur, the statement is sometimes true.

Why it must fail in general. The left side, being an absolute value, is never negative — that is property 1. The right side, | a | | b | , is perfectly free to be negative, and will be whenever | b | > | a | . In any such case the two sides cannot possibly be equal. This gives a quick way to see the statement is not always true, without hunting for a counterexample.

What is true instead. This section proves the correct relation, and it is an inequality rather than an equation:

| a | | b | | a b | .

Our two examples fit it: in the first, 2 2 ; in the second, 2 2 . The general lesson is that absolute value passes cleanly through multiplication and division, as properties 5 and 6 record, but through addition and subtraction it gives only inequalities.

Exercise 13.

Using the definition of absolute value, prove that | a | = | a | for every real number a .

Solution

The definition splits into three cases according to the sign of the number whose absolute value is being taken. Since we must handle both | a | and | a | , the clean approach is to split on the sign of a and work out both quantities in each case. There are three cases and we must cover all of them.

Case 1: a > 0 .

The right side. Since a is positive, the first line of the definition gives

| a | = a .

The left side. If a is positive then a is negative, so the third line of the definition applies to a . That line says | t | = t when t < 0 ; using it with t = a ,

| a | = ( a ) = a .

Both sides equal a , so they are equal.

Case 2: a = 0 .

Then a = 0 = 0 as well. The middle line of the definition applies to both:

| a | = | 0 | = 0 , | a | = | 0 | = 0.

Both sides equal 0 .

Case 3: a < 0 .

The right side. Since a is negative, the third line applies:

| a | = a .

The left side. If a is negative then a is positive, so the first line applies to a :

| a | = a .

Both sides equal a , so they are equal.

Conclusion. Every real number falls into exactly one of the three cases, and in each case we found | a | = | a | . Therefore the identity holds for every real number a .

Two remarks. First, in Case 3 the expression a is a positive number, because a itself is negative. A minus sign in front of a letter does not mean the quantity is negative; it means the opposite of whatever the letter stands for. Confusing these is the main difficulty in a proof like this one.

Second, the result is obvious from the geometric reading given in this section: | a | is the distance of a from 0 , and a and a sit on opposite sides of 0 at the same distance from it. The case-by-case argument above is that picture turned into a proof.

Exercise 14.

Let a , b and c be any real numbers. Use the triangle inequality to prove that

| a b | | a c | + | c b | .

Then explain what the result says about distances on the number line.

Solution

The proof. The triangle inequality, property 8, says

| u + v | | u | + | v |

for all real numbers u and v . To use it we must write a b as a sum of two pieces.

The trick — the same one used in the worked examples of this section — is to subtract and add the same quantity, which changes nothing:

a b = a c + c b .

Check that this is correct by simplifying the right side: the c and + c cancel, leaving a b . Since we have added zero in disguise, the two sides really are equal.

Now group the right side into two pieces:

a b = ( a c ) + ( c b ) .

Take absolute values of both sides. Since the two quantities are equal, their absolute values are equal:

| a b | = | ( a c ) + ( c b ) | .

Apply the triangle inequality with u = a c and v = c b :

| ( a c ) + ( c b ) | | a c | + | c b | .

Combining the last two lines,

| a b | | a c | + | c b | ,

which is what we wanted.

What it says about distances. By the distance definition of this section, | a b | is the distance from a to b , | a c | is the distance from a to c , and | c b | is the distance from c to b . So the result reads:

the direct distance from a to b is never more than the distance from a to b by way of c .

In other words, making a detour through some third point c can never shorten the journey. This is why property 8 carries the name triangle inequality: in a triangle, one side is never longer than the other two put together.

TikZ figure

A numerical check. Take a = 1 , b = 7 , c = 3 . The left side is | 1 7 | = 6 . The right side is | 1 3 | + | 3 7 | = 2 + 4 = 6 . Here the detour costs nothing, because c lies between a and b and the two sides are equal.

Now move the detour point off to one side, taking c = 10 . The left side is still 6 , while the right side is | 1 10 | + | 10 7 | = 9 + 3 = 12 . The detour now costs double, and 6 12 holds comfortably.

Frequently Asked Questions

What does absolute value actually mean?

The absolute value | x | is the distance from x to the origin on the number line, measured without regard to direction. That is why it is never negative: a distance of 3 makes no sense. So | 5 | = 5 and | 5 | = 5 , since both numbers sit five units away from 0 , one to the right and one to the left.


Why does the definition say | x | = x when x < 0 ? Isn't x negative?

No, and this is the single most common misreading of the definition. The symbol x means "the opposite of x ", not "a negative number". When x is already negative, its opposite is positive. For example, if x = 7 then x = ( 7 ) = 7 , so the rule gives | 7 | = 7 , exactly as expected. The minus sign is doing the job of removing the sign, not adding one.


How do I solve an equation or inequality containing an absolute value?

Translate it into a statement with no bars, using the three equivalences from the list above. For r > 0 :

  • | x | = r becomes x = r or x = r , giving two cases.
  • | x | r becomes the single double inequality r x r , an interval.
  • | x | r becomes x r or x r , two separate pieces.
For an expression rather than a bare x , apply the same rule to the whole expression. From | 2 x 1 | 5 you get 5 2 x 1 5 , then 2 x 3 .

Why is | x | r one interval while | x | r is two pieces?

Read both as statements about distance from 0 . Being close to the origin, within r , traps a point between r and r , so the solution is the single stretch [ r , r ] . Being far from the origin, at least r away, can be achieved in two independent ways, far to the left or far to the right, and those two regions never meet. This is why "or" appears in one case and "and" in the other.


What is the triangle inequality, and when is it an equality?

It states | a + b | | a | + | b | : the size of a sum never exceeds the sum of the sizes. Equality holds exactly when a and b point the same way, that is when both are positive, both are negative, or at least one is zero. When the signs are opposite there is cancellation and the inequality is strict, as in | 3 + ( 5 ) | = 2 against | 3 | + | 5 | = 8 . The name comes from geometry: a direct trip is never longer than a detour through a third point.


How do I find the distance between two points on a number line?

Take the absolute value of their difference: d ( P , Q ) = | b a | , where a and b are the coordinates. The absolute value makes the order irrelevant, so you never have to check which point is farther right. The distance between 2 and 10 is | 10 ( 2 ) | = 12 , and computing it the other way gives | 2 10 | = | 12 | = 12 , the same answer. In symbols, d ( P , Q ) = d ( Q , P ) .


How should I read | x a | < δ ?

Read it as " x is within δ of a ". Rewriting it as a δ < x < a + δ shows the same thing as an interval centered at a with radius δ . This set is the δ -neighborhood of a , written N δ ( a ) , and it is the standard way of saying "close to a " in the definitions of limit and continuity.


What is a deleted neighborhood, and why is the extra 0 < needed?

A deleted (or punctured) neighborhood N δ ( a ) is the set 0 < | x a | < δ , that is N δ ( a ) with its center removed. Since | t | = 0 only when t = 0 , the condition 0 < | x a | says precisely that x a . The exclusion matters for limits: the limit of a function as x approaches a depends on the values near a but deliberately ignores the value at a itself, which may be different or may not exist at all.