Notation Given integers and , not both zero, we write or for the greatest common divisor of and .

Example 1.1.1

Very inefficiently—the positive divisors of 12 are 1, 2, 3, 4, 6 and 12, so = 4

Is there a more efficient way to do this?

Example 1.1.2

Suppose we want to find . We have

So the gcd is 2.

We may assume that since

  1. Put and
  2. Use the division algorithm to find such that and
  3. If then
  4. If , then set and , and repeat the process

Example 1.1.3

Euclid’s algorithm can be run backwards to express the gcd as a linear combination of the two numbers. This is called the extended Euclidean algorithm
We have

This gives a practical way to establish the fundamental result below

Multi

Lemma 1.1.4 (Bezout’s Lemma)

Let and be integers, not both zero. Then there exist such that

Corollary 1.15

Let and be integers, not both zero, and let . Then divides and if and only if