Addition and subtraction of integers
Addition of Integers
The simplest conception of an integer is that it consists of an absolute value (which is a natural number) and a sign (generally either positive or negative). The integer zero is a special third case, being neither positive nor negative. The corresponding definition of addition must proceed by cases:
- For an integer n, let |n| be its absolute value. Let a and b be integers. If either a or b is zero, treat it as an identity. If a and b are both positive, define a + b = |a| + |b|. If a and b are both negative, define a + b = −(|a| + |b|). If a and b have different signs, define a + b to be the difference between |a| and |b|, with the sign of the term whose absolute value is larger. As an example, −6 + 4 = −2; because −6 and 4 have different signs, their absolute values are subtracted, and since the absolute value of the negative term is larger, the answer is negative.
Although this definition can be useful for concrete problems, the number of cases to consider complicates proofs unnecessarily. So the following method is commonly used for defining integers. It is based on the remark that every integer is the difference of two natural integers and that two such differences, a – b and c – d are equal if and only if a + d = b + c. So, one can define formally the integers as the equivalence classes of ordered pairs of natural numbers under the equivalence relation
- (a, b) ~ (c, d) if and only if a + d = b + c.
The equivalence class of (a, b) contains either (a – b, 0) if a ≥ b, or (0, b – a) otherwise. If n is a natural number, one can denote +n the equivalence class of (n, 0), and by –n the equivalence class of (0, n). This allows identifying the natural number n with the equivalence class +n.
Addition of ordered pairs is done component-wise:
A straightforward computation shows that the equivalence class of the result depends only on the equivalences classes of the summands, and thus that this defines an addition of equivalence classes, that is integers. Another straightforward computation shows that this addition is the same as the above case definition.
Subtraction of Integers
Imagine a line segment of length b with the left end labeled a and the right end labeled c. Starting from a, it takes b steps to the right to reach c. This movement to the right is modeled mathematically by addition:
- a + b = c.
From c, it takes b steps to the left to get back to a. This movement to the left is modeled by subtraction:
- c − b = a.
Now, a line segment labeled with the numbers 1, 2, and 3. From position 3, it takes no steps to the left to stay at 3, so 3 − 0 = 3. It takes 2 steps to the left to get to position 1, so 3 − 2 = 1. This picture is inadequate to describe what would happen after going 3 steps to the left of position 3. To represent such an operation, the line must be extended.
To subtract arbitrary natural numbers, one begins with a line containing every natural number (0, 1, 2, 3, 4, 5, 6, ...). From 3, it takes 3 steps to the left to get to 0, so 3 − 3 = 0. But 3 − 4 is still invalid, since it again leaves the line. The natural numbers are not a useful context for subtraction.
The solution is to consider the integer number line (..., −3, −2, −1, 0, 1, 2, 3, ...). This way, it takes 4 steps to the left from 3 to get to −1:
- 3 − 4 = −1.
This way of defining integers as equivalence classes of pairs of natural numbers, can be used to embed into a group any commutative semigroup with cancellation property. Here, the semigroup is formed by the natural numbers and the group is the additive group of integers. The rational numbers are constructed similarly, by taking as semigroup the nonzero integers with multiplication.
This construction has been also generalized under the name of Grothendieck group to the case of any commutative semigroup. Without the cancellation property the semigroup homomorphism from the semigroup into the group may be non-injective. Originally, the Grothendieck group was, more specifically, the result of this construction applied to the equivalences classes under isomorphisms of the objects of an abelian category, with the direct sum as semigroup operation.
Licensing
Content obtained and/or adapted from:
- Addition, Wikipedia under a CC BY-SA license
- Subtraction, Wikipedia under a CC BY-SA license