Skip to main content

Section 8.1 The Greatest Common Divisor

Beginning Activity Beginning Activity 1: The Greatest Common Divisor

1.

Explain what it means to say that a nonzero integer \(m\) divides an integer \(n\text{.}\) Recall that we use the notation \(m \mid n\) to indicate that the nonzero integer \(m\) divides the integer \(n\text{.}\)

2.

Let \(m\) and \(n\) be integers with \(m \ne 0\text{.}\) Explain what it means to say that \(m\) does not divide \(n\text{.}\)

Definition.

Let \(a\) and \(b\) be integers, not both 0. A common divisor of \(a\) and \(b\) is any nonzero integer that divides both \(a\) and \(b\text{.}\) The largest natural number that divides both \(a\) and \(b\) is called the greatest common divisor of \(a\) and \(b\text{.}\) The greatest common divisor of \(a\) and \(b\) is denoted by \(\gcd \left( {a, b} \right)\text{.}\)

3.

Use the roster method to list the elements of the set that contains all the natural numbers that are divisors of 48.

4.

Use the roster method to list the elements of the set that contains all the natural numbers that are divisors of 84.

5.

Determine the intersection of the two sets in Exercise 3 and Exercise 4. This set contains all the natural numbers that are common divisors of 48 and 84.

6.

What is the greatest common divisor of 48 and 84?

7.

Use the method suggested in Exercise 3 through Exercise 6 to determine each of the following: \(\gcd( {8, - 12})\text{,}\) \(\gcd( {0, 5} )\text{,}\) \(\gcd( {8, 27} )\text{,}\) and \(\gcd( {14, 28})\text{.}\)

8.

If \(a\) and \(b\) are integers, make a conjecture about how the common divisors of \(a\) and \(b\) are related to the greatest common divisor of \(a\) and \(b\text{.}\)

Beginning Activity Beginning Acivity 2: The GCD and the Division Algorithm

When we speak of the quotient and the remainder when we “divide an integer \(a\) by the positive integer \(b\text{,}\)” we will always mean the quotient \(q\) and the remainder \(r\) guaranteed by the Division Algorithm. (See Section 3.5, The Division Algorithm.)

1.

Each row in the following table contains values for the integers \(a\) and \(b\text{.}\) In this table, the value of \(r\) is the remainder (from the Division Algorithm) when \(a\) is divided by \(b\text{.}\) Complete each row in this table by determining \(\gcd( {a, b} )\text{,}\) \(r\text{,}\) and \(\gcd( {b, r} )\text{.}\)

\(a\) \(b\) \(\gcd(a, b)\) Remainder \(r\) \(\gcd(b,r)\)
44 12
75 21
50 33

2.

Formulate a conjecture based on the results of the table in Exercise 1.

Subsection The System of Integers

Number theory is a study of the system of integers, which consists of the set of integers, \(\mathbb{Z} = \left\{ \ldots , - 3, - 2, - 1, 0, 1, 2, 3, \ldots \right\}\) and the various properties of this set under the usual operations of addition and multiplication and under the usual ordering relation of “less than.” The properties of the integers in Table 8.1 will be considered axioms in this text.

We will also assume the properties of the integers shown in Table 8.2. These properties can be proven from the properties in Table 8.1. (However, we will not do so here.)

Table 8.1. Axioms for the Integers
For all integers \(a, b,\) and \(c\text{:}\)
Closure Proporties for Addition and
Multiplication
\(a + b \in \mathbb{Z}\) and \(ab \in \mathbb{Z}\)
Commutative Properties for Addition
and Multiplication
\(a + b = b + a\text{,}\) and \(ab = ba\)
Associative Properties for Addition
and Multiplication
\(\left( {a + b} \right) + c = a + \left( {b + c} \right)\) and
\(\left( {ab} \right)c = a\left( {bc} \right)\)
Distributive Properties of Multiplication
over Addition
\(a\left( {b + c} \right) = ab + ac\text{,}\) and
\(\left( {b + c} \right)a = ba + ca\)
Additive and Multiplicative
Identity Properties
\(a + 0 = 0 + a = a\text{,}\) and
\(a \cdot 1 = 1 \cdot a = a\)
Additive Inverse Property \(a + \left( { - a} \right) = \left( { - a} \right) + a = 0\)
Table 8.2. Properties of the Integers
Zero Property of Multiplication If \(a \in \mathbb{Z}\text{,}\) then \(a \cdot 0 = 0 \cdot a = 0\text{.}\)
Cancellation Properties of
Addition and Multiplication
If \(a, b, c \in \mathbb{Z}\) and \(a + b = a + c\text{,}\) then \(b = c\text{.}\)
If \(a, b, c \in \mathbb{Z}\text{,}\) \(a \ne 0\) and \(ac = bc\text{,}\) then \(b = c\text{.}\)

