0% found this document useful (0 votes)
8 views12 pages

Se282 Topic 2

The document covers integer divisibility, the Division Algorithm, and the Euclidean Algorithm, outlining definitions, theorems, and proofs related to these concepts. It includes learning outcomes for students, such as defining divisibility, applying the Division Algorithm, and finding greatest common divisors. Additionally, it presents exercises for practice and demonstrates the uniqueness of quotient and remainder in the Division Algorithm.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views12 pages

Se282 Topic 2

The document covers integer divisibility, the Division Algorithm, and the Euclidean Algorithm, outlining definitions, theorems, and proofs related to these concepts. It includes learning outcomes for students, such as defining divisibility, applying the Division Algorithm, and finding greatest common divisors. Additionally, it presents exercises for practice and demonstrates the uniqueness of quotient and remainder in the Division Algorithm.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Topic 2

Integer Divisibility, the Division Algorithm, and the


Euclidean Algorithm

Learning Outcomes of the Topic


At the end of the topic, the learner must be able to:
1. define integer divisibility, and state and prove basic divisibility properties.
2. state and apply the Division Algorithm.
3. define and find common divisors and the greatest common divisor of integers.
4. state and prove properties of the greatest common divisor of integers.
5. state the Euclidean Algorithm and apply it to find the greatest common divisor
of two integers.

2.1 Integer Divisivility

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.

If a divides b, then we also say that ”a is a divisor of b” or ”a is a factor of b”.

Notation Let a and b be integers such that a 6= 0. If a divides b, then we write a | b


and if a does not divide b, then we sometimes write a - b.

Example 2.1.2 (1) 2 | 10 since there exists an integer 5 such that 10 = 2 · 5.


(2) 3 | (−6) since there exists an integer −2 such that −6 = 3(−2).
(3) −4 | (−32) since there exists an integer 8 such that −32 = −4(8).
(4) −4 | 32 since there exists an integer −8 such that 32 = −4(−8).

Example 2.1.3 (1) 4 - 9.


(2) 8 - 4.
Proof :
(1) Suppose that 4 | 9. Then there exists an integer m such that 9 = 4m. This
implies that m = 49 . Hence, m = 94 is not an integer. This is a contradiction.
Therefore, 4 - 9.
(2) Suppose that 8 | 4. Then there exists an integer m such that 4 = 8m. This
implies that m = 84 = 12 . Hence, m = 21 is not an integer. This is a contradiction.
Therefore, 8 - 4. 

Theorem 2.1.4 Let a and b be integers such that a 6= 0. Then


(1) a | 0.
(2) 1 | b.
(3) a | a.

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. 

Definition 2.1.5 An integer n is even if there exists an integer k such that n = 2k


and an integer n is odd if there exists an integer k such that n = 2k + 1.

Theorem 2.1.6 Let n be an integer. Then


(1) 2 | n if n is even and
(2) 2 - n if n is odd.
Proof :
(1) Let n be an even integer. By Definition 2.1.5, there exists an integer k such
that n = 2k. Therefore, by Definition 2.1.1, 2 | n.
(2) Let n be an odd integer. Suppose that 2 | n. Then there exists an integer
m such that n = 2m. Since n is an odd integer, by Definition 2.1.5, there exists
an integer k such that n = 2k + 1. Thus, 2k + 1 = 2m. Solving for m, we obtain
m = 2k+12
= k + 21 . Hence, m = k + 21 is not an integer. This is a contradiction.
Therefore, 2 - n. 

Theorem 2.1.7 Let a, b, c ∈ Z.


(1) If a 6= 0 such that a | b, then a |bx for all integers x.
(2) If a and b are nonzero such that a | b and b | c, then a | c.
(3) If a 6= 0 such that a | b and a | c, then a | (bx + cy) for all integers x and y.
Proof :
(1) Let a 6= 0 such that a | b. Then there exists an integer m such that b = am.
Thus, bx = (am)x = a(mx) for all integers x. Hence, there exists an integer mx such
that bx = a(mx) for all integers x. Therefore, a | bx for all integers x.

