3.5: The Division Algorithm and Congruence: Preview Activity 1: Quotients and Remainders
3.5: The Division Algorithm and Congruence: Preview Activity 1: Quotients and Remainders
r 19 -5
4q + r 27 27 27 27 27 27 27 27 27 27
2. What is the smallest positive value for r that you obtained in your examples from Part (1)?
Division is not considered an operation on the set of integers since the quotient of two integers need not be an integer.
However, we have all divided one integer by another and obtained a quotient and a remainder. For example, if we
113 3
divide 113 by 5, we obtain a quotient of 22 and a remainder of 3. We can write this as = 22 + . If we multiply
5 5
both sides of this equation by 5 and then use the distributive property to “clear the parentheses,” we obtain
113 3
5⋅ = 5(22 + )
5 5
113 = 5 ⋅ 22 + 3
This is the equation that we use when working in the integers since it involves only multiplication and addition of
integers.
3. What are the quotient and the remainder when we divide 27 by 4? How is this related to your answer for Part (2)?
4. Repeat part (1) using a = −17 and b = 5 . So the object is to find integers q and r so that −17 = 5q + r . Do this by
completing the following table.
q -7 -6 -5 -4 -3 -2 -1
r 18 -7
5. The convention we will follow is that the remainder will be the smallest positive integer r for which −17 = 5q + r
and the quotient will be the corresponding value of q. Using this convention, what is the quotient and what is the
remainder when -17 is divided by 5?
We will now explore what happens when we multiply several pairs of integers where the first one is congruent to 3
modulo 6 and the second is congruent to 5 modulo 6. We can use set builder notation and the roster method to specify
the set A of all integers that are congruent to 2 modulo 6 as follows:
Notice that 15 ∈ A and 11 ∈ B and that 15 + 11 = 26 . Also notice that 26 ≡ 2 (mod 6) and that 2 is the smallest
positive integer that is congruent to 26 (mod 6).
3. Now choose at least four other pairs of integers a and b where a ∈ A and b ∈ B . For each pair, calculate (a + b) and
then determine the smallest positive integer r for which (a + b) ≡ r (mod 6). Note: The integer r will satisfy the
inequalities 0 ≤ r < 6 .
4. Prove that for all integers a and b , if a ≡ 3 (mod 6) and b ≡ 5 (mod 6), then (a + b) ≡ 2 (mod 6).
337 = 6 ⋅ 56 + 1
When we are working within the system of integers, the second equation is preferred over the first since the second one uses
only integers and the operations of addition and multiplication, and the integers are closed under addition and multiplication.
Following is a complete statement of the Division Algorithm.
−17 4 2
= −(3 + ) = −3 − . (3.5.3)
5 10 5
a = b ⋅ q + r. (3.5.6)
From the diagram, also notice that r is less than the distance between b ⋅ q and b(q + 1) . Algebraically, this distance is
b(q + 1) − b ⋅ q = b ⋅ q +b −b ⋅ q (3.5.7)
= b. (3.5.8)
a = 2q + r and 0 ≤ r < 2 .
This means that the remainder, r, can only be zero or one (and not both). When r = 0 , the integer is even, and when r = 1 ,
the integer is odd.
Answer
Add texts here. Do not delete this text first.
Proposition 3.27
If n is an integer, then 3 divides n 3
−n .
Proof
Let n be an integer. We will show that 3 divides n − n by examining the three cases for the remainder when
3
n is
divided by 3. By the Division Algorithm, there exist unique integers q and r such that
n = 3q + r , and 0 ≤ r < 3 .
This means that we can consider the following three cases:(1) r = 0 ; (2) r = 1 ; and (3) r = 2 .
In the case where r = 0 , we have n = 3q . By substituting this into the expression n 3
−n , we get
3 3
n − n = (3q ) − (3q) (3.5.9)
3
= 27 q − 3q (3.5.10)
3
= 3(9 q − q). (3.5.11)
Since (9q 3
− q) is an integer, the last equation proves that 3|(n 3
− n) .
In the second case, r = 1 and n = 3q + 1 . When we substitute this into (n 3
− n) , we obtain
3 3
n −n = (3q + 1 ) − (3q + 1) (3.5.12)
3 2
= (27 q 27 q + 27q + 1) − (3q + 1) (3.5.13)
3 2
= 27 q + 27 q + 6q (3.5.14)
3 2
= 3(9 q + 9q + 2q). (3.5.15)
Since (9q 3
+ 9q
2
+ 2q) is an integer, the last equation proves that 3|(n 3
− n) .
The last case is when r = 2 . The details for this case are part of Exercise (1). Once this case is completed, we will
have proved that 3 divides n − n in all three cases. Hence, we may conclude that if n is an integer, then 3 divides
3
n −n .
3
Properties of Congruence
Most of the work we have done so far has involved using definitions to help prove results. We will continue to prove some
results but we will now prove some theorems about congruence (Theorem 3.28 and Theorem 3.30) that we will then use to
help prove other results.
Let n ∈ N . Recall that if a and b are integers, then we say that a is congruent to b modulo n provided that n divides a − b ,
and we write a ≡ b (mod n ). (See Section 3.1.) We are now going to prove some properties of congruence that are direct
consequences of the definition. One of these properties was suggested by the work in Preview Activity 3.5.2 and is Part (1) of
the next theorem.
Proof
We will prove Parts (2) and (3). The proof of Part (1) is Progress Check 3.29. Let n be a natural number and let a , b,
c , and d be integers. Assume that a ≡ b (mod n ) and c ≡ d (mod n ). This means that n divides a − b and that n
divides c − d . Hence, there exist integers k and q such that a − b = nk and c − d = nq . We can then write
a = b + nk and c = d + nq and obtain
2
= bd + bnq + dnk + n kq (3.5.17)
Since bq + dk + nkq is an integer, this proves that n|(ac − bd) , and hence we can conclude that ac ≡ bd (mod n ).
This completes the proof of Part (2).
Part (2) basically means that if we have two congruences, we can multiply the corresponding sides of these
congruences to obtain another congruence. We have assumed that a ≡ ��b (mod n ) and so we write this twice as
follows:
a ≡ b(mod n), and (3.5.20)
a ≡ b(mod n). (3.5.21)
If we now use the result in Part (2) and multiply the corresponding sides of these two congruences, we obtain a ≡ b 2 2
(mod n ). We can then use this congruence and the congruence a ≡ b (mod n ) and the result in Part (2) to conclude
that
2 2
a ⋅b ≡b ⋅ b(mod n), (3.5.22)
or that a ≡ b (mod n ). We can say that we can continue with this process to prove Part (3), but this is not
3 3
considered to be a formal proof of this result. To construct a formal proof for this, we could use a proof by
mathematical induction. This will be studied in Chapter 4. See Exercise (13) in Section 4.1.
Answer
Add texts here. Do not delete this text first.
Exercise (11) in Section 3.1 gave three important properties of congruence modulo n . Because of their importance, these
properties are stated and proved in Theorem 3.30. Please remember that textbook proofs are usually written in final form of
“reporting the news.” Before reading these proofs, it might be instructive to first try to construct a know-show table for each
proof.
Proof
We will prove the reflexive property and the transitive property. The proof of the symmetric property is Exercise (3).
Let n ∈ N , and let a ∈ Z . We will show that a ≡ a (mod n ). Notice that
a − a = 0 = n ⋅ 0. (3.5.23)
This proves that n divides a−a and hence, by the definition of congruence modulo n , we have proven that a ≡a
(mod n ).
To prove the transitive property, we let n ∈ N , and let a , b, and c be integers. We assume that a ≡ b (mod n ) and
b ≡ c (mod n ). We will use the definition of congruence modulo n to prove that a ≡ c (mod n ). Since a ≡ b (mod n )
and b ≡ c (mod n ), we know that n|(a − b) and n|(b − c) . Hence, there exist integers k and q such that
a − b = nk (3.5.24)
b − c = nq. (3.5.25)
If we simplify the left side of the last equation and factor the right side, we get
a − c = n(k + q). (3.5.27)
By the closure property of the integers, (k + q) ∈ Z , and so this equation proves that n|(a − c) and hence that a ≡ c
(mod n ). This completes the proof of the transitive property of congruence modulo n .
If we divide any integer in this set by 7 and write the result according to the Division Algorithm, we will get a remainder of 2.
For example,
2 = 7 ⋅ 0 +2 (3.5.29)
9 = 7 ⋅ 1 +2 (3.5.30)
16 = 7 ⋅ 2 + 2 (3.5.31)
23 = 7 ⋅ 3 + 2 (3.5.32)
−5 = 7(−1) + 2 (3.5.33)
Is this a coincidence or is this always true? Let’s look at the general case. For this, let n be a natural number and let a ∈ Z . By
the Division Algorithm, there exist unique integers q and r such that
a = nq + r and 0 ≤ r < n .
By subtracting r from both sides of the equation a = nq + r , we obtain
a − r = nq .
Theorem 3.31
Let n ∈ N and let a ∈ mathbbZ . If a = nq + r and 0 ≤ r < n for some integers q and r, then a ≡ r (mod n ).
This theorem says that an integer is congruent (mod n ) to its remainder when it is divided by n . Since this remainder is unique
and since the only possible remainders for division by n are 0, 1, 2,..., n1, we can state the following result.
Corollary 3.32
If n ∈ N , then each integer is congruent, modulo n , to precisely one of the integers 0, 1, 2, ..., n−1 . That is, for each
integer a , there exists a unique integer r such that
a ≡r (mod n ) and 0 ≤ r < n .
Corollary 3.32 can be used to set up cases for an integer in a proof. If n ∈ N and a ∈ Z , then we can consider n cases for a .
The integer a could be congruent to 0,1, 2, ..., or n − 1 modulo n . For example, if we assume that 5 does not divide an integer
a , then we know a is not congruent to 0 modulo 5, and hence, that a must be congruent to 1, 2, 3, or 4 modulo 5. We can use
these as 4 cases within a proof. For example, suppose we wish to determine the values of a modulo 5 for integers that are not
2
congruent to 0 modulo 5. We begin by squaring some integers that are not congruent to 0 modulo 5. We see that
2
1 = 1 and 1 ≡ 1 (mod 5). (3.5.36)
2
3 = 9 and 9 ≡ 4 (mod 5). (3.5.37)
2
6 = 36 and 36 ≡ 1 (mod 5). (3.5.38)
2
8 = 64 and 64 ≡ 4 (mod 5). (3.5.39)
2
9 = 81 and 81 ≡ 1 (mod 5). (3.5.40)
These explorations indicate that the following proposition is true and we will now outline a method to prove it.
Proposition 3.33.
For each integer a , if a ≢ 0 (mod 5), then a 2
≡1 (mod 5) or \(a^2 \equiv 4) (mod 5).
Proof
We will prove this proposition using cases for a based on congruence modulo 5. In doing so, we will use the results in
Theorem 3.28 and Theorem 3.30. Because the hypothesis is a ≢ 0 (mod 5), we can use four cases, which are: (1)
a ≡ 1 (mod 5), (2)a ≡ 2 (mod 5), (3)a ≡ 3 (mod 5), and (4)\(a \equiv 4) (mod 5). Following are proofs for the first
transitive property of congruence (Theorem 3.30) to conclude that a ≡ 1 (mod 5). This proves that if a ≡ 4 (mod 5),
2
Answer
Add texts here. Do not delete this text first.
In the proof of Proposition 3.33, we used four cases. Sometimes it may seem a bit overwhelming when confronted with a proof
that requires several cases. For example, if we want to prove something about some integers modulo 6, we may have to use six
cases. However, there are sometimes additional assumptions (or conclusions) that can help reduce the number of cases that
must be considered. This will be illustrated in the next progress check.
beginning to use congruence arithmetic (as in the proof of Proposition 3.33) in each of the possible six cases, we can show
that some of the cases are not possible under these assumptions. (In some sense, we use a short proof by contradiction for
these cases.) So assume that a is an odd integer. Then:
If a ≡ 0 (mod 6), then there exists an integer k such that a = 6k . But then a = 2(3k) and hence, a is even. Since we
assumed that a is odd, this case is not possible.
If a ≡ 2 (mod 6), then there exists an integer k such that a = 6k + 2 . But then a = 2(3k + 1) and hence, a is even.
Since we assumed that a is odd, this case is not possible.
1. Prove that if a is an odd integer, then a cannot be congruent to 4 modulo 6.
2. Prove that if a is an integer and 3 does not divide a , then a cannot be congruent to 3 modulo 6.
3. So if a is an odd integer that is not a multiple of 3, then a must be congruent to 1 or 5 modulo 6. Use these two cases
to prove the following proposition:
Answer
Add texts here. Do not delete this text first.
Proposition 3.36.
For each integer a , if a is an odd integer that is not multiple of 3, then a
2
≡1 (mod 6).
(a) Explain why we can also represent three consecutive integers as k − 1 , k , and k + 1 , where k is an integer.
(b) Explain why Proposition 3.27 proves that the product of any three consecutive integers is divisible by 3.
(c) Prove that the product of three consecutive integers is divisible by 6.
3. Prove the symmetric property of congruence stated in Theorem 3.30.
4. (a) Let n ∈ N and let a ∈ Z . Explain why n divides a if and only if a ≡ 0 (mod n ).
(b) Let a ∈ Z . Explain why if a ≢ 0 (mod 3), then a ≡ 1 (mod 3) or a ≡ 2 (mod 3).
(c) Is the following proposition true or false? Justify your conclusion.
For each a ∈ Z , a ≢ 0 (mod 3) if and only if a ≡ 1 (mod 3).
2
5. (a) Use cases based on congruence modulo 3 and properties of congruence to prove that for each integer n , n ≡ n 3
(mod 3).
(b) Explain why the result in Part (a) proves that for each integer n , 3 divides n − n . Compare this to the proof of the
3
For all integers a and b , if ab ≡ 0 (mod 3), then a ≡ 0 (mod 3) or b ≡ 0 (mod 3).
8. (a) Explain why the following proposition is equivalent to the proposition in Exercise (7).
For all integers a and b , if 3|ab , then 3|a or 3|b.
(b) Prove that for each integer a , if 3 divides a , then 3 divides a .
2
–
9. (a) Prove that the real number √3 is an irrational number. That is, prove that
If r is a positive real number such that r = 3 , then r is irrational.
2
− −
(b) Prove that the real number √12 is an irrational number.
10. (a) Use the result in Proposition 3.33 to help prove that the integer m = 5, 344, 580, 232, 468, 953, 153 is not a perfect
square. Recall that an integer n is a perfect square provided that there exists an integer k such that n = k . Hint: Use
2
a proof by contradiction.
(b) Is the integer n = 782, 456, 231, 189, 002, 288, 438 a perfect square? Justify your conclusion.
11. (a) Use the result in Proposition 3.33 to help prove that for each integer a , if 5 divides a , then 5 divides a .
2
–
(b) Prove that the real number √5 is an irrational number.
12. (a) Prove that for each integer a , if a ≢ 0 (mod 7), then a ≢ 0 (mod 7).
2
–
(c) Prove that the real number √7 is an irrational number.
13. (a) If an integer has a remainder of 6 when it is divided by 7, is it possible to determine the remainder of the square of
that integer when it is divided by 7? If so, determine the remainder and prove that your answer is correct.
(b) If an integer has a remainder of 11 when it is divided by 12, is it possible to determine the remainder of the square
of that integer when it is divided by 12? If so, determine the remainder and prove that your answer is correct.
(c) Let n be a natural number greater than 2. If an integer has a remainder of n − 1 when it is divided by n , is it
possible to determine the remainder of the square of that integer when it is divided by n ? If so, determine the
remainder and prove that your answer is correct.
14. Let n be a natural number greater than 4 and let a be an integer that has a remainder of n − 2 when it is divided by n .
Make whatever conclusions you can about the remainder of a when it is divided by n . Justify all conclusions.
2
15. Is the following proposition true or false? Justify your conclusion with a proof or a counterexample.
For each natural number n , if 3 does not divide (n + 2) , then n is not a prime number or n = 3 .
2
16. (a) Is the following proposition true or false? Justify your conclusion with a counterexample or a proof.
For each integer n , if n is odd then n ≡ 1 (mod 8).
2
(b) Compare this proposition to the proposition in Exercise (7) from Section 3.4. Are these two propositions
equivalent? Explain.
(c) Is the following proposition true or false? Justify your conclusion with a counterexample or a proof.
For each integer n , if n is odd and n is not a multiple of 3, then n ≡ 1 (mod 24).
2
18. Is the following proposition true or false? Justify your conclusion with a counterexample or a proof.
For each integer a , 3 divides a + 23a .
3
19. Are the following statements true or false? Either prove the statement is true or provide a counterexample to show it is
false.
(a) For all integer a and b , if a ⋅ b ≡ 0 (mod 6), then a ≡ 0 (mod 6) or b ≡ 0 (mod 6).
(b) For all integer a and b , if a ⋅ b ≡ 0 (mod 8), then a ≡ 0 (mod 8) or b ≡ 0 (mod 8).
(c) For all integer a and b , if a ⋅ b ≡ 1 (mod 6), then a ≡ 1 (mod 6) or b ≡ 1 (mod 6).
(d) For all integer a and b , if ab ≡ 7 (mod 6), then either a ≡ 1 (mod 12) or b ≡ 7 (mod 12).
20. (a) Determine several pairs of integers a and b such that a ≡ b (mod 5). For each such pair, calculate 4a + b , 3a + 2b ,
and 7a + 3b . Are each of the resulting integers congruent to 0 modulo 5?
(b) Prove or disprove the following proposition:
(mod 5).
21. Evaluation of proofs
See the instructions for Exercise (19) on page 100 from Section 3.1.
(a)
Proposition
For all integers a and b , if (a + 2b) ≡ 0 (mod 3), then (2a + b) ≡ 0 (mod 3).
Proof
We assume a, b ∈ Z and (a + 2b) ≡ 0 (mod 3). This means that 3 divides a + 2b and, hence, there exists an
integer m such that a + 2b = 3m . Hence, a = 3m − 2b . For (2a + b) ≡ 0 (mod 3), there exists an integer x
such that 2a + b = 3x . Hence,
2(3m − 2b) + b = 3x (3.5.41)
6m − 3b = 3x (3.5.42)
3(2m − b) = 3x (3.5.43)
2m − b = x (3.5.44)
Since (2m − b) is an integer, this proves that 3 divides (2a + b) and hence, (2a + b) ≡ 0 (mod 3)
(b)
Proposition.
For each integer m, 5 divides (m 5
− m) .
Proof
Let m ∈ Z . We will prove that 5 divides (m 5
− m) by proving that divides (m 5
− m) ≡ 0 (mod 5). We will
use cases.
For the first case, if m ≡ 0 (mod 5), then m 5
≡0 (mod 5) and, hence, ((m^5 - m) \equiv 0\) (mod 5).
For the second case, if m ≡ 1 (mod 5), then m ≡ 1 (mod 5) and, hence, ((m^5 - m) \equiv (1 - 1)\) (mod 5),
5
The proof of the following proposition based on Part (b) uses cases. In this proof, however, we use cases and a proof
by contradiction to prove that a certain integer cannot be odd. Hence, it must be even. Complete the proof of the
proposition.
The integer n is either even or it is odd. We will show that it must be even by obtaining a contradiction if it assumed to
be odd. So, assume that n is odd. (Now complete the proof.)
23. The Last Two Digits of a Large Integer.
Notice that 7, 381, 272 ≡ 72 (mod 100) since 7, 381, 272 - 72 = 7, 381, 200, which is divisible by 100. In general, if
we start with an integer whose decimal representation has more than two digits and subtract the integer formed by the
last two digits, the result will be an integer whose last two digits are 00. This result will be divisible by 100. Hence,
any integer with more than 2 digits is congruent modulo 100 to the integer formed by its last two digits.
(a) Start by squaring both sides of the congruence 3 ≡ 81 (mod 100) to prove that 3 ≡ 61 (mod 100) and then prove
4 8
that 3 ≡ 21 (mod 100). What does this tell you about the last two digits in the decimal representation of 3 ?
16 16
(b) Use the two congruences in Part (23a) and laws of exponents to determine r where 3 ≡ r (mod 100) and r ∈ Z
20
with 0 ≤ r < 100 . What does this tell you about the last two digits in the decimal representation of 3 ? 20
(c) Determine the last two digits in the decimal representation of 3 . 400
(d) Determine the last two digits in the decimal representation of 4 . 804
Hint: One way is to determine the "mod 100 values", for 4 , 4 , 4 , 4 , 4 , 4 , and so on. Then use these values and
2 4 8 16 32 64
laws of exponents to determine r, where 4 ≡ r (mod 100) and r ∈ Z with 0 ≤ r < 100 .
804
(e) Determine the last two digits in the decimal representation of 3 .3356
(f) Determine the last two digits in the decimal representation of 7 . 403
Answer
Add texts here. Do not delete this text first.