We have already studied a good deal of number theory in this text in our discussion of proof methods. In particular, we have studied even and odd integers, divisibility of integers, congruence, and the Division Algorithm. See the summary Section 3.7 for a summary of results concerning even and odd integers as well as results concerning properties of divisors. We reviewed some of these properties and the Division Algorithm in the beginning activities.

Subsection The Greatest Common Divisor

One of the most important concepts in elementary number theory is that of the greatest common divisor of two integers. The definition for the greatest common divisor of two integers (not both zero) was given in Beginning Activity 1.

  1. If \(a, b \in \mathbb{Z}\) and \(a\) and \(b\) are not both 0, and if \(d \in \mathbb{N}\text{,}\) then \(d = \gcd( {a, b} )\) provided that it satisfies all of the following properties:

    • \(d \mid a\) and \(d \mid b\text{.}\) That is, \(d\) is a common divisor of \(a\) and \(b\text{.}\)

    • If \(k\) is a natural number such that \(k \mid a\) and \(k \mid b\text{,}\) then \(k \leq d\text{.}\) That is, any other common divisor of \(a\) and \(b\) is less than or equal to \(d\text{.}\)

  2. Consequently, a natural number \(d\) is not the greatest common divisor of \(a\) and \(b\) provided that it does not satisfy at least one of these properties. That is, \(d\) is not equal to \(\gcd( {a, b} )\) provided that

    • \(d\) does not divide \(a\) or \(d\) does not divide \(b\text{;}\) or

    • There exists a natural number \(k\) such that \(k \mid a\) and \(k \mid b\) and \(k > d\text{.}\)

    This means that \(d\) is not the greatest common divisor of \(a\) and \(b\) provided that it is not a common divisor of \(a\) and \(b\) or that there exists a common divisor of \(a\) and \(b\) that is greater than \(d\text{.}\)

In the beginning activities, we determined the greatest common divisors for several pairs of integers. The process we used was to list all the divisors of both integers, then list all the common divisors of both integers and, finally, from the list of all common divisors, find the greatest (largest) common divisor. This method works reasonably well for small integers but can get quite cumbersome if the integers are large. Before we develop an efficient method for determining the greatest common divisor of two integers, we need to establish some properties of greatest common divisors.

One property was suggested in Beginning Activity 1. If we look at the results in Exercise 7 of that beginning activity, we should observe that any common divisor of \(a\) and \(b\) will divide \(\gcd( {a, b} )\text{.}\) In fact, the primary goals of the remainder of this section are

  1. To find an efficient method for determining \(\gcd( {a, b} )\text{,}\) where \(a\) and \(b\) are integers.

  2. To prove that the natural number \(\gcd( {a, b} )\) is the only natural number \(d\) that satisfies the following properties:

    • \(d\) divides \(a\) and \(d\) divides \(b\text{;}\) and

    • if \(k\) is a natural number such that \(k \mid a\) and \(k \mid b\text{,}\) then \(k \mid d\text{.}\)

The second goal is only slightly different from the definition of the greatest common divisor. The only difference is in the second condition where \(k \leq d\) is replaced by \(k \mid d\text{.}\)

We will first consider the case where \(a\) and \(b\) are integers with \(a \ne 0\) and \(b > 0\text{.}\) The proof of the result stated in the second goal contains a method (called the Euclidean Algorithm) for determining the greatest common divisor of the two integers \(a\) and \(b\text{.}\) The main idea of the method is to keep replacing the pair of integers \(\left( {a, b} \right)\) with another pair of integers \(\left( {b, r} \right)\text{,}\) where \(0 \leq r \lt b\) and \(\gcd ( {b, r} ) = \gcd ( {a, b} )\text{.}\) This idea was explored in Beginning Activity 2. Lemma 8.3 is a conjecture that could have been formulated in Beginning Activity 2.

Proof.

Let \(c\) and \(d\) be integers, not both equal to zero. Assume that \(q\) and \(r\) are integers such that \(c = d \cdot q + r\text{.}\) For ease of notation, we will let

