CURIUM
How do you find the largest number that divides both 20 and 30?

Greatest common divisor

How do you find the largest number that divides both 20 and 30?

List their common divisors: 1, 2, 5 and 10. The largest is 10, which is the GCD of 20 and 30. The list is always finite because a divisor never exceeds the number it divides, and always non-empty because 1 divides everything. A greatest element therefore always exists.

MathsArithmetic and numbers

The three levels

Beginner

How do you find the largest number that divides both 20 and 30?

List their common divisors: 1, 2, 5 and 10. The largest is 10, which is the GCD of 20 and 30. The list is always finite because a divisor never exceeds the number it divides, and always non-empty because 1 divides everything. A greatest element therefore always exists.

Intermediate

Why is −3 also a GCD of 6 and 9?

Because the definition that generalises speaks not of size but of divisibility: a GCD of a and b is a common divisor d such that every other common divisor divides d. Every common divisor of 6 and 9 divides 3, and therefore also divides −3. For integers, we conventionally take the positive GCD, which coincides with the largest in the usual sense, except in the case GCD(0, 0).

Expert

Do two numbers always have a GCD?

Not in every ring. In ℤ[i√3], the elements 4 and 2 + 2i√3 have 2 and 1 + i√3 as common divisors, but no element divisible by both 2 and 1 + i√3 divides both of them: they have no GCD. Existence is guaranteed in factorial rings, and rings where it holds for every pair are called GCD domains.