(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. 

Theorem 2.1.8 Let a, b, c, x ∈ Z.


(1) If a 6= 0 such that a | 1, then either a = 1 or a = −1.
(2) If a and b are nonzero such that a | b and b |a, then a = b or a = −b.
(3) Let a and x be nonzero. Then a | b if and only if xa | xb.

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. 

Theorem 2.1.9 Let a, b ∈ Z.


(1) If a 6= 0 such that a | b, then −a | b and a | (−b).
(2) If a 6= 0 such that a | b, then a | |b|.
Proof :
(1) Let a 6= 0 such that a | b. Then there exists an integer m such that b = am.
Thus, b = −a(−m) and −b = a(−m). Hence, there exists an integer −m such that
b = −a(−m) and −b = a(−m). Therefore, −a | b and 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|. 

Theorem 2.1.10 If a and b are positive integers such that a | b, then a ≤ b.


Proof :
Suppose that a 6≤ b. Then a > b. Since a and b are positive integers such thata | b,
there exists a positive integer m such that b = am. Multiplying both sides of a > b
by m, we obtain am > bm. But b = am. Thus, b > bm. Since b > 0, it follows that
m < 1. This is a contradiction since m is a positive integer. Therefore, a ≤ b. 

Theorem 2.1.11 If b 6= 0 is an integer such that |b| < a, then a - b.


Proof :
Suppose that a | b. By Theorem 2.1.9(2), a | |b|. Since |b| and a are positive, there
exists a positive integer m such that |b| = am. By hypothesis, |b| < a. Multiplying
both sides by m, we obtain |b|m < am. But |b| = am. Hence, |b|m < |b|, which
implies that m < 1. This is a contradiction since m is a positive integer. Therefore,
a - b. 

Exercise 2.1.12 Prove the following statements.


(1) Let a, b, c, d ∈ Z with a 6= 0 and c 6= 0. If a | b and c | d, then ac | bd.
(2) Let a and b be positive integers. If b < a, then a - b.
(3) The sum of two even integers is even.

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).

2.2 The Division Algorithm

Axiom 2.2.1 (Priciple of Well-Ordering for Z+ ∪ {0}) Every nonempty subset


of Z+ ∪ 0 has a smallest element, that is, if S ⊆ Z+ ∪ 0 and S 6= ∅, then there exists
x0 ∈ S such that x0 ≤ x for all x ∈ S.

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 1. b > 0. Then b ≥ 1. Consider the set S = {a − zb : z ∈ Z, a − zb ≥ 0}.


Then a − (−|a|)b = a + |a|b ≥ 0, which implies that a − (−|a|)b ∈ S. Thus, S is
a nonempty set of nonnegative integers. By the Priciple of Well-Ordering, S has a
smallest element, say r. Then r ≥ 0 and r = a−qb for some b ∈ Z. Hence, a = qb+r.
We show that r < |b|. Suppose on the contrary that r ≥ |b| = b. Then r − b ≥ 0 and
r − b = a − qb − b = a − (q + 1)b, where q + 1 ∈ Z. This means that r − b ∈ S with
r − b < r. This is a contradiction since r is the smallest element in S. We must have
r < |b|. This proves the theorem for b > 0.

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|.

We prove the uniqueness of q and r. Suppose there exist q 0 , r0 ∈ Z such that


a = qb+r = q 0 b+r0 , where 0 ≤ r < |b| and 0 ≤ r0 < |b0 |. Then r0 −r = (q−q 0 )b. Thus,
|r0 − r| = |q − q 0 ||b|. Since 0 ≤ r < |b| and 0 ≤ r0 < |b0 |, it follows that −|b| < −r ≤ 0
and 0 ≤ r0 < |b0 |. Adding these inequalities, we obtain −|b| < r0 − r < |b|, which is
equivalent to |r0 − r| < |b|. Hence, we have |q − q 0 ||b| < |b|, that is, 0 ≤ |q − q 0 | < 1.
Since |q − q 0 | is an integer, it follows that |q − q 0 | = 0, which implies that |r0 − r| = 0.
This shows that q = q 0 and r = r0 . Therefore, q and r are unique. 

