
Greatest common divisors Robert Friedman Long division Does 5 divide 34? It is easy to see that the answer is no, for many different reasons: 1. 34 does not end in a 0 or 5. 2. Checking directly by hand, 34 is not equal to a multiple 5n for n ≤ 6, and for n ≥ 7, 7n > 34. 3. The prime factorization of 34 = 2 · 17 does not involve a 5. 34 On the other hand, we can also write 34 = 5 · 5 , so in another sense 5 does divide 34. It depends on what we mean by divides. Given integers a, n, we say that a divides n, written a|n, if there exists an integer q such that n = aq. In this case, we say that a is a factor of n. For example, every integer divides 0, and the only integers which divide 1 are ±1. We can make the same definition for rational numbers, but it is not very interesting: every rational number divides every other rational number (except that 0 does not divide a nonzero rational number). For the record, let us give some notation for the various kinds of numbers: 1. N is the set of natural numbers {1, 2, 3,... }. With this definition, 0 ∈/ N, and the set {0, 1, 2, 3,... } is the set of nonnegative integers. 2. Z is the set of integers {..., −2, −1, 0, 1, 2 ... }. 3. Q is the set of rational numbers {a/b, a, b ∈ Z, b 6= 0}. 4. R is the set of real numbers, which we will not attempt to define here, and C is the set of complex numbers. In Q, R, and C we can divide by every nonzero number, so the property that one number divides another is not very interesting. We will look at 1 divisibility in Z here; divisibility in N is much the same, but it will be a lot easier for us if we are able to subtract as well as add. When we consider numbers and divisibility we will need the following: we have operations of addition and multiplication, which satisfy the usual properties: addition and multiplication are associative and commutative, there is an additive identity 0 and additive inverses, multiplication distributes over addition, and there is a multiplicative identity 1. As mentioned above, the cases where there are multiplicative inverses for every nonzero number (Q, R, and C) are not interesting. In fact, in Z, the only numbers with multiplicative inverses are ±1. As a substitute for division, however, we do have the cancellation law: if ab = ac and a 6= 0, then b = c. Of course this would follow if we could multiply both sides by a−1. There is at least one other familiar case where it is interesting to look at divisibility and factorization: polynomials. For example, x − 1 does not divide f(x) = x3 − 2x2 + 3x + 4, which we can see as follows: the linear polynomial x − 1 divides f(x) if and only if f(1) = 0, but f(1) = 6 6= 0. On the other hand, for g(x) = x3 − 2x2 + 3x − 2, g(1) = 0, and indeed g(x) = (x − 1)(x2 − x + 2). We will also write a(x)|f(x) to mean that the polynomial a(x) divides f(x), i.e. that there exists a polynomial q(x) with f(x) = a(x)q(x). As we shall see in just a moment, this definition depends on the context. As a matter of notation, we will denote by Z[x] the set of all polynomials with coefficients in Z (integer coefficients) and by Q[x] the set of all polyno- mials with coefficients in Q (rational coefficients). The sets R[x], C[x], etc. are defined in a similar way. Addition and multiplication are defined in the usual way. There is also Q[x, y], the set of polynomials in two variables x and y, with all of the possible variations by allowing different coefficients. We now ask if 2x − 2 = 2(x − 1) divides x3 − 2x2 + 3x − 2. Answer: it depends. Clearly, since 2x − 2 = 2(x − 1), 3 2 2 1 2 1 x − 2x + 3x − 2 = (x − 1)(x − x + 2) = (2x − 2)( 2 x − 2 x + 1). 3 2 So if we work in Q[x], 2x − 2 divides x − 2x + 3x − 2, but 2x − 2 does not 3 2 divide x − 2x + 3x − 2 in Z[x]. We return to divisibility for ordinary integers. The basic fact is the following: Theorem 1 (Long division with remainder). Suppose that a, n ∈ Z with a > 0. Then there exist unique integers q, r with 0 ≤ r < a such that n = aq + r. 2 Here, q is the quotient and r is the remainder. Why is this statement true? We must use some basic fact about the inte- gers, or in this case the natural numbers. The fact in question is important enough to have a special name: Theorem 2 (Well ordering principle). A nonempty subset of N has a smallest element. We will not attempt to give a proof of the well-ordering principle here; it is closely related to an axiomatic characterization of the natural numbers. It can be paraphrased by saying that there are only finitely many natural numbers less than or equal to a given natural number N. It is also closely connected to the principle of mathematical induction. It is easy to see that the well-ordering principle also holds for the set of nonnegative integers: if X is a nonempty subset of the set of nonnegative integers, then either 0 ∈ X, in which case 0 is the smallest element of X, of 0 ∈/ X, in which case X ⊆ N and X is nonempty, so that X has a smallest element by the well-ordering principle. On the other hand, the well-ordering principle fails for the set of all integers Z, since for example Z itself does not have a smallest element. It also fails for the set of all nonnegative rational numbers, since for example + the set Q of all positive rational numbers does not have a smallest element (there is no smallest strictly positive rational number). Assuming the well-ordering principle (Theorem 2), let us deduce the statement about long division. Consider the set X of all nonnegative integers of the form n − aq for some q ∈ Z. In other words, we look at all integers q such that n − aq > 0. Note that X is not empty. For example, if n is positive, then n = n − a(0) ∈ X. If n ≤ 0, we could take q = (n − 1), so that n −aq = (1 −a)n +a. Since n ≤ 0 and a ≥ 1, so that 1−a ≤ 0, (1 − a)n ≥ 0 and so n − aq = (1 − a)n + a ≥ a > 0. By the well-ordering principle, X has a smallest element, necessarily of the form r = n − aq. Moreover, we claim that 0 ≤ r < a. Clearly, r ≥ 0 since by assumption r is a nonnegative integer. If r ≥ a, then r − a ≥ 0. But then r − a = n − (a + 1)q is a nonnegative integer in X, and it is clearly smaller than r. This contradicts the fact that r is the smallest element of X. Thus we take r = n − aq, with 0 ≤ r < a and n = aq + r as desired. We still need to check that q and r are unique. If also n = aq1 + r1 with 0 ≤ r1 < a, then since n = aq + r = aq1 + r1, a(q − q1) = r1 − r. 3 In particular a divides r1 − r. But r1 < a, r ≥ 0 so that r1 − r < a. Likewise r1 ≥ 0, r < a implies that r1 − r > −a. Thus a|r1 − r, −a < r1 − r < a, and the only multiple of a strictly between a and a is 0. So r1 − r = 0 and r = r1. Hence a(q − q1) = 0 and a > 0, so q − q1 = 0 and thus q = q1. This shows that q and r are unique. This finishes the proof. In the exercises, you are asked to make the very minor changes in the statement and proof of Theorem 1 in case a < 0. Long division holds in other circumstances as well. For example, long division of polynomials should be familiar. Here we use the degree of a polynomial as a rough measure of its size. Given f(x) and a(x) in Q[x] with a(x) 6= 0, there exist unique polynomials q(x) and r(x) in Q[x] with either r(x) = 0 (in which case deg r(x) is undefined), or 0 ≤ deg r(x) < deg a(x), such that f(x) = a(x)q(x) + r(x). However, long division definitely fails in 3 2 Z[x] or in Q[x, y]. For example, you cannot divide 2x−2 into x −2x +3x−2 in the above sense and keep all of the coefficients integers. (Long division by a(x) does work in Z[x] as long as the leading coefficient of a(x) is 1, though.) Greatest common divisors Definition 3. Let a, b ∈ Z, where not both of a, b are zero. A greatest common divisor d of aand b (written d = gcd(a, b)) is a positive integer d such that d|a, d|b, (i.e. d is a common divisor of a and b), and moreover, if e is an integer such that e|a and e|b, then e|d. In other words, d is divisible by every common divisor of a and b.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages10 Page
-
File Size-