\begin{equation*} m = \gcd( {c, d} )\text{ and } n = \gcd( {d, r} )\text{.} \end{equation*}

Now, \(m\) divides \(c\) and \(m\) divides \(d\text{.}\) Consequently, there exist integers \(x\) and \(y\) such that \(c = mx\) and \(d = my\text{.}\) Hence,

\begin{align*} r \amp = c - d \cdot q\\ r \amp = mx - ( {my} )q\\ r \amp = m ( {x - yq} )\text{.} \end{align*}

But this means that \(m\) divides \(r\text{.}\) Since \(m\) divides \(d\) and \(m\) divides \(r\text{,}\) \(m\) is less than or equal to \(\gcd( {d, r} )\text{.}\) Thus, \(m \leq n\text{.}\)

Using a similar argument, we see that \(n\) divides \(d\) and \(n\) divides \(r\text{.}\) Since \(c = d \cdot q + r\text{,}\) we can prove that \(n\) divides \(c\text{.}\) Hence, \(n\) divides \(c\) and \(n\) divides \(d\text{.}\) Thus, \(n \leq \gcd( {c, d} )\) or \(n \leq m\text{.}\) We now have \(m \leq n\) and \(n \leq m\text{.}\) Hence, \(m = n\) and \(\gcd( {c, d} ) = \gcd( {d, r} )\text{.}\)

Progress Check 8.4. Illustrations of Lemma 8.3.

We completed several examples illustrating Lemma 8.3 in Beginning Activity 2. For another example, let \(c = 56\) and \(d = 12\text{.}\) The greatest common divisor of 56 and 12 is 4.

(a)

According to the Division Algorithm, what is the remainder \(r\) when 56 is divided by 12?

Solution.

The remainder is 8.

(b)

What is the greatest common divisor of 12 and the remainder \(r\text{?}\)

Solution.

\(\gcd(12, 8) = 4\)

(c)

The key to finding the greatest common divisor (in more complicated cases) is to use the Division Algorithm again, this time with 12 and \(r\text{.}\) We now find integers \(q_2 \text{ and } r_2\) such that

\begin{equation*} 12 = r \cdot q_2 + r_2\text{.} \end{equation*}

What is the greatest common divisor of \(r\) and \(r_2\text{?}\)

Solution.

\(12 = 8 \cdot 1 + 4\) and \(\gcd(r, r_2) = \gcd(8, 4) = 4\)

Subsection The Euclidean Algorithm

The example in Progress Check 8.4 illustrates the main idea of the Euclidean Algorithm for finding \(\gcd( {a, b} )\text{,}\) which is explained in the proof of the following theorem.

Proof.

Let \(a\) and \(b\) be integers with \(a \ne 0\) and \(b > 0\text{,}\) and let \(d = \gcd( {a, b} )\text{.}\) By the Division Algorithm, there exist integers \(q_1\) and \(r_1\) such that

\begin{equation} a = b \cdot q_1 + r_1 \text{ , and } 0 \leq r_1 \lt b\text{.}\tag{67} \end{equation}

If \(r_1 = 0\text{,}\) then equation (67) implies that \(b\) divides \(a\text{.}\) Hence, \(b = d = \gcd( {a, b} )\) and this number satisfies Condition a and Condition b.

If \(r_1 > 0\text{,}\) then by Lemma 8.3, \(\gcd( {a, b} ) = \gcd( {b, r_1 } )\text{.}\) We use the Division Algorithm again to obtain integers \(q_2\) and \(r_2\) such that

\begin{equation} b = r_1 \cdot q_2 + r_2 \text{ , and } 0 \leq r_2 \lt r_1\text{.}\tag{68} \end{equation}

If \(r_2 = 0\text{,}\) then equation (68) implies that \(r_1\) divides \(b\text{.}\) This means that \(r_1 = \gcd( {b, r_1 } )\text{.}\) But we have already seen that \(\gcd( {a, b} ) = \gcd( {b, r_1 } )\text{.}\) Hence, \(r_1 = \gcd( {a, b} )\text{.}\) In addition, if \(k\) is an integer that divides both \(a\) and \(b\text{,}\) then, using equation (67), we see that \(r_1 = a - b \cdot q_1\) and, hence \(k\) divides \(r_1\text{.}\) This shows that \(r_1 = \gcd( {a, b} )\) satisfies Condition a and Condition b.

