See How Things Work

Subtraction within the whole numbers: when it is defined

Unit
Subtraction
Part
1. Subtraction
Lesson
1.4

Among the whole numbers, a − b has a value only when b ≤ a. This lesson proves that condition in four equivalent forms, shows that the whole numbers are closed under addition but not under subtraction, works through the special cases with 0 and 1 and with several subtractions in a row, and explains why 3 − 5 is neither 2 nor 0.

When a − b has a value

The three lessons before this one described a − b in three ways: as what is left when b members are taken away from a collection with a members (lesson 1.1), as the whole number that must be added to b to make a (lesson 1.2), and as the point reached by b unit steps to the left from a (lesson 1.3). Each description needed the condition b ≤ a. The next theorem shows that the condition is exactly right for all of them.

Theorem 1.

For whole numbers a and b, the following four statements are equivalent: if one of them is true, all are.

  1. A collection with a members has a part with b members.
  2. b ≤ a.
  3. Some whole number c satisfies c + b = a.
  4. From the point of a, b unit steps to the left can be taken.

When they are true, a − b is a whole number: the number left in (1), the one number c of (3), and the point where the steps of (4) end. When they are false, no whole number is a − b.

Proof.

(1) and (2) are equivalent by the Proposition of lesson 1.1.

(2) implies (3), with c = a − b, by Theorem 1 of lesson 1.2; and (3) implies (2) by Theorem 2 of lesson 1.2, which also shows that c is a − b.

(2) implies (4) by Theorem 1 of lesson 1.3, where the steps end at a − b. Conversely, suppose b unit steps to the left can be taken from a, ending at a point p. Each step to the left goes from a number to its predecessor, so the same steps, walked to the right, lead from p to a: b unit steps to the right from p end at a. By Addition 1.2, p + b = a, which is (3).

Finally, if the statements are false, there is no part to take away, no number to add and no point to land on: the definitions of lesson 1.1 give no value to a − b, and by (3) no whole number c could be a − b, because any such c would satisfy c + b = a.

Definition (Defined, not defined).

For whole numbers a and b, the difference a − b is defined in the whole numbers when b ≤ a. When b > a, a − b is not defined in the whole numbers: there is no whole number that it could name.

This is what is meant by saying that subtraction cannot be done without restriction in the natural numbers.⁠[1] The equivalence of (2) and (3) is also how advanced texts define the order of the natural numbers: b ≤ a when there is a natural number that, added to b, gives a.⁠[2]

012345678123
Figure. An attempt to find 3 − 5: from 3 (ring), steps 1 to 3 land on 2, 1, 0. Step 4 would have to start at 0, and 0 has no predecessor (✕). The 5 steps cannot all be taken, so 3 − 5 has no point on the line of the whole numbers.
Example (Two orders, two answers).

Decide whether 52 − 25 and 25 − 52 are defined, and find the value of the one that is.

  1. Compare 25 and 52: both have two digits, and in the tens place 2 < 5, so 25 < 52 (The Number Line, lesson 1.2).
  2. 52 − 25: the subtrahend 25 is at most the minuend 52, so it is defined.
  3. Count up from 25 to 52 (lesson 1.3): 25 to 30 is 5, 30 to 50 is 20, 50 to 52 is 2. In all 27. Check: 27 + 25 = 52.
  4. 25 − 52: the subtrahend 52 is greater than the minuend 25, so it is not defined in the whole numbers.

Answer: 52 − 25 = 27; 25 − 52 is not defined in the whole numbers.

Example (A mistake: 3 − 5 = 2, or 3 − 5 = 0).

One person says that 3 − 5 = 2; another says that 3 − 5 = 0. Who is right?

  1. By Theorem 1, 3 − 5 = 2 would require 2 + 5 = 3. But 2 + 5 = 7. The first person computed 5 − 3, the numbers in the other order.
  2. 3 − 5 = 0 would require 0 + 5 = 3. But 0 + 5 = 5. Taking away the 3 members that exist is 3 − 3, not 3 − 5.
  3. In fact no whole number c works: c + 5 is at least 5, which is greater than 3 (Addition 1.2: a sum is never less than an addend).

Answer: neither. 5 > 3, so 3 − 5 is not defined in the whole numbers.

Caution.

This is a fact about the whole numbers, not a rule of all mathematics. It is not true in general that a larger number cannot be subtracted from a smaller one: in the integers, 3 − 5 has a value. What is true is that no whole number is 3 − 5.

Convention.

Some books on computation define a different operation, the modified difference, written with a dotted minus sign: x ∸ y is x − y if x ≥ y, and 0 by convention otherwise.⁠[3] So 3 ∸ 5 = 0. This is a convention that defines a new operation; it does not give 3 − 5 a value. The modified difference does not undo addition: 3 ∸ 5 = 0, but 0 + 5 is not 3.