In the Division Algorithm, the integer q is called the quotient of a and b on


dividing a by b and the integer r is called the remainder of a and b on dividing a
by b. Note that if b | a, then r = 0 and hence, a = qb. If b - a, then r satisfies the
stronger inequalities 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|.

(5) Given integers a = 42 and b = 7, there exists unique integers q = 6 and r = 0


such that 42 = 6 · 7.

(6) Given integers a = 3 and b = 7, there exists unique integers q = 0 and r = 1


such that 3 = 0 · 7 + 3, where 0 ≤ 3 < |7|.

The next result is a special case of the Division Algorithm.

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.

2.3 The Greatest Common Divisor

Definition 2.3.1 Let a, b ∈ Z. Then an integer c is a common divisor of a and b if


c | a and c | b.

If c is a common divisor of integers a and b, let C(a, b) = {c : c | a and c | b},


that is, C(a, b) is the set of all common divisors of a and b.

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.

Remark 2.3.3 If a and b are integers, then C(a, b) = C(b, a).

Theorem 2.3.4 Let a, b ∈ Z. Then C(a, b) = C(|a|, |b|).


Proof :
If a = b = 0, then |a| = a and |b| = b. Thus, C(a, b) = C(|a|, |b|). Suppose that
one of a and b is not 0. Let c ∈ C(a, b), that is, c is a common divisor of a and b.
Then c | a and c | b. By Theorem 2.1.9(2), c | |a| and c | |b|. Hence, c ∈ C(|a|, |b|),
which implies that C(a, b) ⊆ C(|a|, |b|).
On the other hand, let d ∈ C(|a|, |b|), that is, d is a common divisor of |a| and
|b|. Then d | |a| and d | |b|. If a, b ≥ 0, then |a| = a and |b| = b. Thus, d | a and d | b.
If a, b < 0, then |a| = −a and |b| = −b. Thus, d |(−a) and d |(−b). By Theorem
2.1.9(1), d |(−(−a)) and d |(−(−b)). Hence, d | a and d | b.
Therefore, C(a, b) = C(|a|, |b|). 

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.

Remark 2.3.8 If a, b ∈ Z, then it follows from Corollary 2.3.5 that gcd(a, b) =


gcd(a, −b) = gcd(−a, b) = gcd(−a, −b).

Example 2.3.9 (1) gcd(6, 16) = gcd(6, −16) = gcd(−6, 16) = gcd(−6, −16) = 2.

(2) gcd(a, 0) = gcd(0, a) = a for all integers a 6= 0.

(3) gcd(5, 24) = 1.

(4) gcd(0, 0) does not exist. 

Lemma 2.3.10 Let a, b ∈ Z. If gcd(a, b) exists, then it must be unique.


Proof :
Suppose c1 and c2 are greatest common divisors of a and b. Then c1 | c2 and
c2 | c1 . By Theorem 2.1.5(2), c1 = ±c2 , which implies that c1 = c2 or c1 = −c2 . But
a greatest common divisor must be positive. Hence, c1 = c2 . Therefore, the greatest
common divisor of integers a and b is unique. 

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,

r = x − tc = a + nb − t(m0 a + n0 b) = (m − tm0 )a + (n − tn0 )b,

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.

Therefore, c = gcd(a, b). 

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. 

Theorem 2.3.13 The greatest common divisor of a and b can be characterized in


the following two ways:
(1) It is the least possible value of ax + by, where x and y range over all integers;
(2) it is the positive common divisor that is divisible by every common divisor.
Proof :
The proof of part (1) follows from the proof of Theorem 2.3.11, where c = gcd(a, b)
is assumed as the smallest positive integer. Part (2) follows from Definition 2.3.7(2).