If \(r_2 > 0\text{,}\) then by Lemma 8.3, \(\gcd( {b, r_1 } ) = \gcd( {r_1 , r_2 } )\text{.}\) But we have already seen that \(\gcd( {a, b} ) = \gcd( {b, r_1 } )\text{.}\) Hence, \(\gcd( {a, b} ) = \gcd( {r_1 , r_2 } )\text{.}\) We now continue to apply the Division Algorithm to produce a sequence of pairs of integers (all of which have the same greatest common divisor). This is summarized in the following table:

Original Pair Equation from
Division Algorithm
Inequality from
Division Algorithm
New Pair
\(\left( {a, b} \right)\) \(a = b \cdot q_1 + r_1\) \(0 \leq r_1 \lt b\) \(\left( {b, r_1 } \right)\)
\(\left( {b, r_1 } \right)\) \(b = r_1 \cdot q_2 + r_2\) \(0 \leq r_2 \lt r_1\) \(\left( {r_1 , r_2 } \right)\)
\(\left( {r_1 , r_2 } \right)\) \(r_1 = r_2 \cdot q_3 + r_3\) \(0 \leq r_3 \lt r_2\) \(\left( {r_2 , r_3 } \right)\)
\(\left( {r_2 , r_3 } \right)\) \(r_2 = r_3 \cdot q_4 + r_4\) \(0 \leq r_4 \lt r_3\) \(\left( {r_3 , r_4 } \right)\)
\(\left( {r_3 , r_4 } \right)\) \(r_3 = r_4 \cdot q_5 + r_5\) \(0 \leq r_5 \lt r_4\) \(\left( {r_4 , r_5 } \right)\)
\(\vdots\) \(\vdots\) \(\vdots\) \(\vdots\)

From the inequalities in the third column of this table, we have a strictly decreasing sequence of nonnegative integers \(\left( {b > r_1 > r_2 > r_3 > r_4 \cdots } \right)\text{.}\) Consequently, a term in this sequence must eventually be equal to zero. Let \(p\) be the smallest natural number such that \(r_{p + 1} = 0\text{.}\) This means that the last two rows in the preceding table will be

Original Pair Equation from
Division Algorithm
Inequality from
Division Algorithm
New Pair
\(\left( {r_{p - 2} , r_{p - 1} } \right)\) \(r_{p - 2} = r_{p - 1} \cdot q_p + r_p\) \(0 \leq r_p \lt r_{p - 1}\) \(\left( {r_{p - 1} , r_p } \right)\)
\(\left( {r_{p - 1} , r_p } \right)\) \(r_{p - 1} = r_p \cdot q_{p + 1} + 0\)

Remember that this table was constructed by repeated use of Lemma 8.3 and that the greatest common divisor of each pair of integers produced equals \(\gcd( {a, b} )\text{.}\) Also, the last row in the table indicates that \(r_p\) divides \(r_{p - 1}\text{.}\) This means that \(\gcd( {r_{p - 1} , r_p } ) = r_p\) and hence \(r_p = \gcd( {a, b} )\text{.}\)

This proves that \(r_p = \gcd( {a, b} )\) satisfies Condition a of this theorem. Now assume that \(k\) is an integer such that \(k\) divides \(a\) and \(k\) divides \(b\text{.}\) We proceed through the table row by row. First, since \(r_1 = a - b \cdot q\text{,}\) we see that \(k\) must divide \(r_1\text{.}\) The second row tells us that \(r_2 = b - r_1 \cdot q_2\text{.}\) Since \(k\) divides \(b\) and \(k\) divides \(r_1\text{,}\) we conclude that \(k\) divides \(r_2\text{.}\) Continuing with each row, we see that \(k\) divides each of the remainders \(r_1\text{,}\) \(r_2\text{,}\) \(r_3\text{,}\) \(\ldots, r_p\text{.}\) This means that \(r_p = \gcd( {a, b} )\) satisfies Condition b of the theorem.

Progress Check 8.6.

(a)

Use the Euclidean Algorithm to determine \(\gcd( {180, 126} )\text{.}\) Notice that we have deleted the third column (Inequality from Division Algorithm) from the following table. It is not needed in the computations.

Original Pair Equation from
Division Algorithm
New Pair
\(\left( {180, 126} \right)\) \(180 = 126 \cdot 1 + 54\) \(\left( {126, 54} \right)\)
\(\left( {126, 54} \right)\) \(126 =\)
     

Consequently, \(\gcd( {180, 126} ) = \) .

Solution.

