For every integer the multiples form a subgroup of (Example 2.1.3), and is the cyclic subgroup . Are there any other subgroups of ? The answer gives the greatest common divisor of two integers a new description, and with it the rule behind the units mod (Example 1.3.4): modulo they are , and modulo they are .
Every subgroup of is cyclic
The proof uses division with remainder (each integer is with , for a positive integer ) and one consequence of induction: every non-empty set of positive integers has a least element.
Every subgroup of is for exactly one integer . If , then is the least positive element of .
Proof.¶
Idea. The least positive element of divides every element of , because the remainder on dividing by lies in and is smaller than .
-
If , then . Otherwise has a least positive element .
If , then contains some , and also by Inverses, and one of and is positive. So the positive elements of form a non-empty set, and it has a least element .
-
.
is the smallest subgroup of containing (Definition 2.2.2).
-
. So , with the least positive element of .
Let , and divide it by : with . Here , so lies in by Inverses and Closure. Since and is the least positive element of , the remainder is not positive. So , and .
-
The integer with is unique.
The subgroup is different from every with , which contains . And if with , then and are both the least positive element of the same set, so .
In one generator is always enough: the smallest subgroup containing both and is , all the multiples of a single number.
1
The integers divisible by both and form a subgroup of . Which is it?
-
is divisible by both and , and it is not a multiple of .
-
is not divisible by . Being divisible by both and is a stronger condition than being divisible by their common factor .
-
The least positive element of is , since the only smaller positive multiple of is , which does not divide. By the theorem, .
-
is not of the form , since it is cut out by two conditions.
The theorem covers every subgroup of , however it is described.
The greatest common divisor
For integers and , not both , the greatest common divisor is the largest integer that divides both and . It exists, since divides both, and a common divisor is at most when (and at most when ). For example, , and .
Let and be integers, not both , and let . Then the integer combinations of and are exactly the multiples of :
In particular for some integers and , is the least positive integer of this form, and every common divisor of and divides .
Proof.¶
Idea. Collect all the combinations into one set. It is a subgroup of , so by Theorem 2.3.1 it consists of the multiples of its least positive element, and that element turns out to be .
-
The set is a subgroup of .
Closure: lies in . Identity: lies in . Inverses: lies in .
-
, where is the least positive element of .
is not , since it contains and , which are not both . So by Theorem 2.3.1, , where is the least positive element of ; say .
-
divides and .
and lie in .
-
Every common divisor of and divides , and .
If and , then . So , since .
-
, and every claim of the theorem holds.
By the last two steps, is a common divisor of and that is at least as large as every common divisor, so is . With , the second and fourth steps prove every claim of the theorem.
, written as a combination
Divide with remainder: , then . Working backwards,
and indeed .
The combinations of and are the multiples of
Every combination is a multiple of , since divides and : for example . And every multiple of is a combination, since gives .
The coefficients are not unique
Besides , also . Adding to the coefficient of and subtracting from the coefficient of adds , so there are infinitely many pairs.
1
Since , the number is an integer combination of and . What does this say about ?
-
.
A common divisor of and is at most . Only the least positive combination is the gcd; is just one combination.
-
divides .
Every combination of and is a multiple of their gcd, which is , and .
-
Nothing: could be any integer.
Not every integer is a combination of and : every combination is a multiple of their gcd. For instance is not one, since is always even.
To find the coefficients and , run the Euclidean algorithm. If , then the common divisors of and are exactly the common divisors of and : a common divisor of and divides , and a common divisor of and divides . So . Dividing again and again, the remainders get smaller until one is , and the last non-zero remainder is the gcd. For :
so . Running the divisions backwards, each time replacing a remainder by what it equals in the line above, writes the gcd as a combination:
The theorem is named after Étienne Bézout, whose work on polynomial equations led to the corresponding statement for polynomials. For integers it already appears in a 1624 book by Claude-Gaspar Bachet de Méziriac.
Euclid’s lemma
An integer is prime if its only positive divisors are and .
Let , and be integers. If divides and , then divides . In particular, if a prime divides , then divides or divides .
Proof.¶
The idea is to write as a combination of and and multiply it by .
Since , Theorem 2.3.2 gives integers and with . Multiplying by gives . The integer divides , and it divides because it divides . So divides their sum .
For the prime case, suppose divides but not . The positive divisors of are and , and does not divide , so . The first part, with , shows that divides . □
Since shares no factor with , it contributes nothing toward dividing : all of has to be found in .
1
An integer satisfies: divides . What follows?
-
divides .
, so Euclid’s lemma applies with and .
-
divides and divides , but need not.
Both are true, but more holds: the lemma needs only , not that is prime, and gives that itself divides .
-
Nothing about : is not prime, so the lemma does not apply.
The lemma’s hypothesis is , not that is prime; here .
Without the hypothesis the conclusion can fail: divides , but divides neither nor . The statement for primes is Proposition 30 of Book VII of Euclid’s Elements.
Which classes are units
Let and . The class is a unit in exactly when . In that case, if , then .
Proof.¶
The idea is that says that divides , that is, for some integer ; and Bézout’s identity says when such a combination exists.
Suppose is a unit, with . Then divides , say , and with this reads . Every common divisor of and divides , so .
Conversely, suppose . By Theorem 2.3.2 there are integers and with . For any such and , is a multiple of , so . So is a unit, and its inverse is . □
Hollow points are not units. A chord joins each unit to its inverse, and a ring marks a unit that is its own inverse.
The units mod
The units are , , and : , , and are the numbers from to that share no factor greater than with . The hollow classes, such as and , share the factor or with .
A prime modulus
is prime, so for every from to , and every class except is a unit.
The inverse of mod
The Euclidean algorithm gives and , so . So : indeed .
1
Which of these classes is a unit in ?
-
is prime, but it divides , so . Being prime is not what makes a class a unit.
-
does not divide , but they share the factor : .
-
, and indeed , so is its own inverse.
2
What is the inverse of in ?
-
: that is the inverse under addition. Under multiplication, .
-
, so : a sign has slipped when running the Euclidean algorithm backwards.
-
. The Euclidean algorithm finds it: and give .
The units mod are therefore the classes of the odd numbers , and the units mod are the classes of , the numbers from to divisible by neither nor . When is prime, every that does not divide has , so has elements.