The first definition in this section concerns numbers which divide two given numbers.
Let . We say that is a common factor (or a common divisor) of and if divides both and .
In other words, the set of common factors of and is the intersection of the sets of factors of and .
The sets of factors of and are
thus the set of common factors of and is
If and are not both zero, the set of common factors of and is clearly non-empty (as it contains ) and bounded above (by if , and by otherwise), so it has a largest element. We may therefore make the following definition.
Given , not both zero, the largest element of the set of common factors of and is called their highest common factor (or greatest common divisor), abbreviated hcf; we denote it by .
From the set of common factors of and above, we have
If , then we say that and are coprime.
The set of factors of is . From above we see that the only common factors of and are ; thus , and and are coprime.
Let , and suppose that is a common factor of and such that every other common factor of and is a factor of . Then is the highest common factor of and .
Proof. By the assumptions, is a common factor of and , and for any other common factor of and , we have , so that . Hence .
We next give an important definition.
An (integral) linear combination of two integers and is an integer which can be written in the form for some .
The number is an integral linear combination of and because
Note that there is no uniqueness about the coefficients and in this definition; it is quite possible for different choices of and to give the same integer . Indeed,
so setting and , we also have .
We have , but we can also write
It is easy to see how divisibility relates to integral linear combinations.
Let , and suppose that is a common factor of and . Then is a factor of every integral linear combination of and .
We have and ; so by the previous example we should have (which is true as ).
Proof. Suppose that and for some , and let be an integral linear combination of and , so that for some . Then we have
and the result follows.
Let , and suppose that is a common factor of and which is also an integral linear combination of and . Then .
Since and , and , we must have (which is clear from the set of factors of already given, as and ).
Proof. Since is an integral linear combination of and , Lemma 4.2.13 implies that every common factor of and is a factor of . Hence by Lemma 4.2.8.
Our next result, called Bézout’s Theorem, will have a number of important consequences. In its proof we shall make use of the elementary fact that any non-empty set of natural numbers contains a smallest element. (This is obvious; we may simply count upwards from until an element of the set is reached.)
Let . Then is the smallest natural number which is an integral linear combination of and .
We have , and we may write . The numbers cannot be written as integral linear combinations of and .
Proof. Let be the set of natural numbers which are integral linear combinations of and ; that is,
We see that is non-empty because it contains , so it has a smallest element . Thus we have for some . We shall prove that , which will give the result.
To see that , we use Theorem 4.1.8 to write with and . Then
so if we would have , contrary to the minimality of . Hence we must have , and therefore , i.e., .
A similar argument shows that , and so is a common factor of and .
We already know that is an integral linear combination of and , and hence Corollary 4.2.15 shows that .
Let . Then and are coprime if and only if there exist such that .
As , the numbers and must be coprime (as we have seen).
Proof. ‘‘’’. Suppose that . Then is an integral linear combination of and by Theorem 4.2.17.
‘‘’’. Suppose that is an integral linear combination of and . Since no natural number is smaller than , Theorem 4.2.17 implies that .