Original Pair Equation from
Division Algorithm
New Pair
\(\left( {180, 126} \right)\) \(180 = 126 \cdot 1 + 54\) \(\left( {126, 54} \right)\)
\(\left( {126, 54} \right)\) \(126 = 54 \cdot 2 + 18\) \(\left( {54, 18} \right)\)
\(\left( {54, 18} \right)\) \(54 = 18 \cdot 3 + 0\)

Consequently, \(\gcd( {180, 126} ) = 18\text{.}\)

(b)

Use the Euclidean Algorithm to determine \(\gcd( {4208, 288} )\text{.}\)

Original Pair Equation from
Division Algorithm
New Pair
\(\left( {4208, 288} \right)\) \(4208 = 288 \cdot 14 + 176\) \(\left( {288, \qquad} \right)\)
     

Consequently, \(\gcd( {4208, 288} ) = \) .

Solution.

Original Pair Equation from
Division Algorithm
New Pair
\(\left( {4208, 288} \right)\) \(4208 = 288 \cdot 14 + 176\) \(\left( {288, 176} \right)\)
\(\left( {288, 176} \right)\) \(288 = 176 \cdot 1 + 112\) \(\left( {112, 64} \right)\)
\(\left( {112, 64} \right)\) \(112 = 64 \cdot 1 + 48\) \(\left( {64, 48} \right)\)
\(\left( {64, 48} \right)\) \(64 = 48 \cdot 1 + 16\) \(\left( {48, 16} \right)\)
\(\left( {48, 16} \right)\) \(48 = 16 \cdot 3 + 0\)

Consequently, \(\gcd( {4208, 288} ) = 16\)

Subsection Some Remarks about Theorem 8.5

Theorem 8.5 was proven with the assumptions that \(a, b \in \mathbb{Z}\) with \(a \ne 0\) and \(b > 0\text{.}\) A more general version of this theorem can be proven with \(a, b \in \mathbb{Z}\) and \(b \ne 0\text{.}\) This can be proven using Theorem 8.5 and the results in the following lemma.

The proofs of these results are in Exercise 4. An application of this result is given in the next example.

Example 8.8. Using the Euclidean Algorithm.

Let \(a = 234\) and \(b = - 42\text{.}\) We will use the Euclidean Algorithm to determine \(\gcd( {234, 42} )\text{.}\)

Step Original Pair Equation from
Division Algorithm
New Pair
1 \(\left( {234, 42} \right)\) \(234 = 42 \cdot 5 + 24\) \(\left( {42, 24} \right)\)
2 \(\left( {42, 24} \right)\) \(42 = 24 \cdot 1 + 18\) \(\left( {24, 18} \right)\)
3 \(\left( {24, 18} \right)\) \(24 = 18 \cdot 1 + 6\) \(\left( {18, 6} \right)\)
4 \(\left( {18, 6} \right)\) \(18 = 6 \cdot 3\)

So \(\gcd( {234, 42} ) = 6\) and hence \(\gcd( {234, - 42} ) = 6\text{.}\)

Subsection Writing \(\boldsymbol{\gcd (a, b)}\) in Terms of \(a\) and \(b\)

We will use Example 8.8 to illustrate another use of the Euclidean Algorithm. It is possible to use the steps of the Euclidean Algorithm in reverse order to write \(\gcd( {a, b} )\) in terms of \(a\) and \(b\text{.}\) We will use these steps in reverse order to find integers \(m\) and \(n\) such that \(\gcd( {234, 42} ) = 234m + 42n\text{.}\) The idea is to start with the row with the last nonzero remainder and work backward as shown in the following table:

Explanation Result
First, use the equation in Step 3 to
write 6 in terms of 24 and 18.
\(6 = 24 - 18 \cdot 1\)
Use the equation in Step 2 to write
\(18 = 42 - 24 \cdot 1\text{.}\) Substitute this into
the preceding result and simplify.
\(6 = 24 - 18 \cdot 1\)
\(= 24 - \left( {42 - 24 \cdot 1} \right)\)
\(= 42 \cdot \left( { - 1} \right) + 24 \cdot 2\)
We now have written 6 in terms of
42 and 24. Use the equation in
Step 1 to write \(24 = 234 - 42 \cdot 5\text{.}\)
Substitute this into the preceding
result and simplify
\(6 = 42 \cdot \left( { - 1} \right) + 24 \cdot 2\)
\(= 42 \cdot \left( { - 1} \right) + \left( {234 - 42 \cdot 5} \right) \cdot 2\)
\(= 234 \cdot 2 + 42 \cdot \left( { - 11} \right)\)

