See How Things Work

Absolute value

Unit
Integers
Part
1. Negative Numbers
Lesson
1.4

The absolute value of an integer is its distance from 0 on the number line: the number of unit steps between its point and the origin, written |a|. This lesson defines it, proves the rule that |a| is a or −a, derives its basic properties, and uses absolute value bars in expressions.

Distance from zero

This lesson relies on the integers and the negative sign (lesson 1.1), the integer number line and its unit steps (lesson 1.2), and opposites and the notation −a (lesson 1.3). Its third section uses grouping symbols and the order of operations (Order of Operations 1.2 and 1.3).

Opposites such as 5 and −5 lie at the same distance from 0 on the number line⁠[1]: both are 5 unit steps from the origin. This distance, which forgets the direction, has a name.

Definition (Absolute value).

The absolute value of an integer a is the distance between 0 and a on the number line⁠[2][3]: the number of unit steps between the origin and the point of a. It is written with two vertical lines on either side, |a|, and read “the absolute value of a”.⁠[4]

Distance is measured here as on the line of the whole numbers: by counting unit steps, as in “how far apart” in Subtraction 1.3. The next theorem turns the definition into a rule.

−6−5−4−3−2−10123456origin|−5| = 5|3| = 3
Figure. The point of −5 is 5 unit steps to the left of the origin, so |−5| = 5; the point of 3 is 3 unit steps to the right, so |3| = 3. The absolute value counts the steps and ignores their direction.
Theorem 1.

For every integer a:

  1. if a is positive or zero, then |a| = a;
  2. if a is negative, then |a| = −a.

In particular, |n| = n and |−n| = n for every counting number n, and |0| = 0.

Proof.

(1) If a = 0, its point is the origin, and no step lies between them: |0| = 0. If a is a counting number n, its point is reached from the origin by exactly n unit steps to the right (The Number Line 1.1), so |n| = n.

(2) If a is negative, a = −n for a counting number n, and its point is reached from the origin by exactly n unit steps to the left (lesson 1.2, Proposition 1). So |a| = n. By Theorem 2 of lesson 1.3, −a = −(−n) = n. So |a| = n = −a.

Textbooks state the same rule in this form: |a| equals a when a ≥ 0 and equals −a when a ≤ 0.⁠[5] For a = 0 the two cases agree, since −0 = 0. The comparison signs ≤ and ≥ between integers are defined in lesson 1.5; here “a ≥ 0” means “a is positive or zero”.

Example (Four absolute values).

Find |6|, |−6|, |0| and |−125|.

  1. 6 is positive, so |6| = 6: its point is 6 steps to the right of the origin.
  2. −6 is negative, so |−6| = −(−6) = 6: its point is 6 steps to the left.
  3. |0| = 0: the origin is no step from itself.
  4. −125 is negative, so |−125| = −(−125) = 125.

Answer: 6, 6, 0 and 125.

Example (A mistake: “the absolute value makes a number positive”).

Someone says that the absolute value of every integer is positive. Is that right?

  1. For a positive or negative integer it is: |7| = 7 and |−7| = 7 are positive.
  2. But |0| = 0, and 0 is not positive (lesson 1.1).
  3. What is true is weaker: an absolute value is never negative. It is positive for every integer other than 0.

Answer: no. |0| = 0. The correct statement is that |a| is positive or zero.

Properties of absolute value

Proposition 2.

For every integer a:

  1. |a| is a whole number; it is never negative;
  2. |a| = 0 exactly when a = 0;
  3. |−a| = |a|: opposites have the same absolute value.
Proof.

(1) |a| counts unit steps, so it is a whole number, and whole numbers are not negative. Distance is never negative.⁠[6]

(2) If a = 0, then |a| = 0. If a is not 0, its point is not the origin, so at least one step lies between them: |a| ≥ 1.

(3) By the definition of opposites (lesson 1.3), the points of a and −a are the same number of unit steps from the origin, on opposite sides. So |−a| = |a|.

Going the other way, from a distance to the integers at that distance, gives the following.

Proposition 3.

Let d be a whole number.

  1. If d is a counting number, exactly two integers have absolute value d: d and −d.
  2. If d = 0, exactly one integer has absolute value d: 0.

No integer has a negative absolute value.

Proof.

Let x be an integer with |x| = d. If x is positive or zero, Theorem 1 gives x = |x| = d. If x is negative, Theorem 1 gives −x = |x| = d, so x = −(−x) = −d by Theorem 2 of lesson 1.3. So x is d or −d.