Given any integers b1 , b2 , ..., bn , not all zero, we denote their greatest common
divisor by gcd(b1 , b2 , ..., bn ).

Example 2.3.14 (1) gcd(6, 9, 24) = 3, gcd(6, 9, 24, −6) = 3.

(2) gcd(4, 8, 0) = 4, gcd(4.6, 16, 0) = 2.

(3) gcd(5, 24, 30) = 1, gcd(3, 5, 7, 11) = 1. 

Definition 2.3.15 The integers a and b are relatively prime if gcd(a, b) = 1.

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.

(3) The integers −4 and 9 are relatively prime since gcd(−4, 9) = 1.

(4) The integers −1 and 1 are relatively prime since gcd(−1, 1) = 1.

(5) The integers −1 and 0 are relatively prime since gcd(−1, 0) = 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),

gcd(ma, mb) = least value of max + mby


= m · {least value of ax + by}
= m · gcd(a, b).

Therefore, gcd(ma, mb) = m · gcd(a, b). 

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.

(2) gcd(5, 6) = 1 and gcd(20, 24) = 4. Hence, gcd(20, 24) = gcd(4 · 5, 4 · 6) =


4 · gcd(5, 6) = 4 · 1 = 4.

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,

(ap0 )(bp1 ) = (1 − mq0 )(1 − mq1 )


= 1 − mq0 − mq1 + m2 q0 q1
= 1 − m(q0 + q1 − mq0 q1

This implies that ab(p0 p1 ) = 1 − m(q0 + q1 − mq0 q1 . Let p = p0 p1 and q = q0 + q1 −


mq0 q1 . Then (ab)p = 1 − mq, that is, (ab)p + mq = 1. By Theorem 2.1.4(2), 1 | ab
and 1 | m. Next, if c | ab and c | m, then c | (abp + mq) by Theorem 2.1.7(3). Hence,
c | 1. Therefore, by Definition 2.3.4, gcd(ab, m) = 1. 

Theorem 2.3.25 Let a, b, c ∈ Z. If c | ab and gcd(a, c) = 1, then c | b.

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).

2.4 The Euclidean Algorithm

Theorem 2.4.1 Let a, b ∈ Z such that a > b > 0. If a = qb + r, then gcd(a, b) =


gcd(b, r).
Proof :
It suffices to show that C(a, b) = C(b, r).
Let c ∈ C(a, b), that is, c is a common divisor of a and b. Then c | a and c | b.
Thus, c |(a − qb). But r = a − qb, which implies that c | r. Hence, c | b and c | r,
that is, c ∈ C(b, r). Therefore, C(a, b) ⊆ C(b, r).

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). 

Theorem 2.4.2 (The Euclidean Algorithm) Given integers a and b > 0, we


make a repeated application of the division algorithm, to obtain a series of equations

a = bq1 + r1 , 0 < r1 < b,


b = r1 q 2 + r2 , 0 < r2 < r1 ,
r1 = r2 q3 + r3 , 0 < r3 < r2 ,
···, ···
ri−2 = ri−1 qi + ri , 0 < ri < ri−1 ,
ri−1 = ri qi+1 .
Then the greatest common divisor of a and b is gcd(a, b) = ri , the last remainder
in the division process. The values of m0 and n0 in gcd(a, b) = am0 + an0 can be
obtained by writing each ri as a linear combination of a and b.

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).

Therefore, gcd(412, 32) = 4.

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).

Therefore, gcd(657, 963) = 9.

Next,

9 = 45 − 36(1), where 36 = 306 − 45(6)


= 45 − (306 − 45(6)),
= 45 − 306 + 45(6),
= 45(7) − 306, where 45 = 657 − 306(2)
= 7(657 − 306(2)) − 306,
= 7(657) − 306(14) − 306,
= 7(657) − 15(306), where 306 = 963 − 657(1)
= 7(657) − 15(963 − 657(1)),
= 7(657) − 15(963) − 15(657),
= 22(657) − 15(963).
Therefore, 9 = 657(22) + 963(−15). 

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

You might also like