Section 3.4 made a commutative
ring, and Example (Multiplication modulo six and modulo five)
put two of these rings side by side. In every non-zero
class has a partner whose product with it is , so we may divide by
it. In the
class has no
such partner: the products are only . Which
classes can be divided by, and for which moduli can all
non-zero classes? This section answers both questions
with the gcd of Section 3.2, and finds a field with
elements for
every prime . It
then solves two congruences at once, the Chinese
remainder theorem, by the move of Section 3.3, multiply
the Bézout identity: write as a combination and
multiply.
Throughout, and classes are taken in unless another
modulus is named. Two classes are equal exactly when
their representatives are congruent: The first equivalence is Sets, Relations, and Cardinality, Theorem 2.5.1
(b) for the relation of Theorem 3.4.1
(a); the second is the definition of (Definition 3.2.1)
read with Sets, Relations, and Cardinality, Definition 2.2.1.
We call it the class test. Products of
classes are computed on representatives, (Theorem 3.4.1
(b)).
Units of a
commutative ring
In the
equation has no solution, while has the
solution .
The elements that can be divided by are the ones that
solve “ times
something is ”,
and they deserve a name in every commutative ring at
once.
A unit is an element that has a multiplicative
inverse in the ring itself.
Definition
3.5.1 (Unit of a Commutative Ring)
Let be a
commutative ring (Definition 2.3.1).
An element
is a unit of if there
exists with . The set of units of is written . For a unit
, the element
is
unique; it is written and called the
inverse of .
In words: is a
unit when the equation can be solved inside . The definition asks
for one solution; it does not ask to be non-zero.
Well-definedness of . Let and . Then, by
(F7), (F5) and (F6), So the inverse is unique, and the notation
names one
element.
Closure. The element is a unit, since . If is a unit, so is , with ,
because by (F6). If and are units, then reordering the four factors by (F5) and (F6);
so is a unit and
, by uniqueness.
A unit is not a zero divisor. If is a unit and , then by (above) and ((F6), (F7)) in the
first equality, (F5) in the second, and Proposition 2.3.2
(b) in the third. So a unit times a non-zero element is
never .
Examples.
- The integers. . Indeed and (Proposition 2.3.2
(c)). Conversely, says , so or by Proposition 3.1.1
(g).
- The rationals. : every non-zero rational has an inverse
by (F8) (Theorem 2.4.3),
and is not a
unit, since (Proposition 2.3.2
(b)).
- The integers modulo six. By the
multiplication table of Example (Multiplication modulo six and modulo five),
the units of are and , and .
- The zero ring of Section 2.3,
where . Here
,
so is a unit and
.
This degenerate case is why “every non-zero element is a
unit” is not by itself the definition of a field.
A non-example by minimal change. Change
to in the third example.
The class is non-zero, like , but : it is
a zero divisor, so by the paragraph above it is
not a unit. Concretely, the clause
“there exists
with ” fails:
the products
for
are , and is not among
them.
Why this definition. With units, the
field axiom (F8) reads: every non-zero element is a
unit. So a field (Definition 2.3.1)
is exactly a commutative ring with in which ; when , the element is never a unit, since
(Proposition 2.3.2
(b)). The definition asks for an inverse in , not in some bigger
ring: has
the inverse in
, and it is
still not a unit of .
Warning. “Non-zero and not a zero
divisor” does not make an element a unit. In there are no zero
divisors at all (Proposition 2.3.5
(f)), yet is not
a unit, since . The paragraph above proves only one
direction: a unit is never a zero divisor. So “not a
unit” must be checked against the definition, or, in
, by the
next theorem.
The units of a commutative ring are closed under
products and inverses and contain : they form what
Algebraic Preliminaries, Chapter 3 calls a
group. Here we only need to find them in .
Which
classes are units
In the
units and are the classes of
the integers coprime to , and the non-units
share a factor with . The equation says , that is,
for
some integer : a
Bézout identity. So the question is answered by Section
3.2.
Theorem
3.5.1 (Units Modulo n)
Let and . Then is a unit of if and
only if . In that case, for any
with
, .
Idea. Both directions translate
between one equation in and one equation
in . A solution
of is
an integer combination , and Corollary 3.2.2
says that such a combination exists exactly when . The class
test does the translation.
Proof. Suppose
. By
Corollary 3.2.2
there are with . Let be any such pair. Then , so
, and
by the class test . Hence , where the first equality is the
definition of the product on classes (Theorem 3.4.1
(b)). So is a
unit, and is
its inverse, which is unique (Definition 3.5.1);
thus
for every such pair.
Suppose is a
unit. Every element of is the class of
an integer (Sets, Relations, and Cardinality, Definition 2.5.4),
so for
some .
Then , so
by
the class test: for some . Hence , and by Corollary 3.2.2.
This proves the theorem.
The theorem turns “is invertible?” into a
gcd, and the Euclidean algorithm (Theorem 3.2.4)
computes the gcd. Back-substitution, as in Example (Two runs of the algorithm),
then produces the
with ,
and with it the inverse. Whether depends
only on the class , since by the theorem
it is equivalent to a statement about ; so any
representative may be used.
Example
(Inverting a class modulo sixty)
Decide whether and are units of , and find the
inverse of each one that is.
Solution. The class . Run the
Euclidean algorithm on : The last non-zero remainder is , so (Theorem 3.2.4
(c)), and is a
unit by Theorem 3.5.1.
Back-substitute, using the lines from the bottom up:
So , and Theorem 3.5.1
gives . The representative in is , since . Check:
, so .
The class . Here , so is a common divisor of
and , and every common
divisor of them divides ; hence
(Definition 3.2.2,
with Proposition 3.1.1
(e) for the comparison), and is not a unit by Theorem 3.5.1.
A witness: with , so is a zero divisor,
and a unit never is (Definition 3.5.1
and the paragraph after it).
Quick check. Find the inverse of
in .
Solution. : , so . In the form of Theorem 3.5.1,
.
The field
of integers modulo a prime
By Theorem 3.5.1,
every non-zero class of is a unit
exactly when every with is coprime to
. For a prime, Corollary 3.3.2
(a) says precisely this. For a composite , a proper factor of
is neither
divisible by nor
coprime to it. So the field property sorts the moduli
into primes and the rest.
Theorem
3.5.2 (The Integers Modulo n Form a Field
Exactly When n Is Prime)
Let
with . Then
is a field
in the sense of Definition 2.3.1,
that is, a commutative ring with in which
every non-zero element is a unit, if and only
if is
prime.
Idea. For a prime , a non-zero class has , so the only
common divisors left are , and Theorem 3.5.1
inverts . For a
composite
with , the classes and are non-zero with
product ;
a zero divisor cannot be a unit, so (F8) fails.
Proof. By Theorem 3.4.3
(a), is a
commutative ring, and by Theorem 3.4.3
(c),
since . So
it is a field if and only if every non-zero class is a
unit (Definition 2.3.1,
(F8), and Definition 3.5.1).
Let
be prime, and let
. By Theorem 3.4.1
(d), ,
that is, .
By Corollary 3.3.2
(a), , and (Definition 3.2.2).
So is a unit by
Theorem 3.5.1.
Let be not
prime. By Sets, Relations, and Cardinality, Definition 2.2.2,
has a positive
divisor ; write with . Then by discreteness (Theorem 2.3.4
(c)) and by
Proposition 3.1.1
(e), so . Next, : if , then (
if by Proposition 2.3.2
(b), and if by Proposition 2.3.5
(c)), against . So is
a positive divisor of , and by Proposition 3.1.1
(e). Also :
otherwise ,
so and
by Proposition 2.3.5
(f), since .
Hence as well.
Now :
if , then
by Proposition 3.1.1
(e), since , against . In the same way . But , by the class test. Suppose were a unit. Then
, since a
unit is not a zero divisor (the paragraph after Definition 3.5.1).
This contradiction shows that the non-zero class is not a unit, so
is not a
field. This proves the theorem.
So for every prime there is a field with
exactly elements
(Theorem 3.4.3
(b)). The smallest is , whose tables
are those of the two-element field of Example (A field with two elements that cannot be ordered)
with , renamed , . Algebraic
Preliminaries, Chapter 2 studies fields in general
and gives these finite fields a name of their own.
Warning. In , “” means , not . The class is the zero of , and it has no
inverse, although . The proof above applies Corollary 3.3.2
(a) to the condition ; with only in hand, the case , , is left
open.
Two
congruences at once
A number leaves the remainder on division by and the remainder on division by . What can it be? Each
condition alone is a single class. The question is
whether the two classes meet, and in how much. The next
theorem says that for coprime moduli they always meet,
and in exactly one class modulo the product.
Theorem
3.5.3 (Chinese Remainder Theorem for Two
Moduli)
Let with , and
choose
with
(Corollary 3.2.2).
- (a) For all , the integer
satisfies and an integer satisfies both
congruences if and only if .
- (b) The rule is a well-defined
bijection . With and on
taken componentwise, for all , and .
Try it first (ten minutes): find an with and
by trying. Then use to find a formula that
works for every pair of right-hand sides.
Idea. Trying works: among , the
numbers that are
modulo , the
second one is
modulo . But trial
and error gives one answer and no reason, and it does
not say why no answer can be missing. The identity supplies two
special integers: The first is and
;
the second the other way round. So is modulo and modulo , like a vector built
from two coordinate vectors. For and , and , and . Uniqueness
modulo is Proposition 3.3.3:
a difference divisible by and by is divisible by .
Proof.
- (a) Since and , So and : and (Sets, Relations, and Cardinality, Definition 2.5.5).
Let . Suppose first that
and . Then is divisible by , and by
(Proposition 3.1.1
(c)). Since , Proposition 3.3.3
gives , that is, . Conversely, suppose . Since
, (Proposition 3.1.1
(b)), and then by Proposition 3.1.1
(c). In the same way . So satisfies both
congruences.
- (b) Well
defined. Let . If , then , so (Proposition 3.1.1
(b)). By Sets, Relations, and Cardinality, Theorem 2.5.1
(b) and Theorem 2.2.1
(a), applied to the identity map of , with congruence
modulo on the
source and modulo
on the target, there is exactly one function
sending to
. Pairing the
two values for and gives the function into
(Sets, Relations, and Cardinality, Definition 1.3.2).
Surjective. Let . By Sets, Relations, and Cardinality, Definition 2.5.4,
and
for
some .
With as in (a),
and , so by Sets, Relations, and Cardinality, Theorem 2.5.1
(b).
Injective. Let with
. Then and
,
so and by Sets, Relations, and Cardinality, Theorem 2.5.1
(b). By Proposition 3.3.3,
,
that is, . So is a bijection (Sets, Relations, and Cardinality, Definition 1.4.5).
The operations. By the definition of on each of the three
rings (Theorem 3.4.1
(b)) and of the componentwise sum, The same lines with in place of give the product,
and is the definition. This proves the
theorem.
The theorem answers the opening question: the numbers
with remainder
modulo and
remainder modulo
form one class
modulo , and the
formula of (a) names a representative. Clause (b) says
the same thing as a bijection. Each class modulo is the same
information as a pair of classes, one modulo and one modulo , and the sums and
products of classes can be computed in either form. Each
coordinate of is a commutative ring, so with
zero , one and negatives taken componentwise, every
axiom (F1)–(F7), (F9) holds in each coordinate and hence
for the pairs; then matches two
commutative rings, element for element and operation for
operation.
Example
(Two remainders at once, and two failures)
(i) Find every
with
and .
(ii) Show that
, has no solution, and that the
solutions of , are not one class modulo . Which hypothesis of Theorem 3.5.3
fails, and what happens to its map ?
Solution.
(i) Here , , and , so (Corollary 3.2.2)
with , . By Theorem 3.5.3
(a), Check: and . The solutions are exactly the
with , the class .
(ii) Here :
divides both, and
every common divisor divides , since
(Proposition 3.1.1
(c), (e)). The hypothesis fails, and
both halves of the conclusion fail with it.
Existence fails. If , then
for some , so
has the form . If also , then . No integer has both forms (Corollary 3.1.3
(a)), so there is no solution.
Uniqueness modulo fails. If , then
, so holds automatically, and the solutions
are exactly the class . It contains and , but and (Proposition 3.1.1
(e)), so : the solutions form two classes modulo
, and .
The map. The rule is still well defined, since and (the first step
of the proof of (b) used only these divisibilities). It
is not injective: , since modulo and modulo , while . It is
not surjective either: by the existence part, no has .
Warning. The coprimality hypothesis
is used twice in Theorem 3.5.3:
for the identity , which builds , and in Proposition 3.3.3,
which makes the solution unique modulo . Part (ii) of Example (Two remainders at once, and two failures)
shows each use failing on its own: the moduli with right-hand
sides have no
solution, and with they have solutions spread over two classes
modulo .
In this section the identity of Section
3.2 gave inverses (Theorem 3.5.1)
and the solutions of two congruences (Theorem 3.5.3),
inside the rings that Section 3.4’s quotient
construction built.
Exercises
A. Check your
understanding
Exercise
(A1)
- (a) Find in .
- (b) List the units
of .
- (c) True or false:
is a
field. Justify your answer.
- (d) Find every with and
.
- (e) In the proof of
Theorem 3.5.2,
where is it used that a unit is not a zero divisor?
Solution.
(a) , since
.
(b) By Theorem 3.5.1,
is a unit
exactly when , and by Theorem 3.4.3
(b) each class is for exactly one .
Among these, share the divisor with , and share . The rest are coprime
to : , , and are
each more than a
multiple of , so
each class is its own inverse. The units are .
(c)
False. In every has , so (Theorem 3.4.3
(c)), and a field requires (Definition 2.3.1).
It is the zero ring. (Every element of it is a unit, as
in the zero ring of the examples after Definition 3.5.1;
that is not enough.)
(d) , from
(Corollary 3.2.2),
so Theorem 3.5.3
applies with ,
, , : The solutions are the , that is, the class , since . Check:
.
(e) In the
direction , at the
end:
with ,
so , a non-zero
class, cannot be a unit. That is how the proof shows
(F8) fails.
B. Practice
Exercise
(B1)
Let be prime
and .
Prove that if in , then or . Show by an
example that this fails in .
Solution. ,
so , and
by
the class test. Expanding (Proposition 2.3.2),
. By Corollary 3.3.2
(b),
or . In
the first case ; in the second, , so
, again
by the class test.
In ,
,
since .
But ,
since ,
and ,
since
and (Proposition 3.1.1
(e)). The proof breaks at Corollary 3.3.2
(b): , yet divides neither factor.
(So do and
: all four units
of square
to .)
Exercise
(B2)
- (a) Let and
. Show
that is a
unit of
if and only if and are units of and .
- (b) Now let and be coprime. Deduce that
the map of Theorem 3.5.3
(b) maps
bijectively onto .
- (c) Which of (a) and
(b) uses coprimality? Illustrate with .
Solution.
- (a) Let , with . Then by the class test, and , so (Proposition 3.1.1
(b)); thus . Likewise . So
both are units.
Let
and . By the class test, and
for some , so and . Multiplying the two equations and
expanding, So (Corollary 3.2.2),
and is a
unit (Theorem 3.5.1).
(b) By (a), lies in exactly when is a unit. So
maps into
that set, and the restriction is injective, since is. Each element of
that set is
for some , since is surjective, and
that is a unit by
(a). So the restriction is a bijection.
(c) Only (b),
through Theorem 3.5.3;
(a) holds for all . For , (a) says that is a unit exactly
when is, and
both hold exactly for odd : the units of are and that of
is . Yet sends both units and to , so it is
not injective on the units, and it is not a bijection
either (compare Example (Two remainders at once, and two failures)
(ii)).
Exercise
(B3)
Let be coprime. Show by counting that
injectivity of the map of Theorem 3.5.3
(b) already forces its surjectivity, without using the
formula of part (a).
Solution. By Theorem 3.4.3
(b), applied to the modulus , the set has elements: there is a
bijection . Let be the image of . Since is injective, with codomain is a bijection, and so
is its composite with (Sets, Relations, and Cardinality, Proposition 3.1.1
(c)): has elements.
The target also has elements, by Theorem 3.4.3
(b) for and for
, and the count of
a product, part (a) of Sets, Relations, and Cardinality, Exercise (C2: Counting products and functions).
Suppose were a
proper subset of the target. Then Sets, Relations, and Cardinality, Proposition 3.1.6
gives it elements
for some ,
and Sets, Relations, and Cardinality, Corollary 3.1.4
gives : a
contradiction. So
is the whole target, and is surjective.
(Equivalently: composing the two bijections from gives a
bijection from the target onto , which Sets, Relations, and Cardinality, Theorem 3.1.9
forbids when is a
proper subset.)
C. Going deeper
Exercise
(C1: Exit check: units and the field )
Let and . Prove that is a
unit if and only if . Deduce that is a field for
every prime .
Solution. Units, . If
,
then
for some (Corollary 3.2.2).
The product on is well defined
and computed on representatives (Theorem 3.4.1
(b)), so . Since , , and by the class test. So is a unit with
inverse .
Units, . If
for
some ,
then , so
with
, and
. By
Corollary 3.2.2,
.
The field. Let be prime. is a commutative
ring (Theorem 3.4.3
(a)), and , since would give , so by Proposition 3.1.1
(e), while .
Let .
Then . The
integer divides , so by Sets, Relations, and Cardinality, Definition 2.2.2;
and would
give . So
, and is a unit by the
first part. Every non-zero class is a unit, which is
(F8), so
is a field.
Marking scheme. (10 points) - 3:
of
units: a Bézout identity and the class computation ,
naming that the product is well defined (computed on
representatives). - 3: of units:
from
to an integer combination of and equal to , then with a
cited reason. - 2: gives , and because the gcd divides and is not . - 1: for . - 1: concludes
with (F8): every non-zero class is a unit. Fatal errors
(0 for the step): canceling in without
justification (circular, since cancellation is what
inverses give); “ because is prime” with no
treatment of the case . A proof of the field part that cites Corollary 3.3.2
(a) instead of the divisor argument earns the same 2
points.
Exercise
(C2: Find the error)
Here is an argument.
Claim. For every prime , is a field.
Proof. (0) By Theorem 3.4.3
(a) and (c), is a commutative
ring with , since . (1) Let in . (2) If , then
canceling gives
. (3) So
the map , ,
is injective. (4) With codomain its image, is a bijection from
onto , a subset of
the finite set (Theorem 3.4.3
(b)). By Sets, Relations, and Cardinality, Theorem 3.1.9
the image is not a proper subset, so is surjective. (5) So
some has , and is a unit. So (F8)
holds, and
is a field.
Is the claim true? Does the argument prove it? Name
the line that fails and the reason, give a
counterexample to the illegal step, and repair the
argument.
Solution (Hint 1). List the
properties of that each line
uses. Which of them have been proved in this chapter,
and which are things a field has?
Solution (Hint 2). Write as a
divisibility statement about integers.
Solution. The claim is
true: it is Theorem 3.5.2.
The argument does not prove it as
written.
Line (2) fails. “Cancel a non-zero factor”
is a rule of fields (multiply by the inverse) or of
rings without zero divisors, and neither has been
established for : it is close to
what the argument is trying to prove, and it is false in
general. So the line cites a “fact” that is neither
proved nor true, entry (N9) of Logic and Proof, Example (What is not allowed).
Counterexample to the step: in , and , so
with ,
yet .
There is no counterexample to the conclusion.
Repair of line (2). If , then
,
so
by the class test. Since , , so by Corollary 3.3.2
(b), and .
This uses that is
prime, the hypothesis the flawed line never touched.
With this repair, the argument is a correct second
proof.
Marking scheme. (10 points) - 2:
says the claim is true and the argument, as written,
does not prove it. - 3: names line (2) and the reason:
cancellation by a non-zero class is unproved here and
false in general, (N9), or an equivalent statement of
the reason. - 2: a counterexample to the step, such as
in
. - 3:
repairs line (2) without assuming the field property:
by
the class test and Euclid’s lemma for a prime (Corollary 3.3.2
(b), from Theorem 3.3.1);
or
(Corollary 3.3.2
(a)) and an inverse of from Theorem 3.5.1,
which earns full points even though it makes lines
(3)–(5) redundant. Fatal errors (0 for the step): a
counterexample to the conclusion (there is none); a
repair that cancels by appeal to the
field property being proved (citing Theorem 3.5.1
is not such an appeal).
Exercise
(C3)
Find every with by applying Theorem 3.5.3
twice.
Solution. The first two
congruences. , so (Corollary 3.2.2),
with , , , . By Theorem 3.5.3
(a), and an integer satisfies the first two
congruences if and only if it is .
Adding the third. So the three congruences
together say exactly and . Now
, so , with , ,
, . By Theorem 3.5.3
(a) again, and the solutions are the ,
that is, the class .
Check: .
(Coprimality of
and , and of and , also follows from the
small-primes remark of Section 3.1 with Corollary 3.3.2
(a).) The “if and only if” in the first step is what
allows replacing two congruences by one; with “if”
alone, the second step could lose solutions.
R. Review
Exercise
(R1)
Let be the integers built as classes of
pairs, with . Show that is a well-defined function , and
identify it.
Solution. This is the method of Theorem 2.2.1
(a), from the construction Definition 2.1.1.
Take with , with congruence
modulo , the
equivalence relation whose
quotient set is (Definition 3.4.2,
Theorem 3.4.1
(a)), and . Let , so .
Then, in , so . By Theorem 2.2.1
(a) there is exactly one function
with .
Identification. By the remark after Theorem 2.3.1,
in
. Since ,
by the class test. So for every
: is the quotient map of
, which
sends an integer to its parity class.
Exercise
(R2)
Let with . Prove that and . Conclude that
is injective on .
Solution. The tool is unique
factorization, Theorem 3.3.5.
The powers are those of (Proposition 1.6.4),
carried into ,
which preserves products (Proposition 2.2.3);
and .
A factorization. For , let be the list of
length whose
first entries are
and whose last
entries are . Its entries are prime,
by the small-primes remark of Section 3.1, and it is
non-decreasing, since . Its product is . Indeed, with
the product of
the first
entries, the recursion of Definition 3.3.1
and induction on give (; ), and then induction on gives . So
is a prime
factorization of , which is positive, being a product of
positive integers (Proposition 2.3.5
(c)).
Uniqueness. If , then and are
prime factorizations of the same positive integer, so
they are equal (Theorem 3.3.5):
, with equal entries. Suppose . Then the
entry of index is in , and in
it is , since :
a contradiction. Exchanging the two lists rules out
. So
, and
then by
canceling in
.
This is line (vii) of Sets, Relations, and Cardinality, Exercise (B2: Putting a proof in order),
which was not available when that exercise was set; Sets, Relations, and Cardinality, Theorem 3.2.6
proves the same injectivity by parity instead.
Exercise
(R3)
Prove that no satisfies , by the parity argument: write as a fraction and show
that numerator and denominator are both even. Then show
that, for every prime , no satisfies .
Solution. This is the school
argument of Logic and Proof, Theorem 2.2.1,
now with every step citable.
The case . Suppose and . By Proposition 3.3.6,
with , and
. By
Definition 2.4.2,
, and
, so (Proposition 2.4.4
(b)). Then is
even, so is even
by Corollary 3.1.3
(b): with
. Then
, and
canceling the non-zero factor (Proposition 2.3.5
(f), applied to ) gives . So is even as well. Now
divides and , hence divides (Theorem 3.2.1
(c), (d)), so (Proposition 3.1.1
(g)): a contradiction.
A prime . The same argument
works with “”
in place of “even”: from , , so by Corollary 3.3.2
(b); gives
, so
(cancel
), and in the same way.
Then , against .
Comparison. Chapter 2’s proof, Theorem 2.6.1,
needed neither parity nor gcd: it descended to a smaller
denominator using order alone. The argument here is
shorter, but it stands on lowest terms, and lowest terms
stands on Bézout (Proposition 3.3.6
uses Corollary 3.2.2).
Exercise
(R4)
Find all with .
Solution. Answer:
the class .
The tool is to divide the congruence by
,
and then invert a unit (Theorem 3.5.1).
Since and , if , cancel (Proposition 2.3.5
(f)); conversely, multiply by . So the condition is
in
. There
,
since . Multiplying by , ; and
conversely . So the solutions are exactly the .
Check: and are multiples of .
Why the look-alikes fail. “Multiply by in ” fails: , so is not a unit there
(Theorem 3.5.1).
Canceling the
from every term but keeping the modulus gives ,
and that is wrong: it keeps and loses (, while
). The modulus must be divided too. The
Chinese remainder theorem is not a look-alike that
fails: splitting , Theorem 3.5.3
(b) turns the condition into , which always holds, and , since
; so
it is a second route to the same answer. Note also that
the answer is a class modulo , not modulo : it is the two classes
and .