Se282 Topic 2
Se282 Topic 2
Definition 2.1.1 Let a and b be integers such that a 6= 0. Then we say that a
divides b if there exists an integer m such that b = am.
1
Proof :
(1) Let a be an integer such that a 6= 0. Then 0 = a · 0. Thus, there exists an
integer 0 such that 0 = a · 0. Therefore, a | 0.
(2) Let b be an integer. Then b = 1 · b. Thus, there exists an integer b such that
b = 1 · b. Therefore, 1 | b.
(3) Let a be an integer such that a 6= 0. Then a = a · 1. Thus, there exists an
integer 1 such that a = a · 1. Therefore, a | a.
(2) Let a and b be nonzero such that a | b and b | c. Then there exist integers
m1 and m2 such that b = am1 and c = bm2 . Thus, c = bm2 = (am1 )m2 = a(m1 m2 ).
Hence, there exists an integer m1 m2 such that c = a(m1 m2 ). Therefore, a | c.
(3) Let a 6= 0 such that a | b and a | c. Then there exist integers m1 and m2 such
that b = am1 and c = am2 . Thus, bx = (am1 )x and cy = (am2 )y, for all integers x
and y. This implies that bx + cy = (am1 )x + (am2 )y = a(m1 x + m2 y), for all integers
x and y. Hence, there exists an integer (m1 x+m2 y) such that bx+cy = a(m1 x+m2 y)
for all integers x and y. Therefore, a | (bx + cy) for all integers x and y.
2
Proof :
(1) Let a 6= 0 such that a | 1. Then there exists an integer m such that am = 1.
By Axiom 1.3, either a = m = 1 or a = m = −1. Therefore, either a = 1 or a = −1.
(2) Let a | b and b | a. Then there exist integers p and q such that b = ap and
a = bq. Thus, a = bq = (ap)q = a(pq), which implies that a = a(pq). Since a 6= 0, it
follows that pq = 1. By part 1, either q = 1 or q = −1. Therefore, either a = b or
a = −b.
(3) Suppose that a | b. Then there exist an integer m such that b = am. Thus,
xb = x(am) = (xa)m, where x 6= 0. Hence, there exists an integer m such that
xb = (xa)m. Therefore, xa | xb.
Conversely, suppose that xa | xb. Then there exist an integers m such that
xb = (xa)m = x(am). Thus, xb = x(am). Since x 6= 0, it follows that b = am.
Hence, there exist an integer m such that b = am. Therefore, a | b.
(2) Let a 6= 0 such that a | b. By part (1), a | (−b). But |b| = ±b for all b ∈ Z.
Therefore, a | |b|.
3
(4) The sum of two odd integers is even.
(5) Let a, b, c ∈ Z with ac 6= 0. If ac | bc, then a | b.
(6) The product of two even integers is even.
(7) The product of two odd integers is odd.
(8) Let a, b ∈ Z such that a 6= 0. Then a | b if and only if ab ∈ Z.
(9) The product of two consecutive integers is even.
(10) Let a, b, c ∈ Z with a 6= 0. If a | b and a | c, then a | (b − c).
Theorem 2.2.2 (The Division Algorithm) Let a and b be integers such that
b 6= 0. Then there exists unique integers q and r such that a = qb + r, where
0 ≤ r < |b|.
Proof :
Let a, b ∈ Z such that b 6= 0. Consider the following cases:
Case 2. b < 0. Then |b| = −b > 0. By Case 1, there exists q1 , r ∈ Z such that
a = q1 (−b) + r, where 0 ≤ r < |b|. Thus, a = −q1 b + r, where 0 ≤ r < |b|.Let
q = −q1 . Hence, for b < 0, a = qb + r, where 0 ≤ r < |b|.
4
Example 2.2.3 (1) Let a = 25 and b = 7. If a = 25 is divided by b = 7, then
the quotient is q = 3 and the remainder is r = 4. Therefore, 25 = 3 · 7 + 4, where
0 ≤ 4 < |7|.
(2) Given integers a = −11 and b = 3, there exists unique integers q = −4 and
r = 1 such that −11 = −4 · 3 + 1, where 0 ≤ 1 < |3|.
(3) Given integers a = 7 and b = −2, there exists unique integers q = −3 and
r = 1 such that 7 = −3(−2) + 1, where 0 ≤ 1 < | − 2|.
(4) Given integers a = −35 and b = −12, there exists unique integers q = 3 and
r = 11 such that −35 = 3(−12) + 1, where 0 ≤ 1 < | − 12|.
Corollary 2.2.4 Let a and b be integers such that b > 0. Then there exists unique
integers q and r such that a = qb + r, where 0 ≤ r < b.
Proof :
Let a and b be integers such that b > 0. By Theorem 2.2.2, there exists unique
integers q and r such that a = qb + r, where 0 ≤ r < |b|. Since b > 0, it follows that
|b| = b. Therefore, a = qb + r, where 0 ≤ r < b.
Exercise 2.2.5 Use the Division Algorithm to find the quotient q and the remainder
r when
(1) a = 76 is divided by b = 11.
(2) a = −76 is divided by b = 13.
(3) a = 101 is divided by b = −6.
(4) a = −101 is divided by b = −6.
(5) a = −7863 is divided by b = 345.
5
Example 2.3.2 (1) The common divisors of 6 and 16 are 1, −1, 2, −2. Therefore,
C(6, 16) = {1, −1, 2, −2}.
(2) The common divisors of 6 and -16 are 1, −1, 2, −2. Therefore, C(6, −16) =
{1, −1, 2, −2}.
(3) The common divisors of -6 and 16 are 1, −1, 2, −2. Therefore, C(−6, 16) =
{1, −1, 2, −2}.
(4) The common divisors of -6 and -16 are 1, −1, 2, −2. Therefore, C(−6, −16) =
{1, −1, 2, −2}.
(5) The common divisors of 4 and -24 are 1, −1, 2, −2, 4, −4. Therefore, C(4, −24) =
{1, −1, 2, −2, 4, −4}.
(6) The common divisors of 5 and 24 are 1 and −1. Therefore, C(5, 24) = {1, −1}.
(7) The common divisors of 4 and 0 are 1, −1, 2, −2, 4, −4. Therefore, C(4, 0) =
{1, −1, 2, −2, 4, −4}.
(8) The common divisors of 0 and 0 are all the integers. Therefore, C(0, 0) = Z.
Theorem 2.3.5 Let a, b ∈ Z. Then C(a, b) = C(−a, b) = C(a, −b) = C(−a, −b).
Proof :
Theorem 2.3.5 follows from Theorem 2.1.9(1).
Example 2.3.6 It can be seen from Example 2.3.2 that C(6, 16) = C(−6, 16) =
C(6, −16) = C(−6, −16).
6
Definition 2.3.7 The positive integer c is said to be a greatest common divisor of
a and b if
1. c | a and c | b.
2. for all c0 ∈ Z such that c0 |a and c0 |b, then c0 |c.
Notation We use the notation gcd(a, b) for a greatest common divisor of a and b.
Example 2.3.9 (1) gcd(6, 16) = gcd(6, −16) = gcd(−6, 16) = gcd(−6, −16) = 2.
In view of Lemma 2.3.10, we now call gcd(a, b) as the greatest common divisor
of a and b.
Theorem 2.3.11 If a and b are integers, not both zero, then gcd(a, b) exists. Moreover,
we can find integers m0 and n0 such that gcd(a, b) = m0 a + n0 b.
Proof :
Let M = {ma + nb ∈ Z : m, n ∈ Z}. Since one of a or b is not 0, M contains
nonzero integers. Also, if x = ma + nb ∈ M , then −x = (−m)a + (−n)b ∈ M . So,
M contains positive integers. Moreover, M contains a smallest positive integer, say
c and it has the form c = m0 a + n0 b. We claim that c = gcd(a, b).
(1) If x = ma + nb ∈ M , then by the division algorithm, there exist integers t
and r such thatx = tc + r, where 0 ≤ r < c. Thus,
which means that r ∈ M . Since 0 ≤ r and r < c, by the choice of c, we must have
r = 0. Hence, x = tc, which shows that c | x for any x ∈ M . But a = 1a + 0b ∈ M
and b = 0a + 1b ∈ M . Therefore, c | a and c | b.
(2) If c0 is an integer such that c0 | a and c0 | b, then c0 | (m0 a + n0 b). Hence, c0 | c.
7
The above theorem states that the greatest common divisor of two integers a and
b is expressible as a linear combination of a and b with integral multipliers m0 and
n0 . This topic is further discussed in the last section.
Example 2.3.12 (1) gcd(6, 9) = 3. Thus, there exist integers −1 and 1 such that
6(−1) + 9(1) = 3. Also, there exist integers 2 and −1 such that 6(2) + 9(−1) = 3.
(2) gcd(25, 15) = 5. Thus, there exist integers −1 and 2 such that 25(1)+15(2) =
5.
Given any integers b1 , b2 , ..., bn , not all zero, we denote their greatest common
divisor by gcd(b1 , b2 , ..., bn ).
Example 2.3.16 (1) The integers 5 and 24 are relatively prime since gcd(5, 24) = 1.
(2) The integers 3 and 11 are relatively prime since gcd(3, 11) = 1.
Corollary 2.3.17 If a and b are relatively prime, we can find integers m and n such
that am + bn = 1.
Proof :
The proof follows from Theorem 2.3.11.
8
Definition 2.3.18 We say that the integers a1 , a2 , ..., an are mutually relatively
prime if gcd(a1 , a2 , ..., an ) = 1. We say that a1 , a2 , ..., an are pairwise relatively prime
in case gcd(ai , aj ) = 1 for all i = 1, 2, ..., n and j = 1, 2, ..., n with i 6= j.
Example 2.3.19 (1) The integers 3, 9, 11 are mutually relatively prime since gcd(3, 9, 11) =
1, but are not pairwise relatively prime since gcd(3, 9) = 3.
(2) The integers 3, 9, 11, −17 are mutually relatively prime since gcd(3, −9, 11, −17) =
1 but not pairwise relatively prime since gcd(3, −9) = 3.
(3) The integers 3, 5, 11 are pairwise relatively prime since gcd(3, 5) = gcd(3, 11) =
gcd(5, 11) = 1. Note also that these integers are mutually relatively prime.
Remark 2.3.20 If the integers a1 , a2 , ..., an are pairwise relatively prime, then they
are mutually relatively prime.
Theorem 2.3.21 Let a and b be integers, not both zero. Then for any positive integer
m, gcd(ma, mb) = m · gcd(a, b).
Proof :
By Theorem 2.3.13(1),
Example 2.3.22 (1) gcd(4, 6) = 2 and gcd(12, 18) = 6. Hence, gcd(12, 18) =
gcd(3 · 4, 3 · 6) = 3 · gcd(4, 6) = 3 · 2 = 6.
Theorem 2.3.23 Let a and b be integers, not both zero. If d | a and d | b and d > 0,
then
a b 1
gcd , = · gcd(a, b).
d d d
Proof :
1
By Theorem 2.3.21, gcd(ma, mb) = m · gcd(a, b), where m > 0. Set m = > 0.
d
Then
a b 1
gcd , = · gcd(a, b).
d d d
9
Theorem 2.3.24 Let a, b, m ∈ Z. If gcd(a, m) = gcd(b, m) = 1, then gcd(ab, m) = 1.
Proof :
Let gcd(a, m) = gcd(b, m) = 1. By Corollary 2.3.17, there exist integers p0 , q0 , p1 , q1
such that ap0 + mq0 = 1 and bp1 + mq1 = 1. Then ap0 = 1 − mq0 and bp1 = 1 − mq1 .
Thus,
Proof :
Let c | ab and gcd(a, c) = 1. By Corollary 2.3.13, there exist integers m and n
such that am + cn = 1. Thus, b(am) + b(cn) = b, that is, a(bm) + c(bn) = b. By
hypothesis, c | ab and so, by Theorem 2.1.7(1), c | abm. But c | c(bn). Thus, by
Theorem 2.1.7(3), c | (abm + bcn). Therefore, c | b.
Exercise 2.3.26
(1) Find the greatest common divisor of 100 and 104.
(2) Find the greatest common divisor of -30 and 95.
(3) Let m be a positive integer. Find the greatest common divisor of m and
m + 1.
(4) Let m be a positive integer. Find the greatest common divisor of m and
m + 2.
a b
(5) Let a, b, c ∈ Z. If c = gcd(a, b), then gcd , = 1.
c c
(6) Show that if a1 , a2 , ..., an are integers that are not all 0 and c is a positive
integer, then gcd(ca1 , ca2 , ..., can ) = c gcd(a1 , a2 , ..., an ).
(7) Let a, b, m ∈ Z. Then gcd(a, b) = gcd(a + mb, b).
10
On the other hand, let d ∈ C(b, r), that is, d is a common divisor of b and r.
Then d | b and d | r. Thus, d |(qb + r). But a = qb + r, which implies that d | a.
Hence, d | a and d | b, that is, d ∈ C(a, b). Therefore, C(b, r) ⊆ C(a, b).
Therefore, C(a, b) = C(b, r). Consequently, gcd(a, b) = gcd(b, r).
Example 2.4.3 Use the Euclidean Algorithm to find the greatest common divisor
of 412 and 32 and express it in terms of the two integers.
Solution:
412 = 32(12) + 28,
32 = 28(1) + 4,
28 = 4(7).
Next,
4 = 32 − 28(1)
= 32 − 1(28), where 28 = 412 − 32(12)
= 32 − (412 − 32(12))
= 32 − 412 + 32(12)
= 32(13) + 412(−1).
Therefore, 4 = 32(13) + 412(−1).
Example 2.4.4 Use the Euclidean Algirithm to find gcd(657, 963) and express it in
terms of the two integers.
Solution:
963 = 657(1) + 306,
657 = 306(2) + 45,
306 = 45(6) + 36,
45 = 36(1) + 9,
11
36 = 9(4).
Next,
Remark 2.4.5 Applying Theorem 2.4.1, we have gcd(412, 32) = gcd(32, 28) =
gcd(28, 4) = 4.
Exercise 2.4.6
(1) Use the Euclidean Algorithm to find gcd(780, 150) and express it in terms of
the two integers.
(2) Use the Euclidean Algorithm to find gcd(423, 198) and express it in terms of
the two integers.
(3) Use the Euclidean Algorithm to find gcd(7469, 2464).
(4) Use the Euclidean Algorithm to find gcd(1819, 3587).
(5) Find the values of m and n such that 43m + 64n = 1.
(6) Find the values of m and n such that 71m − 50n = 1.
12