Professional Documents
Culture Documents
Note: I have attempted to restore as much of the fonts as I could, unfortunately I do not have the
original document, so there could be some minor mistakes.
It all started a long time ago when someone noticed that when you add two integers, the
remainders get added too. He probably ran and told this to a friend who asked him " Hey,
what about multiplication?" They found it worked for multiplication too. Think of two
integers and add them up. Now consider the remainders left by these integers when
divided by another integer.
Consider 9 + 10 = 19, and consider the remainders when these numbers are divided by 7.
2 + 3 = 5.
2 * 3 = 6.
It seems that in those times, the Greeks, Indians and Chinese talked to each other a lot
about these things, and developed quite a bit of knowledge about this kind of things. The
Indians and Chinese particularly enjoyed creating and solving a variety of interesting
problems ( most of which had very little to do with everyday life! ), the solutions of
which involved thinking about remainders. It was tough though, because they did not
even have the algebraic notation that we take for granted today. Even after the advent of
Algebra, it took a couple of hundred years before Gauss in Europe, came up with the
notation we use today for congruences. This notation probably opened the floodgates, for
in the next couple of hundred years we saw a major outpouring of discoveries,
conjectures, and theorems dealing with integers that formalized and rigorized those ideas.
Gauss came up with the congruence notation to indicate the relationship between all
integers that leave the same remainder when divided by a particular integer. This
particular integer is called the modulus, and the arithmetic we do with this type of
relationships is called the Modular Arithmetic. For example, the integers 2, 9, 16, all
leave the same remainder when divided by 7. The special relationship between the
numbers 2, 9, 16 with respect to the number 7 is indicated by saying these numbers are
congruent to each other modulo 7, and writing,
16 9 2 ( mod7).
Although some books give this as a lemma or theorem, it is always best to think of this as
an immediate extension of the definition of the congruency using the definition of the
divides.
Also note that the intuitive idea we mentioned at the outset can be easily derived from the
formal definition above. Some texts may give this too as a theorem or lemma.
The conclusion in the next paragraph however, has far reaching implications, and for this
reason we list it as our first Theorem. Though this theorem seems obvious, it needs an
important theorem from Divisibility for its proof.
0, 1, 2, . (m - 2), (m -1).
Proof: From a theorem in Divisibility, sometimes called Division Algorithm, for every
integer a, there exist unique integers q and r such that a = qm + r, with 0 r < m. This
shows a - r = qm
Since r is a unique integer, and 0 r < m, it follows that r is only one of the integers on
the list.
In the above proof, we could have jumped from a = qm + r to a r ( mod m ) using the
intuitive idea. You can always do this in your proofs with a sentence like "since a = qm +
r we have a r ( mod m )". This is perfectly fine, because as I mentioned earlier many
texts give the intuitive idea as a lemma.
The number r in the proof is called the least residue of the number a modulo m.
Exercise 1: Find the least residue of 100 (a) mod 3 , (b) mod 30, (c) mod 98, and (d) mod
103.
Congruences act like equalities in many ways. The following theorem is a collection of
the properties that are similar to equalities. All of these easily follow directly from the
definition of congruence.
Pay particular attention to the last two, as we will be using them quite often.
(a) a a ( mod m )
Exercise 2: Verify parts (d) and (e) of the theorem in the following way. Write down two
separate congruences with the same modulus that we know are true, such as 9 2 ( mod
7 ) and 17 3 ( mod 7 ). Now add and multiply these congruences to get two new
congruences. Check if the new congruences are true.
Exercise 3: Prove the following statement. "If a b ( mod m ), then a2 b2 ( mod m )".
Hint: Do not fall back on the definition. Use the theorem above instead!
You have probably guessed that the statement in Exercise 3 can be generalized to say,
Have you ever wondered what is the use of "lame" properties like (a) in the last theorem?
Well, read on. The last two properties ( (d) and (e) ) in the theorem basically say that we
can add or multiply congruences. But how about adding an equation to a congruency or
multiplying a congruency by an equation? Note that "adding an equation to a
congruency" is a fancy way of saying adding the same integer to both sides of a
congruency. Similarly the other fancy phrase means multiplying both sides of a
congruency by the same number. Intuition tells us that these two operations must be
permissible. In fact, not only they are allowed, but also we will be using them quite often.
Let's state them as a theorem and prove it.
ca cb ( mod m ).
Even before you had a look at the proof above, you probably guessed that the "lame"
properties are there for a very good reason. The proof above gives us a glimpse of this
"reason".
Exercise 4: Start with a congruency that we know is true, like 9 2 ( mod 7 ). Now think
of an integer and multiply both sides of the congruency by that integer. Check if the
congruency still holds.
Repeat with another integer. Now repeat the whole process, starting with a fresh
congruency, this time with a non-prime modulus.
Conspicuously missing from all the properties sated so far is the division of a
congruence. Can we divide one congruency by another or by an integer? Unfortunately,
the answer in general, is no. However, not all is lost. We are allowed to divide a
congruency by some special numbers. But we will postpone this until the end of this
chapter, as this operation is more useful when dealing with the area of the next chapter,
which are linear congruences.
Now we will look at some examples to appreciate the usefulness of the congruences.
25 100 1 ( mod 3 ) and 11 500 1 ( mod 3 ). Adding these congruecies, we get 25 100 + 11
500
2 ( mod 3 ).
We also know that 5555 when divided by 4, gives a quotient of 1388 and the remainder
3.
Hence, 3 5555 = (3 4) 1388. 3 3. Now raising congruence (1) to the power of 1388, we have
(34)13881(mod80).
Thus the required remainder is 27. Unfortunately you cannot verify this by using your
pocket calculator!
3 1000 + 25 -3 + 3 0 ( mod 28 ).
The problem in the following example needs a little more ingenuity to solve. It is a
marvelous example of the power of congruences!
27 . 5 n ( mod 27 )
0 ( mod 27 ).
Example 5: Prove that in the base 8 system, a number is congruent to the sum of its
"digits" modulo 7.
Suppose that N is written as ak ak-1.. a1a0 in the base 8 system.
Now 8 1 ( mod 7 ) and raising the power, we have 8n 1 ( mod 7 ) for all integer n.
Thus we have
ak.8k ak ( mod 7 ), ak-1.8k-1 ak-1 ( mod 7 ), ... a1.81 a1 ( mod 7 ), a0.1 a0 ( mod 7 ).
Adding, we get N = ak.8k + ak-1.8k-1 + ...+ a1.81 + a0.1 ak + ak-1 + ...+ a1 + a0 ( mod 7
)
Dividing a Congruence
Finally we are going to see if we can divide a congruence. Consider a simple congruency,
that we know is true, for example, 14 4 ( mod 10 ). If we divide both sides by 2, we get
7 2 ( mod 10 ), which clearly is not true. On the other hand, the true congruence 33 3
( mod 10 ), upon division by 3 gives 11 1 ( mod 10 ) which is also true. The following
theorem tells us when and with what can we divide a congruence. Essentially, it says that
we can divide by a number that is relatively prime to the modulus.
Proof: Note that we already know that a b ( mod m ) implies ca cb ( mod m ), from
Theorem 2. We will prove the other direction, which is what is new, and that allows us to
divide. That is,
Hence a b ( mod m ).
Exercise 7: Consider the following congruences, where x is an integer. State which of
these can be simplified by division, and if so, state the biggest number by which you are
allowed to divide.
Congruences
2. Write down a complete residue system modulo 6 consisting only of negative numbers.
4. Find the least residue of 1492 ( mod 4), ( mod 10 ), and ( mod 101). No tricks here !
Just divide !!
7. Does 28x 14 ( mod 12 ) imply 4x 2 ( mod 12) ? Why ? Does the later congruence
imply 2x 1 ( mod 12 ) ? Why ?
10. Write a single congruence that is equivalent to the pair of congruencies x 1 ( mod 4
) , x 2 ( mod 3 ).
12. Prove that 10 k 1 ( mod 9 ) for every positive integer k.
14. Find the missing digit in the multiplication 31415 . 92653 = 2910?93995
15. Show that every prime greater than 3 is congruent to 1 or 5 ( mod 6).
19. Prove an integer is congruent ( mod 10 ) to its units digit ( last digit ). Use this to
prove that the fourth power of an integer must have 0,1, 5, or 6 for its units digit.
20. Show that if n 4 ( mod 9 ), then n cannot be written as the sum of three cubes.
3 . What is the least residue of 5 10 ( mod 11), 5 12( mod 11 ) , 1945 12 ( mod 11) ?
10. Show that if p is an odd prime, then 2(p - 3)! -1 (mod p).
5. If a is a positive integer, what is (a, 2a)? What is (a, a2)?, (a, a + 1)?, and (a, a + 2)?
8. Prove that square of an integer is either a multiple of 4 or one more than a multiple of
4.
10. Prove that 3, 7, 11 is the only set of three consecutive primes of the form p, p + 4, p +
8.
11. Prove that there are infinitely many primes of the form 4n + 3.
3 Prove directly from the well-ordering principle, that every integer greater than 1 has a
prime divisor.
4. Prove that the well-ordering principle implies the Archimedean Axiom: " if a and b are
positive integers, there exists an integer N such that aN b".
Extra
3. What is the remainder when 314 164 is divided by 165? ( Watch out - 165 is not a
prime!).
5. If a | c and b | c and (a, b) = 1, prove that ab | c. Give an example to show that the
assumption (a, b) = 1 is needed.
25 years
1. Prove if ( a, b) = 1 and c | b, then (a, c) =1.
6. Prove if a and b are relatively prime, then so are ak and bn, where k and n are positive
integers.
10. Prove if C is a complete residue system modulo m and (a, m) = 1, then the set
12. Write down a reduced residue system for mod 6, mod 7, mod 8, mod 10, mod 11,
mod 12,
13. How many positive integers are there that are less than or equal to, and
14. How many positive integers are there that are less than or equal to, and
15. How many positive integers are there that are less than or equal to, and
16. How many positive integers are there that are less than or equal to, and
relatively prime to the following numbers:- 55, 45, 24, 100, 10000.
17. Write down a reduced recidue system modulo 2m, where m is a positive integer.
18. Find the remainder when 3100000 is divided by 35; when 131954 is divided by 60.