Game

Defined or not?

Round
1
Score
0
Streak
0

What is 5 − 9 among the whole numbers?

01234567891011121314151617181920

Closed and not closed

Adding two whole numbers always gives a whole number; subtracting does not always. There is a name for this difference.

Definition (Closed under an operation).

A collection of numbers is closed under an operation if, whenever the operation is applied to two of its members (the same member twice, or two different ones), the result exists and is again a member of the collection.⁠[4]

Proposition .
  1. The whole numbers are closed under addition.
  2. The whole numbers are not closed under subtraction.
Proof.

(1) For whole numbers a and b, a + b is the number of members of a joined collection that can be counted to the end (Addition 1.1): a whole number.

(2) One counterexample is enough. 0 and 1 are whole numbers, and 1 > 0, so 0 − 1 is not defined in the whole numbers, by Theorem 1.

Example (Small collections of numbers).

Is the collection 0, 1 closed under subtraction? Is the collection consisting of 0 alone?

  1. For 0, 1: the subtractions of two members are 0 − 0, 0 − 1, 1 − 0 and 1 − 1.
  2. 0 − 0 = 0, 1 − 0 = 1 and 1 − 1 = 0 are members. But 0 − 1 is not defined, by Theorem 1.
  3. So the collection 0, 1 is not closed under subtraction.
  4. For 0 alone: the only subtraction is 0 − 0 = 0, a member. So this collection is closed under subtraction.

Answer: 0, 1 is not closed under subtraction; the collection with the single member 0 is.

Special cases

Proposition .

For every whole number a:

  1. a − 0 is defined, and a − 0 = a;
  2. a − a is defined, and a − a = 0;
  3. 0 − b is defined only for b = 0;
  4. a − 1 is defined exactly when a ≥ 1, and then a − 1 is the predecessor of a.
Proof.

(1) 0 ≤ a, and a + 0 = a, so a − 0 = a by Theorem 2 of lesson 1.2.

(2) a ≤ a, and 0 + a = a, so a − a = 0 by the same theorem.

(3) 0 − b is defined exactly when b ≤ 0. Since 0 is the smallest whole number (Counting 1.4), that happens only for b = 0.

(4) a − 1 is defined exactly when 1 ≤ a. Then a is not 0, so it has a predecessor p, the number whose successor is a. The successor of p is p + 1 (Addition 1.1), so p + 1 = a, and a − 1 = p by Theorem 2 of lesson 1.2.

Proposition (taking away more leaves less).

Let a, b and b′ be whole numbers with b ≤ b′ ≤ a. Then a − b′ ≤ a − b. In particular a − b ≤ a, with equality only when b = 0.

Proof.

Let e = b′ − b, so that e + b = b′ (lesson 1.2). Then ((a − b′) + e) + b = (a − b′) + (e + b) = (a − b′) + b′ = a, by the associative property (Addition 1.6) and Theorem 1 of lesson 1.2. By Theorem 2 of lesson 1.2, a − b = (a − b′) + e.

A sum is never less than an addend (Addition 1.2), so a − b′ ≤ (a − b′) + e = a − b. For the second statement, take b = 0 and b′ = b: a − b ≤ a − 0 = a. If b ≥ 1, then (a − b) + b = a with b ≥ 1, so a > a − b (adding a number other than 0 gives a greater number); so equality forces b = 0.

Example (Zero in every position).

Which of 0 − 0, 0 − 4, 4 − 0 and 4 − 4 are defined, and what are their values?

  1. 0 − 0: by (2) with a = 0, it is defined and equals 0.
  2. 0 − 4: by (3), 0 − b is defined only for b = 0, so 0 − 4 is not defined.
  3. 4 − 0: by (1), it equals 4.
  4. 4 − 4: by (2), it equals 0.

Answer: 0 − 0 = 0, 4 − 0 = 4 and 4 − 4 = 0; 0 − 4 is not defined in the whole numbers.

Game

Which can be subtracted?

Round
1
Score
0
Streak
0

Select every expression that has a value among the whole numbers.

Several subtractions in a row

When subtractions follow each other, each step must be defined. Parentheses show which subtraction is done first.

Proposition .

Let a, b and c be whole numbers. Then (a − b) − c is defined exactly when b + c ≤ a, and then (a − b) − c = a − (b + c).

Proof.

Suppose (a − b) − c is defined, so b ≤ a and c ≤ a − b. Let d = (a − b) − c. By Theorem 1 of lesson 1.2, d + c = a − b and (a − b) + b = a, so (d + c) + b = a. By the associative property, d + (c + b) = a, and c + b = b + c (Addition 1.5), so d + (b + c) = a. By Theorem 2 of lesson 1.2, b + c ≤ a and d = a − (b + c).

