Skip to main content
Logo image

Section 2.2 The Greatest Common Divisor

It seems intuitive that of all the numbers dividing a number (the divisors of the number), one is biggest. We can carry that idea to two numbers.

Definition 2.2.1. Common Divisors.

If we consider the various divisors of two numbers \(a\) and \(b\text{,}\) we say that \(d\) is a common divisor of \(a\) and \(b\) if \(d\mid a\) and \(d\mid b\text{.}\) If \(d\) is the biggest such common divisor, it is called the greatest common divisor, or gcd, of \(a\) and \(b\text{,}\) written \(d=\gcd(a,b)\text{.}\)

Example 2.2.2.

What are all the common divisors of 6 and 10? What is their gcd?

Remark 2.2.3.

What is the greatest common divisor of zero and zero? By definition, there is none (or it is infinity?). Some authors (such as [E.2.1]) simply don’t allow this case at all; others (like [E.2.4]) define it to be zero without further comment. As for computation, both SageMath 1  and Wolfram Alpha 2  apparently compute it to be zero (perhaps by The Euclidean Algorithm), while one online calculator 3  throws an error.
This text chooses to remain agnostic on this point. However, ring theory and lattice theory both allow for an alternate definition which naturally yields zero as the answer; either consult an abstract algebra text, or see all the answers to this question at Mathematics StackExchange 4  for some good fireside reading after you do your homework for this section.
We now come to a great definition-theorem.
This is amazing, and the first real indication of the power of having multiple perspectives on a problem. It means that the very theoretical issue of when a gcd exists (and finding it) can be treated as a purely computational problem, completely independent of finding divisors in the usual sense. And further, there is a definition purely in terms of addition and multiplication, nothing more complex.
If you need to actually calculate a gcd, you use the algorithm. If you want to prove something about it that has to do with dividing, you use the original definition. And if you need to prove something about it where division is hard to use, you use the third characterization. This sort of idea will come up again and again in this book – that having multiple ways to define something really helps.,0)