Divisibility, GCD &
Euclidean Algorithm
Master the foundations of integer divisibility, learn to compute the greatest common divisor, and wield the Euclidean algorithm with confidence.
What Is Divisibility?
For integers \(a\) and \(b\) with \(a \neq 0\), we say \(a\) divides \(b\) (written \(a \mid b\)) if there exists an integer \(k\) such that:
If no such \(k\) exists, we write \(a \nmid b\). For example: \(3 \mid 12\) because \(12 = 3 \times 4\), but \(5 \nmid 12\) because no integer \(k\) satisfies \(12 = 5k\).
Divisibility on the Number Line
Properties of Divisibility
The Division Algorithm
For any integers \(a\) and \(d\) with \(d > 0\), there exist unique integers \(q\) (quotient) and \(r\) (remainder) such that:
Example: \(a = 37,\; d = 5\). Then \(37 = 5 \cdot 7 + 2\), so \(q = 7\) and \(r = 2\).
Greatest Common Divisor
The greatest common divisor of integers \(a\) and \(b\), written \(\gcd(a, b)\), is the largest positive integer that divides both \(a\) and \(b\).
GCD vs LCM
| \(\gcd(a,b)\) | \(\text{lcm}(a,b)\) | |
|---|---|---|
| Full name | Greatest Common Divisor | Least Common Multiple |
| Definition | Largest \(d\) dividing both | Smallest \(m\) divisible by both |
| Example: \(12, 18\) | 6 | 36 |
| Relationship | \(\gcd(a,b) \cdot \text{lcm}(a,b) = |a \cdot b|\) | |
| Direction | Looks down (divisors) | Looks up (multiples) |
The Euclidean Algorithm
One of the oldest known algorithms (circa 300 BCE). It computes \(\gcd(a, b)\) by repeatedly applying the Division Algorithm.
Repeat until the remainder is \(0\). The last nonzero remainder is the gcd.
Why Does It Work?
Example: \(\gcd(48, 18)\)
Example: \(\gcd(252, 105)\)
Example: \(\gcd(1071, 462)\)
The Extended Euclidean Algorithm
Bezout's Identity guarantees that for any integers \(a, b\), there exist integers \(s, t\) such that:
The extended Euclidean algorithm finds \(s\) and \(t\) by back-substituting through the division steps.
How to Apply the Algorithm
Common Mistakes
Summary: Key Concepts
| Concept | Definition | Notation |
|---|---|---|
| Divisibility | \(b = a \cdot k\) for some integer \(k\) | \(a \mid b\) |
| Division Algorithm | \(a = dq + r\), \(0 \leq r < d\) | \(a \bmod d = r\) |
| GCD | Largest positive common divisor | \(\gcd(a,b)\) |
| Euclidean Alg. | \(\gcd(a,b) = \gcd(b, a \bmod b)\) | Repeat until \(r = 0\) |
| Bezout's Identity | \(\gcd(a,b) = as + bt\) | Extended algorithm |
Question 1 of 5
Which of the following correctly states that \(7\) divides \(42\)?
Question 2 of 5
Using the Euclidean algorithm, what is \(\gcd(84, 36)\)?
Question 3 of 5
When applying the Division Algorithm to \(a = 97\) and \(d = 11\), what are \(q\) and \(r\)?
Question 4 of 5
If \(\gcd(a, b) = 1\), the integers \(a\) and \(b\) are called:
Question 5 of 5
Bezout's Identity says \(\gcd(a,b) = as + bt\). For \(a = 48, b = 18\), we found \(\gcd = 6\). Which coefficients \((s, t)\) satisfy \(6 = 48s + 18t\)?