Conversely, suppose b + c ≤ a, and let d = a − (b + c). Then d + (b + c) = a, that is, (d + c) + b = a, by the associative and commutative properties. By Theorem 2 of lesson 1.2, b ≤ a and a − b = d + c. Again by Theorem 2, c ≤ a − b and (a − b) − c = d.

Example (A chain that works).

Find (20 − 8) − 5.

  1. The condition: 8 + 5 = 13 and 13 ≤ 20, so the chain is defined.
  2. Step by step: 20 − 8 = 12 (12 + 8 = 20), then 12 − 5 = 7 (7 + 5 = 12).
  3. At once: 20 − (8 + 5) = 20 − 13 = 7 (7 + 13 = 20).

Answer: (20 − 8) − 5 = 7, as the Proposition predicts.

Example (A chain that breaks, and the order of the steps).

Are (10 − 4) − 7, (7 − 9) + 5 and (7 + 5) − 9 defined in the whole numbers?

  1. (10 − 4) − 7: the first step is defined, 10 − 4 = 6, but 7 > 6, so 6 − 7 is not. The condition fails too: 4 + 7 = 11 > 10.
  2. (7 − 9) + 5: the first step, 7 − 9, is not defined, because 9 > 7. The whole expression has no value.
  3. (7 + 5) − 9: first 7 + 5 = 12, then 12 − 9 = 3, because 3 + 9 = 12. Defined.

Answer: only (7 + 5) − 9 = 3 is defined. The same numbers in a different order of steps can give a defined or an undefined expression: adding first keeps the minuend large enough.

Beyond the whole numbers

Some questions need an answer that is not a whole number. A temperature of 3 degrees that falls by 5 degrees, or an account holding 3 dollars from which 5 dollars are paid, has gone below zero. The whole numbers have no value for 3 − 5 to describe it.

Looking ahead.

Subtraction, the inverse operation to addition, can take us beyond the natural numbers to negative integers.⁠[5] The unit Integers builds those numbers; in fact every integer can be written as a difference a − b of two natural numbers.⁠[6] In the integers every subtraction is defined, as the lesson Subtraction is now always possible of that unit shows.

Exercises

Exercise .

Which are defined in the whole numbers? Give the value of each one that is: (a) 14 − 9; (b) 9 − 14; (c) 0 − 0; (d) 99 − 100; (e) 100 − 99.

▸ Show solution

(a) 9 ≤ 14, defined: 14 − 9 = 5, since 5 + 9 = 14. (b) 14 > 9, not defined. (c) 0 ≤ 0, defined: 0 − 0 = 0. (d) 100 > 99, not defined. (e) 99 ≤ 100, defined: 100 − 99 = 1, since 1 + 99 = 100.

Exercise .

For which whole numbers b is 8 − b defined? How many such b are there, and what values does 8 − b take?

▸ Show solution

8 − b is defined exactly when b ≤ 8, that is, for b = 0, 1, 2, 3, 4, 5, 6, 7, 8: nine values. The values of 8 − b are then 8, 7, 6, 5, 4, 3, 2, 1, 0.

Exercise .

A student writes 4 − 6 = 0 “because you cannot take away more than you have”. Another writes 4 − 6 = 2. Explain what is wrong with each.

▸ Show solution

No. If 4 − 6 were 0, Theorem 2 of lesson 1.2 would give 0 + 6 = 4, but 0 + 6 = 6. If it were 2, it would give 2 + 6 = 4, but 2 + 6 = 8. No whole number c satisfies c + 6 = 4, because c + 6 ≥ 6 > 4.

So 4 − 6 is not defined in the whole numbers. 4 ∸ 6 = 0 is the modified difference, a different operation.

Exercise .

Decide, using the Proposition on several subtractions, which are defined, and find their values: (a) (30 − 6) − 9; (b) (12 − 6) − 9; (c) (12 + 9) − 6.

▸ Show solution

(a) 6 + 9 = 15 and 15 ≤ 30, so (30 − 6) − 9 is defined, and it equals 30 − 15 = 15. Step by step: 30 − 6 = 24 and 24 − 9 = 15.

(b) 6 + 9 = 15 > 12, so (12 − 6) − 9 is not defined: 12 − 6 = 6, and 6 − 9 is not defined.

(c) (12 + 9) − 6 = 21 − 6 = 15, defined, because 6 ≤ 21.

Exercise .

Is the collection 0, 1, 2, …, 10 closed under addition? Under subtraction? Answer the same questions for the collection of all whole numbers that are at least 5.

▸ Show solution

The collection 0, 1, 2, …, 10 is not closed under addition: 6 and 7 are members, but 6 + 7 = 13 is not. It is not closed under subtraction either: 0 − 1 is not defined.