Conversely, |d| = d and |−d| = |d| = d, by Theorem 1 and Proposition 2. When d is a counting number, d and −d are different (lesson 1.3, Proposition 3), so there are two solutions; when d = 0 they are the same integer, 0. The last statement is Proposition 2 (1).

For example, |x| = 1 holds for x = 1 and x = −1 and for no other integer.⁠[7]

−6−5−4−3−2−101234564 steps4 steps
Figure. Exactly two integers lie 4 unit steps from the origin: 4 and its opposite −4. So the integers x with |x| = 4 are −4 and 4.
Corollary .

For integers a and b, |a| = |b| exactly when a = b or a = −b.

Proof.

If a = b, then |a| = |b|; if a = −b, then |a| = |−b| = |b| by Proposition 2. Conversely, suppose |a| = |b|, and call this whole number d. By Proposition 3 both a and b are d or −d. If they are the same one, a = b. If not, one is d and the other −d, and then a = −b.

Example (Solving |x| = 7, |x| = 0 and |x| = −3).
  1. |x| = 7: by Proposition 3 (1), x = 7 or x = −7. Check: |7| = 7 and |−7| = 7.
  2. |x| = 0: by Proposition 3 (2), x = 0 only.
  3. |x| = −3: an absolute value is never negative, so no integer x works.

Answer: 7 and −7; 0; no solution.

Example (A mistake: forgetting the negative solution).

Someone solves |x| = 5 and answers x = 5. What is missing?

  1. x = 5 is a solution: |5| = 5.
  2. But the point of −5 is also 5 steps from the origin, on the other side: |−5| = 5.
  3. By Proposition 3 there are exactly two solutions.

Answer: x = 5 or x = −5.

Example (Counting integers near zero).

Which integers x satisfy |x| ≤ 3? How many are there?

  1. |x| is a whole number, so |x| ≤ 3 means that |x| is 0, 1, 2 or 3 (comparing whole numbers as in The Number Line 1.2).
  2. By Proposition 3: |x| = 0 gives 0; |x| = 1 gives −1 and 1; |x| = 2 gives −2 and 2; |x| = 3 gives −3 and 3.
  3. Counting them: 1 + 2 + 2 + 2 = 7.

Answer: −3, −2, −1, 0, 1, 2, 3: seven integers, the points from 3 steps left to 3 steps right of the origin.

Absolute value in expressions

In an expression, absolute value bars act like grouping symbols: first simplify inside the bars as much as possible, then take the absolute value of the result, and then continue with the operations outside the bars.⁠[8] They are treated just like parentheses in the order of operations.⁠[9]

Example (Working inside the bars first).

Find (a) |13 − 5|; (b) 3 × |−4|; (c) |9 + 6| − |4 + 3|.

  1. (a) Inside first: 13 − 5 = 8. Then |8| = 8.
  2. (b) The bars first: |−4| = 4. Then 3 × 4 = 12.
  3. (c) Inside each pair of bars: 9 + 6 = 15 and 4 + 3 = 7. Then |15| = 15 and |7| = 7, and 15 − 7 = 8.

Answer: 8, 12 and 8.

Example (Where the sign stands).

Find −|−5|, −(−5) and |−(−5)|.

  1. −|−5|: the bars first, |−5| = 5; then the sign outside takes the opposite: −5.
  2. −(−5): the opposite of −5, which is 5 (lesson 1.3, Theorem 2).
  3. |−(−5)|: inside first, −(−5) = 5; then |5| = 5.

Answer: −5, 5 and 5. Only the first result is negative: there the negative sign stands outside the absolute value bars.⁠[10]

Example (A mistake: dropping the bars too early).

Someone works out 12 − |3 + 4| as 12 − 3 + 4 = 13. What is wrong?

  1. The bars group 3 + 4, as parentheses would. Removing them changes which operation is done first.
  2. Inside first: 3 + 4 = 7, and |7| = 7.
  3. Then 12 − 7 = 5.

Answer: 12 − |3 + 4| = 5, not 13.

Looking ahead.

Inside the bars this lesson uses only expressions it can already evaluate. An expression such as |3 − 8| needs the subtraction of integers, which comes in the lesson Subtraction as adding the opposite.

Game

Distance from zero

Round
1
Score
0
Streak
0

What is the absolute value of the marked integer, |−8|? Neighboring marks are 2 units apart.

−10010

Size without direction

When an integer describes a quantity measured from a zero level, its absolute value is the size of the quantity, and its sign is the direction. A balance of −40 dollars belongs to an account overdrawn by 40 dollars⁠[11]: the account owes |−40| = 40 dollars. A depth of −200 meters is 200 meters below the surface.