Hence, we can write

\begin{equation*} \gcd( {234, 42} ) = 234 \cdot 2 + 42 \cdot ( { - 11} )\text{.} \end{equation*}

(Check this with a calculator.) In this case, we say that we have written \(\gcd( {234, 42} )\) as a linear combination of 234 and 42. More generally, we have the following definition.

Definition.

Let \(a\) and \(b\) be integers. A linear combination of \(a\) and \(b\) is an integer of the form \(ax + by\text{,}\) where \(x\) and \(y\) are integers.

Progress Check 8.9. Writing the gcd as a Linear Combination.

Use the results from Progress Check 8.6 to

(a)

Write \(\gcd( {180, 126} )\) as a linear combination of 180 and 126.

Solution.

From Progress Check 8.6, \(\gcd ( {180, 126} ) = 18\text{.}\)

\begin{align*} 18 \amp = 126 - 54 \cdot 2\\ \amp = 126 - ( {180 - 126} ) \cdot 2\\ \amp = 126 \cdot 3 + 180 \cdot ( { - 2} )\text{.} \end{align*}

So \(\gcd ( {180, 126} ) = 18\text{,}\) and \(18 = 126 \cdot 3 + 180 \cdot ( { - 2} )\text{.}\)

(b)

Write \(\gcd( {4208, 288} )\) as a linear combination of 4208 and 288.

Solution.

From Progress Check 8.6, \(\gcd ( {4208, 288} ) = 16\text{.}\)

\begin{align*} 16 \amp = 64 - 48\\ \amp = 64 - ( {112 - 64} ) = 64 \cdot 2 - 112\\ \amp = ( {176 - 112} ) \cdot 2 - 112 = 176 \cdot 2 - 112 \cdot 3\\ \amp = 176 \cdot 2 - ( {288 - 176} ) \cdot 3 = 176 \cdot 5 - 288 \cdot 3\\ \amp = ( {4208 - 288 \cdot 14} ) \cdot 5 - 288 \cdot 3\\ \amp = 4208 \cdot 5 + 288 \cdot ( { - 73} )\text{.} \end{align*}

So \(\gcd ( {4208, 288} ) = 16\text{,}\) and \(16 = 4208 \cdot 5 + 288 \cdot ( { - 73} )\text{.}\)

The previous example and progress check illustrate the following important result in number theory, which will be used in the next section to help prove some other significant results.

We will not give a formal proof of this theorem. Hopefully, the examples and activities provide evidence for its validity. The idea is to use the steps of the Euclidean Algorithm in reverse order to write \(\gcd( {a, b} )\) as a linear combination of \(a\) and \(b\text{.}\) For example, assume the completed table for the Euclidean Algorithm is

Step Original Pair Equation from
Division Algorithm
New Pair
1 \(\left( {a, b} \right)\) \(a = b \cdot q_1 + r_1\) \(\left( {b, r_1 } \right)\)
2 \(\left( {b, r_1 } \right)\) \(b = r_1 \cdot q_2 + r_2\) \(\left( {r_1 , r_2 } \right)\)
3 \(\left( {r_1 , r_2 } \right)\) \(r_1 = r_2 \cdot q_3 + r_3\) \(\left( {r_2 , r_3 } \right)\)
4 \(\left( {r_2 , r_3 } \right)\) \(r_2 = r_3 \cdot q_4 + 0\)

We can use Step 3 to write \(r_3 = \gcd( {a, b} )\) as a linear combination of \(r_1\) and \(r_2\text{.}\) We can then solve the equation in Step 2 for \(r_2\) and use this to write \(r_3 = \gcd( {a, b} )\) as a linear combination of \(r_1\) and \(b\text{.}\) We can then use the equation in Step 1 to solve for \(r_1\) and use this to write \(r_3 = \gcd( {a, b} )\) as a linear combination of \(a\) and \(b\text{.}\)

In general, if we can write \(r_p = \gcd( {a, b} )\) as a linear combination of a pair in a given row, then we can use the equation in the preceding step to write \(r_p = \gcd( {a, b} )\) as a linear combination of the pair in this preceding row.

The notational details of this induction argument get quite involved. Many mathematicians prefer to prove Theorem 8.10 using a property of the natural numbers called the Well-Ordering Principle. The Well-Ordering Principle for the natural numbers states that any nonempty set of natural numbers must contain a least element. It can be proven that the Well-Ordering Principle is equivalent to the Principle of Mathematical Induction.

