1
1.1. The Division Algorithm
We will assume and use some basic properties of arithmetic in the set of integers
Z = {. . . , −3, −2, −1, 0, 1, 2, 3, . . .} .
We will also use:
Well-Ordering Axiom. Let S be a nonempty set of nonnegative integers. Then S contains a smallest
element; that is, there exists an element n0 ∈ S such that n ≥ n0 holds for all n ∈ S.
Our focus for this section is the following result, which will be fundamental to much of what we do in
Math 302:
Theorem 1 (Division Algorithm). For any a, b ∈ Z, with b > 0, q, r ∈ Z
such that
(We call q the quotient and r the remainder.)
Example 2. Apply the Division Algorithm in the following cases:
(a) Divide 123 by 7:
(b) Divide −123 by 7:
Idea of proof (of existence).
Proof. Fix any two integers a, b with b > 0. We must show there exists at least one pair of integers (q, r)
satisfying
a = bq + r and 0≤r<b
and that this pair (q, r) is unique, i.e., that there is at most one such pair.
Existence of q, r
Define the following set of nonnegative integers:
S = {a − bx | x ∈ Z and a − bx ≥ 0} .
Claim 1. S is a nonempty set.
Proof. We must produce some x ∈ Z such that a − bx ∈ S. We can accomplish this if we put x = − |a|
because
2
By Claim 1, S is a nonempty set of nonnegative integers. Hence by the Well-Ordering Axiom, it has a
smallest element that we will call r. By definition of S, there exists q ∈ Z such that
r = a − bq and a − bq ≥ 0.
Equivalently, we have
a = bq + r and r ≥ 0.
Claim 2. r < b
Proof. Suppose for contradiction that r ≥ b. Define r0 = r − b. Then r0 belongs to S because
But this is a contradiction since
Hence we’ve shown there exist q, r ∈ Z such that
a = bq + r and 0 ≤ r < b.
This finishes the proof of the existence statement.
Uniqueness of q, r: See the textbook for a proof of this part of the theorem.
The following result follows from the Division Algorithm, and allows for the possibility that b is negative.
Corollary 3. For any a, b ∈ Z, with b 6= 0, there exist unique q, r ∈ Z such that
a = bq + r and 0 ≤ r < |b| .
While this is more general than the Division Algorithm, we will not use it much in practice. However, as
we will see in Chapter 4, this statement more closely matches the Division Algorithm for polynomials.
3
Some problems
(1) Let a be any integer and let b and c be positive integers. Suppose that when a is divided by b, the
quotient is q and the remainder is r, so that
a = bq + r and 0 ≤ r < b.
If ac is divided by bc, show that the quotient is q and the remainder is rc.
(2) Let n be an integer. Show that n(n − 2)(2n + 4) is a multiple of 3.
Hint. By the Division Algorithm, n must be of the form 3q or 3q + 1 or 3q + 2.
(3) Let n > 4 be an integer. Find the quotient and remainder when the following two integers N1 and
N2 are divided by n.
(a) N1 = 6n10 − 7n2 + 3
(b) N2 = n3 + 4n − 5
1
1.2. Divisibility
Preliminary definitions
Definition 1. Let a, b ∈ Z. We say that a divides b if there exists c ∈ Z such that b = ac. If a divides b, we
write a | b and say that a is a divisor of b.
Warning!
• Students sometimes see the notation “a | b” and get the roles of a and b switched, with unfortunate
results. . . When you see that notation, read it from left to right as “a divides into b”.
• Another common mistake is to confuse the similar phrases “a is divided by b” and “a divides b”. The
first phrase typically refers to the Division Algorithm, and in particular when a is divided by b the
remainder may or may not be zero. The second phrase is the one in Definition 1 (and implies the
remainder is actually zero when a is divided by b).
Example 2. Show the following:
• (−3) | 21
• n | 0 for any n ∈ Z
• 1 | n for any n ∈ Z
• For any integers p 6= q, we have (p − q) | (q 3 − p3 ).
The following summarizes some simple, useful observations (discussed in the book):
Propostion 3. For any a ∈ Z, we have:
(a) a and −a have the same divisors.
(b) If a 6= 0 and b | a, then − |a| ≤ b ≤ |a|. In particular, a has only finitely many divisors.
Definition 4. Suppose that a, b ∈ Z are not both zero (i.e., that at least one of a, b is nonzero). The greatest
common divisor (gcd) of a and b is the largest d ∈ Z that divides both a and b. That is, d ∈ Z is the gcd of
a and b if it satisfies both of the following:
(a)
(b)
We will denote the gcd of a and b as d = (a, b).
Example 5. What is (21, 18)?
Definition 6. If a, b ∈ Z satisfy (a, b) = 1, we say that a and b are coprime (or also relatively prime).
Definition 7. Let a, b, c ∈ Z. We will say that c is a linear combination of a and b if there exist integers
u, v ∈ Z such that
au + bv = c.
Remark 8. You probably heard the term “linear combination” in linear algebra, but there the coefficients
don’t have to be integers (e.g. they might be selected from the real numbers). In the definition above, we
only allow the coefficients u, v to be integers. (It might be more precise to say “integral linear combination”
in Definition 7, but we won’t say this.)
2
Example 9. For the following integers a, b, c, determine whether c is a linear combination of a and b.
• a = 5, b = 7, c = 3.
• a = 3, b = 6, c = 7.
The big theorem of this section
The following theorem (which is sometimes called “Bézout’s identity”) seems strange but will turn out to
be very useful for both theoretical and practical purposes:
Theorem 10. Suppose a, b ∈ Z are not both zero. Then (a, b) is a linear combination of a and b; that is,
there exist u, v ∈ Z such that
au + bv = (a, b).
Furthermore, (a, b) is the smallest positive integer which can be written as a linear combination of a and b.
Example 11.
• 3 = (21, 18) =
• 1 = (45, 28) =
WARNINGS about Theorem 10:
(a) Theorem 10 says that (a, b) is a linear combination of a and b; it does not say that every linear
combination of a and b that you produce will equal (a, b).
Example.
(This warning is very often overlooked by students in proofs.)
(b) The integers u, v in Theorem 10 are not unique.
Example.
Outline of proof of Theorem 10.
3
Remark 12. The proof of Theorem 10 outlined above is nonconstructive because
But by using the you can actually find some for specific pair
a and b. This is demonstrated in Exercise 1.2.15 in the textbook.
Some applications
Corollary 13. Suppose that a, b ∈ Z are not both zero, and let d ∈ Z be positive. Then d = (a, b) if and
only if both of the following conditions hold:
(a) d | a and d | b
(b) If c | a and c | b, then c | d.
Corollary 14. Suppose a, b ∈ Z are not both zero. Then (a, b) = 1 if and only if there exist u, v ∈ Z such
that
au + bv = 1.
Proof.
The following will be an important for proving the Fundamental Theorem of Arithmetic in §1.3:
Corollary 15. If a | bc and (a, b) = 1, then a | c.
Proof.
Remark 16. Generally speaking, there are two main tools for proving properties of gcd’s:
(a)
(b)
4
Some problems
(1) If n ∈ Z, what are the possible values of (n, n + 2)? What are the possible values of (n, n + 6)?
(2) Suppose that a, b, q, r ∈ Z satisfy the relation a = bq + r.
(a) Show that every common divisor c of b and r is also a common divisor of a and b.
(b) Show that every common divisor c of a and b is also a common divisor of b and r.
(c) Show that (a, b) = (b, r).
(3) If c | ab and (c, a) = d, prove that c | db.
(4) Prove that (a, b) | (a + b, a − b).
1
1.3. Primes and Unique Factorization
Prime integers
Definition 1. Let n 6= 0, ±1 be an integer.
• We will say n is prime if the only divisors of n are ±1 and ±n.
• Otherwise we say that n is composite.
This definition might seem unusual: we’re allowing primes to be positive or negative! Thus the integers
2, 3, 5, 7, 11, 13, 17, 19, 23, . . .
and
−2, −3, −5, −7, −11, −13, −17, −19, −23, . . .
are all prime (according to our definition).
Remark 2. We can spell out Definition 1 slightly differently. Let n 6= 0, ±1.
• n is prime if and only if the following is true:
• n is composite if and only if the following is true:
Remark 3. A useful observation is that if p and q are both prime, and if p | q, then we must have p = ±q.
Why is this?
The following is an incredibly important characterization of prime numbers, and we will use it often.
Theorem 4. Let p ∈ Z, with p 6= 0, ±1. Then p is prime if and only if the following statement is true:
“Let b, c ∈ Z. If p | bc, then p | b or p | c.”
of Theorem 4, an important ingredient is Theorem 1.4 from §1.2,
In the proof (of the forward direction)
which said: “ a | bc AND (a, b) = 1 =⇒ a | c ”
Example 5. Use Theorem 4 to explain why 24 is not prime.
By using induction, you can extend Theorem 4 in the following way:
Corollary 6. Suppose that p ∈ Z is prime. If p | a1 a2 · · · an , then p divides at least one of the integers ai .
The Fundamental Theorem of Arithmetic
The central result of this section is one that, on some level, you’ve probably known for many years:
Theorem 7 (Fundamental Theorem of Arithmetic). Every integer n 6= 0, ±1 can be factored into a product
of primes. This factorization is unique in the following sense: If
n = p1 p2 . . . pk = q1 q2 . . . q` ,
with all of the pi , qj being prime, then we have k = ` and, perhaps after reordering the factors, we have
p1 = ±q1 , p2 = ±q2 , ... pk = ±qk .
2
Example 8. Write each of the following as a product of primes:
• 15 =
• −15 =
• 13 =
Outline of proof of Theorem 7.
An application to GCDs
The exercises for §1.2 describe how to use the Euclidean algorithm to compute GCDs. A different method,
which you might have seen before, uses prime factorizations.
Propostion 9. Let a, b be two integers greater than 1. Suppose that their prime factorizations look like
a = ps11 ps22 · · · pskk , b = pt11 pt22 · · · ptkk ,
for distinct positive primes p1 , . . . , pk and exponents si , ti ≥ 0. If we define ri = min(si , ti ), then
(a, b) = pr11 pr22 · · · prkk .
Example 10. Apply this method to compute (140, 2700).
3
Proof of Proposition 9.
4
Some problems
(1) If p is prime and p | a , is it true that pn | an ? Justify your answer.
n
(2) Let p be an integer other than 0, ±1.
(a) Suppose that p is prime. Show that the following statement holds: For any a ∈ Z, either
(a, p) = 1 or p | a.
(b) Suppose that the following statement about p is true: For any a ∈ Z, either (a, p) = 1 or p | a.
Show that p is prime.
mk
(3) Consider two positive integers x = pm 1 m2
1 p2 · · · pk and y = pn1 1 pn2 2 · · · pnk k , where p1 , p2 , . . . , pk are
distinct positive primes and each mi , ni ≥ 0. Prove that x | y if and only if mi ≤ ni for every i.