Example (Which account owes more?).

One account has a balance of −35 dollars, another a balance of −53 dollars. Which one owes the bank more?

  1. The amounts owed are the sizes of the balances: |−35| = 35 and |−53| = 53.
  2. Compare the whole numbers 35 and 53: both have two digits, and in the tens place 3 < 5, so 35 < 53 (The Number Line 1.2).

Answer: the account with balance −53 dollars owes more, 53 dollars against 35. How the integers −53 and −35 themselves compare is the subject of lesson 1.5, Comparing and ordering integers.

Exercises

Exercise .

Find (a) |−17|; (b) |17|; (c) |0|; (d) −|−4|; (e) |−(−9)|; (f) −|9|.

▸ Show solution

(a) 17. (b) 17. (c) 0. (d) The bars first: |−4| = 4, then the opposite: −4. (e) Inside first: −(−9) = 9, and |9| = 9. (f) |9| = 9, then the opposite: −9.

Exercise .

Find every integer x with (a) |x| = 12; (b) |x| = 0; (c) |x| = −2.

▸ Show solution

(a) x = 12 or x = −12, by Proposition 3 (1). (b) x = 0 only, by Proposition 3 (2). (c) No integer: an absolute value is never negative.

Exercise .

Evaluate (a) |12 − 4 × 2| + |−3|; (b) 2 × |−6| − |10 − 7|.

▸ Show solution

(a) Inside the bars, the order of operations does the multiplication first: 4 × 2 = 8, then 12 − 8 = 4. So |12 − 4 × 2| = |4| = 4. Also |−3| = 3. In all, 4 + 3 = 7.

(b) |−6| = 6 and 2 × 6 = 12; inside the second bars, 10 − 7 = 3 and |3| = 3. Then 12 − 3 = 9.

Exercise .

Three places have elevations of −120 meters, 85 meters and −95 meters. Which is farthest from sea level, and which is nearest?

▸ Show solution

The amounts are |−120| = 120 meters, |85| = 85 meters and |−95| = 95 meters. The largest is 120: the point 120 meters below sea level is farthest from sea level. The smallest is 85: the hilltop 85 meters above sea level is nearest to it.

Exercise .

Let d be a whole number. Prove that exactly 2d + 1 integers x satisfy |x| ≤ d.

▸ Show solution

|x| is a whole number, so |x| ≤ d means |x| = k for one of k = 0, 1, …, d. By Proposition 3, k = 0 gives one integer and each of the d counting numbers k = 1, …, d gives two. Different k give different integers, since an integer has only one absolute value.

In all, 1 + 2d integers: −d, …, −1, 0, 1, …, d. For d = 3 this is the 7 of the example in the lesson.

Exercise .

Prove that |a| = a exactly when a is positive or zero, and that |a| = −a exactly when a is negative or zero. For which integers do both hold?

▸ Show solution

If a is positive or zero, |a| = a by Theorem 1. Conversely, if |a| = a, then a is a whole number (Proposition 2), so a is positive or zero.

If a is negative or zero, |a| = −a: for negative a this is Theorem 1, and for a = 0 both sides are 0. Conversely, if |a| = −a, then −a is positive or zero, so a is negative or zero (lesson 1.3, Proposition 3).

So both equalities hold exactly when a is positive or zero and also negative or zero, that is, when a = 0.

Summary

  1. The absolute value |a| of an integer a is its distance from 0: the number of unit steps between its point and the origin.
  2. |a| = a when a is positive or zero, and |a| = −a when a is negative; so |n| = |−n| = n and |0| = 0.
  3. |a| is never negative, |a| = 0 only for a = 0, and |−a| = |a|.
  4. For a counting number d, |x| = d has exactly two solutions, d and −d; |x| = 0 has one; |x| = −d has none.
  5. Absolute value bars act like parentheses: work inside first, then take the absolute value; a sign in front of the bars, as in −|−5| = −5, then takes the opposite.
  6. For a quantity measured from a zero level, the absolute value is its size without direction.