Exercises Exercises

1.

Find each of the following greatest common divisors by listing all of the positive common divisors of each pair of integers.

(a)

\(\gcd( {21, 28} )\)

Answer.

The set of positive common divisors of 21 and 28 is \(\{1, 7\}\text{.}\) So \(\gcd ( {21, 28} ) = 7\text{.}\)

(b)

\(\gcd( { - 21, 28} )\)

Answer.

The set of positive common divisors of \(-21\) and 28 is \(\{1, 7\}\text{.}\) So \(\gcd ( { - 21, 28} ) = 7\text{.}\)

(c)

\(\gcd( {58, 63} )\)

Answer.

The set of positive common divisors of 58 and 63 is \(\{1 \}\text{.}\) So \(\gcd ( {58, 63} ) = 1\text{.}\)

(d)

\(\gcd( {0, 12} )\)

Answer.

The set of positive common divisors of 0 and 12 is \(\{1, 2, 3, 4, 6, 12 \}\text{.}\) So \(\gcd ( {0, 12} ) = 12\text{.}\)

(e)

\(\gcd( {110, 215} )\)

(f)

\(\gcd( {110, - 215} )\)

2.

Complete the following.

(a)

Let \(a \in \Z\) and let \(k \in \Z\) with \(k \ne 0\text{.}\) Prove that if \(k \mid a\) and \(k \mid \left( {a + 1} \right)\text{,}\) then \(k \mid 1\text{,}\) and hence \(k = \pm 1\text{.}\)

Hint.

Prove that \(k \mid \left[ ( {a+1} ) - a \right]\text{.}\)

(b)

Let \(a \in \mathbb{Z}\text{.}\) Find the greatest common divisor of the consecutive integers \(a\) and \(a + 1\text{.}\) That is, determine \(\gcd( {a, a + 1} )\text{.}\)

3.

Complete the following.

(a)

Let \(a \in \Z\) and let \(k \in \Z\) with \(k \ne 0\text{.}\) Prove that if \(k \mid a\) and \(k \mid \left( {a + 2} \right)\text{,}\) then \(k \mid 2\text{.}\)

(b)

Let \(a \in \mathbb{Z}\text{.}\) What conclusions can be made about the greatest common divisor of \(a\) and \(a + 2\text{?}\)

4.

Let \(a, b \in \mathbb{Z}\) with \(b \ne 0\text{.}\) Prove each of the following:

(a)

\(\gcd( {0, b} ) = \left| b \right|\)

Answer.

\(|b|\) is the largest natural number that divides 0 and \(b\text{.}\)

(b)

If \(\gcd( {a, b} ) = d\text{,}\) then \(\gcd( {a, - b} ) = d\text{.}\) That is, \(\gcd \left( {a, - b} \right) = \gcd( {a, b} )\text{.}\)

Answer.

The integers \(b\) and \(-b\) have the same divisors. Therefore, \(\gcd ( a, -b ) = \gcd ( a, b )\text{.}\)

5.

For each of the following pairs of integers, use the Euclidean Algorithm to find \(\gcd( {a, b} )\) and to write \(\gcd( {a, b} )\) as a linear combination of \(a\) and \(b\text{.}\) That is, find integers \(m\) and \(n\) such that \(d = am + bn\text{.}\)

(a)

\(a = 36, b = 60\)

Answer.

\(\gcd ( {36, 60} ) = 12\text{,}\) \(12 = 36 \cdot 2 + 60 \cdot ( { - 1} )\)

(b)

\(a = 901, b = 935\)

Answer.

\(\gcd ( {901, 935} ) = 17\text{,}\) \(17 = 901 \cdot 27 + 935 \cdot ( { - 26} )\)

(c)

\(a = 72, b = 714\)

(d)

\(a = 12628, b = 21361\)

(e)

\(a = 901\text{,}\) \(b = -935\)

Answer.

\(\gcd ( {901, -935} ) = 17\text{,}\) \(17 = 901 \cdot 27 + (-935) \cdot ( { 26} )\)

(f)

\(a = -36\text{,}\) \(b = -60\)

6.

Complete the following.

(a)

Find integers \(u\) and \(v\) such that \(9u + 14v = 1\) or explain why it is not possible to do so. Then find integers \(x\) and \(y\) such that \(9x + 14y = 10\) or explain why it is not possible to do so.

Answer.