The collection of all whole numbers greater than or equal to 5 is closed under addition, because a sum is never less than an addend (Addition 1.2), so a + b ≥ a ≥ 5. It is not closed under subtraction: 5 − 5 = 0, which is not a member.

Exercise .

Prove that a − b and b − a are both defined exactly when a = b, and find their value in that case.

▸ Show solution

Suppose a − b and b − a are both defined. Then b ≤ a and a ≤ b. By the trichotomy law of Counting 1.4, exactly one of b < a, b = a, b > a holds; b ≤ a rules out b > a, and a ≤ b rules out b < a. So a = b.

Conversely, if a = b, both are a − a = 0. So a − b and b − a are both defined exactly when a = b, and then both are 0.

Summary

  1. For whole numbers, a − b is defined exactly when b ≤ a; equivalently, when a collection of a has a part of b, when some c gives c + b = a, or when b steps to the left can be taken from a.
  2. When b > a, no whole number is a − b. In particular 3 − 5 is neither 2 (that is 5 − 3) nor 0.
  3. The whole numbers are closed under addition but not under subtraction: 0 − 1 is not a whole number.
  4. a − 0 = a and a − a = 0; 0 − b is defined only for b = 0; a − 1 is the predecessor of a when a ≥ 1. Taking away more leaves less.
  5. (a − b) − c is defined exactly when b + c ≤ a, and then equals a − (b + c).

Sources

  1. 1.
    H.-D. Ebbinghaus et al., Numbers (trans. H. L. S. Orde, Springer (Graduate Texts in Mathematics 123), 1991).
    Chapter 1, “Natural Numbers, Integers, and Rational Numbers” (K. Mainzer), section §3, “The Integers”, p. 19 (the whole topic: pp. 19–20).
    “Subtraction cannot be done without restriction in the domain of the natural numbers.”
    Used for: subtraction cannot be done without restriction in the natural numbers: a − b is defined only when b ≤ a.
  2. 2.
    H.-D. Ebbinghaus et al., Numbers (trans. H. L. S. Orde, Springer (Graduate Texts in Mathematics 123), 1991).
    Chapter 1, “Natural Numbers, Integers, and Rational Numbers” (K. Mainzer), section §2, “Natural Numbers”, 3, “Addition, Multiplication and Ordering of the Natural Numbers”, p. 18 (the whole topic: pp. 17–18).
    “An order relation ≤ may be defined on ℕ as follows: the relation n ≤ m holds if and only if there is a t ∈ ℕ such that n + t = m.”
    Used for: advanced texts define b ≤ a for the natural numbers as: some natural number added to b gives a.
  3. 3.
    George S. Boolos, John P. Burgess and Richard C. Jeffrey, Computability and Logic (4th ed., Cambridge University Press, 2002).
    Chapter 6, “Recursive Functions”, section 6.1, “Primitive Recursive Functions” (Example 6.8, “The (modified) difference function”), p. 69 (the whole topic: pp. 68–70).
    “Define x ∸ y to be the difference x − y if x ≥ y, and let x ∸ y = 0 by convention otherwise.”
    Used for: books on computation define a modified difference x ∸ y, equal to x − y if x ≥ y and to 0 by convention otherwise.
  4. 4.
    David S. Dummit and Richard M. Foote, Abstract Algebra (3rd ed., John Wiley & Sons, 2004).
    Chapter 1, “Introduction to Groups”, section 1.1, “Basic Axioms and Examples”, p. 16 (the whole topic: pp. 16–17).
    “If the restriction of ⋆ to H is a binary operation on H, i.e., for all a, b ∈ H, a ⋆ b ∈ H, then H is said to be closed under ⋆.”
    Used for: a collection is closed under an operation when the operation applied to any two of its members (for all a and b, so also the same member twice) always gives a member.
  5. 5.
    George S. Boolos, John P. Burgess and Richard C. Jeffrey, Computability and Logic (4th ed., Cambridge University Press, 2002).
    Chapter 7, “Recursive Sets and Relations”, section 7.1, “Recursive Relations”, Example 7.11, p. 79 (the whole topic: pp. 78–79).
    “Subtraction, the inverse operation to addition, can take us beyond the natural numbers to negative integers”
    Used for: subtraction, the inverse operation to addition, can take us beyond the natural numbers to the negative integers.
  6. 6.
    H.-D. Ebbinghaus et al., Numbers (trans. H. L. S. Orde, Springer (Graduate Texts in Mathematics 123), 1991).
    Chapter 1, “Natural Numbers, Integers, and Rational Numbers” (K. Mainzer), section §3, “The Integers”, 1, “The Additive Group ℤ”, p. 20 (the whole topic: pp. 19–21).
    “Every integer can be expressed as a difference a − b between two natural numbers a and b.”
    Used for: every integer can be written as a difference a − b of two natural numbers.