Sources

  1. 1.
    Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Prealgebra (2nd ed., OpenStax, Rice University, 2020).
    Chapter 3, “Integers”, section 3.1, “Introduction to Integers” (“Simplify Expressions with Absolute Value”), p. 178 (the whole topic: pp. 178–182).
    “are opposites because they are the same distance from”
    Used for: opposites such as 5 and −5 lie at the same distance from 0 on the number line (the book’s example: “They are both five units from 0”).
  2. 2.
    Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Prealgebra (2nd ed., OpenStax, Rice University, 2020).
    Chapter 3, “Integers”, section 3.1, “Introduction to Integers” (“Simplify Expressions with Absolute Value”), p. 178 (the whole topic: pp. 178–182).
    “and any number on the number line is called the absolute value of that number.”
    Used for: the distance between 0 and a number on the number line is called the absolute value of that number.
  3. 3.
    Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Prealgebra (2nd ed., OpenStax, Rice University, 2020).
    Chapter 3, “Integers”, section 3.1, “Introduction to Integers” (“Simplify Expressions with Absolute Value”), p. 178 (the whole topic: pp. 178–182).
    “The absolute value of a number is its distance from”
    Used for: the definition: the absolute value of a number is its distance from 0 on the number line.
  4. 4.
    Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Prealgebra (2nd ed., OpenStax, Rice University, 2020).
    Chapter 3, “Integers”, section 3.1, “Introduction to Integers” (“Simplify Expressions with Absolute Value”), p. 178 (the whole topic: pp. 178–182).
    “The symbol for absolute value is two vertical lines on either side of a number.”
    Used for: the absolute value of a is written with two vertical lines on either side, |a|.
  5. 5.
    Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).
    Chapter 1, “The Foundations: Logic and Proofs”, section 1.8, “Proof Methods and Strategy” (1.8.2, “Exhaustive Proof and Proof by Cases”, Example 4), p. 98 (the whole topic: pp. 97–100).
    “Recall that |a|, the absolute value of a, equals a when a ≥ 0 and equals −a when a ≤ 0.”
    Used for: Theorem 1, the rule |a| = a when a ≥ 0 and |a| = −a when a ≤ 0 (in the book for real numbers, which include the integers).
  6. 6.
    Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Prealgebra (2nd ed., OpenStax, Rice University, 2020).
    Chapter 3, “Integers”, section 3.1, “Introduction to Integers” (“Simplify Expressions with Absolute Value”), p. 178 (the whole topic: pp. 178–182).
    “Because distance is never negative, the absolute value of any number is never negative.”
    Used for: distance is never negative, so an absolute value is never negative.
  7. 7.
    Kenneth H. Rosen, Discrete Mathematics and Its Applications (8th ed., McGraw-Hill, 2019).
    Chapter 2, “Basic Structures: Sets, Functions, Sequences, Sums, and Matrices”, section 2.1, “Sets” (2.1.8, “Truth Sets and Quantifiers”, Example 23), p. 131 (the whole topic: pp. 131).
    “Because |x| = 1 when x = 1 or x = −1, and for no other integers x, we see that the truth set of P is the set {−1, 1}.”
    Used for: |x| = 1 holds for x = 1 and x = −1 and for no other integer.
  8. 8.
    Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Prealgebra (2nd ed., OpenStax, Rice University, 2020).
    Chapter 3, “Integers”, section 3.1, “Introduction to Integers” (“Simplify Expressions with Absolute Value”), p. 181 (the whole topic: pp. 178–182).
    “Absolute value bars act like grouping symbols. First simplify inside the absolute value bars as much as possible. Then take the absolute value of the resulting number, and continue with any operations outside the absolute value symbols.”
    Used for: absolute value bars act like grouping symbols: simplify inside first, then take the absolute value, then continue with the operations outside.
  9. 9.
    Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Prealgebra (2nd ed., OpenStax, Rice University, 2020).
    Chapter 3, “Integers”, section 3.1, “Introduction to Integers” (“Simplify Expressions with Absolute Value”), p. 179 (the whole topic: pp. 178–182).
    “We treat absolute value bars just like we treat parentheses in the order of operations. We simplify the expression inside first.”
    Used for: absolute value bars are treated like parentheses in the order of operations.
  10. 10.
    Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Prealgebra (2nd ed., OpenStax, Rice University, 2020).
    Chapter 3, “Integers”, section 3.1, “Introduction to Integers” (“Simplify Expressions with Absolute Value”), p. 180 (the whole topic: pp. 178–182).
    “Notice that the result is negative only when there is a negative sign outside the absolute value symbol.”
    Used for: a result is negative only when a negative sign stands outside the absolute value bars.
  11. 11.
    Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis, Prealgebra (2nd ed., OpenStax, Rice University, 2020).
    Chapter 3, “Integers”, section 3.1, “Introduction to Integers” (“Translate Word Phrases into Expressions with Integers”, Example 3.13), p. 183 (the whole topic: pp. 182–183).
    “Overdrawn tells us that 40 is a negative number.”
    Used for: an account overdrawn by 40 dollars has a balance of −40 dollars.