One possibility is \(u = -3\) and \(v = 2\text{.}\) In this case, \(9u + 14v = 1\text{.}\) We then multiply both sides of this equation by 10 to obtain

\begin{equation*} 9 \cdot (-30) + 14 \cdot 20 = 10\text{.} \end{equation*}

So we can use \(x = -30\) and \(y = 20\text{.}\)

(b)

Find integers \(x\) and \(y\) such that \(9x + 15y = 10\) or explain why it is not possible to do so.

(c)

Find integers \(x\) and \(y\) such that \(9x + 15y = 3162\) or explain why it is not possible to do so.

7.

Complete the following.

(a)

Notice that \(\gcd( {11, 17} ) = 1\text{.}\) Find integers \(x\) and \(y\) such that \(11x + 17y = 1\text{.}\)

Answer.

\(11 \cdot (-3) + 17 \cdot 2 = 1\)

(b)

Let \(m, n \in \mathbb{Z}\text{.}\) Write the sum \(\dfrac{m}{{11}} + \dfrac{n}{{17}}\) as a single fraction.

Answer.

\(\dfrac{m}{11} + \dfrac{n}{17} = \dfrac{17m +11n}{187}\)

(c)

Find two rational numbers with denominators of 11 and 17, respectively , whose sum is equal to \(\dfrac{{10}}{{187}}\text{.}\)

Hint.

Write the rational numbers in the form \(\dfrac{m}{{11}}\) and \(\dfrac{n}{{17}}\text{,}\) where \(m, n \in \mathbb{Z}\text{.}\) Then write

\begin{equation*} \frac{m}{{11}} + \frac{n}{{17}} = \frac{{10}}{{187}}\text{.} \end{equation*}

Use Task 7.a and Task 7.b to determine \(m\) and \(n\text{.}\)

(d)

Find two rational numbers with denominators 17 and 21, respectively, whose sum is equal to \(\dfrac{326}{357}\) or explain why it is not possible to do so.

(e)

Find two rational numbers with denominators 9 and 15, respectively, whose sum is equal to \(\dfrac{10}{225}\) or explain why it is not possible to do so.

Activity 47. Linear Combinations and the Greatest Common Divisor.

(a)

Determine the greatest common divisor of 20 and 12.

(b)

Let \(d = \gcd( {20, 12} )\text{.}\) Write \(d\) as a linear combination of 20 and 12.

(c)

Generate at least six different linear combinations of 20 and 12. Are these linear combinations of 20 and 12 multiples of \(\gcd( {20, 12} )\text{?}\)

(d)

Determine the greatest common divisor of 21 and \(-6\) and then generate at least six different linear combinations of 21 and \(-6\text{.}\) Are these linear combinations of 21 and \(-6\) multiples of \(\gcd( {21, -6} )\text{?}\)

(e)

The following proposition was first introduced in Activity 30 in Section 5.2. Complete the proof of this proposition if you have not already done so.

Proposition 5.22: Let a, b, and t be integers with \(t \ne 0\text{.}\) If t divides a and t divides b, then for all integers x and y, t divides \text{(} ax + by\text{)} .

Proof. Let \(a\text{,}\) \(b\text{,}\) and \(t\) be integers with \(t \ne 0\text{,}\) and assume that \(t\) divides \(a\) and \(t\) divides \(b\text{.}\) We will prove that for all integers \(x\) and \(y\text{,}\) \(t\) divides \((ax + by)\text{.}\) So let \(x \in \mathbb{Z}\) and let \(y \in \mathbb{Z}\text{.}\) Since \(t\) divides \(a\text{,}\) there exists an integer \(m\) such that \(\ldots \text{.}\)

(f)

Now let \(a\) and \(b\) be integers, not both zero, and let \(d = \gcd(a, b )\text{.}\) Theorem 8.10 states that \(d\) is a linear combination of \(a\) and \(b\text{.}\) In addition, let \(S\) and \(T\) be the following sets:

\begin{equation*} S = \left\{ ax + by \mid x, y \in \Z \right\} \qquad \text{ and } \qquad T = \left\{ kd \mid k \in \Z \right\}\!\text{.} \end{equation*}

That is, \(S\) is the set of all linear combinations of \(a\) and \(b\text{,}\) and \(T\) is the set of all multiples of the greatest common divisor of \(a\) and \(b\text{.}\) Does the set \(S\) equal the set \(T\text{?}\) If not, is one of these sets a subset of the other set? Justify your conclusions.

In Task 47.c and Task 47.d, we were exploring special cases for these two sets.