Loading [MathJax]/jax/output/HTML-CSS/jax.js
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

3.2: Modulo Arithmetic

( \newcommand{\kernel}{\mathrm{null}\,}\)

In this section, we will explore arithmetic operations in a modulo world.

Let nZ+.

Theorem 5 :

Let a,b,c,d,Z such that ab(modn) and cd(modn). Then (a+c)(b+d)(modn).

Proof:

Let a,b,c,dZ, such that ab(modn) and cd(modn).

We shall show that (a+c)(b+d)(modn).

Since ab(modn) and cd(modn),n(ab) and n(cd)

Thus a=b+nk, and c=d+nl, for k and lZ.

Consider(a+c)(b+d)=ab+cd=n(k+l),k+lZ.

Hence (a+c)(b+d)(modn).

Theorem 6:

Edit section

Let a,b,c,d,Z such that ab(modn) and cd(modn). Then (ac)(bd)(modn).

Proof:

Let a,b,c,dZ, such that ab(modn) and cd(modn).

We shall show that (ac)(bd)(modn).

Since ab(modn) and cd(modn),n(ab) and n(cd)

Thus a=b+nk, and c=d+nl, for k and lZ.

Consider (ac)(bd)=(b+nk)(d+nl)bd=bnl+dnk+n2lk=n(bl+dk+nlk), where (bl+dk+nlk)Z.

Hence (ac)(bd)(modn).

Theorem 7:

Let a,b Z such that ab(modn). Then a2b2(modn).

Proof:

Let a,b Z, and n Z+, such that ab(modn).

We shall show that a2b2(modn).

Since ab(modn),n(ab).

Thus (ab)=nx, where x Z.

Consider (a2b2)=(a+b)(ab)=(a+b)(nx),=n(ax+bx),ax+bxZ.

Hence na2b2, therefore a2b2(modn).

Theorem 8:

Let a,b Z such that ab(modn). Then ambm(modn), Z.

Proof:

Exercise.

By using the above result we can solve many problems. Some of them are discussed below: 

Example 3.2.1: mod3 Arithmetic

Let n=3.

Addition

+ [0] [1] [2]
[0] [0] [1] [2]
[1] [1] [2] [0]
[2] [2] [0] [1]

Multiplication

x [0] [1] [2]
[0] [0] [0] [0]
[1] [0] [1] [2]
[2] [0] [2] [1]

Example 3.2.2: mod4 Arithmetic

Let n=4.

x [0] [1] [2] [3]
[0] [0] [0] [0] [0]
[1] [0] [1] [2] [3]
[2] [0] [2] [0] [2]
[3] [0] [3] [2] [1]

Example 3.2.3:

Find the remainder when (101)(103)(107)(109) is divided by 11.

Answer

1012(mod11)

1034(mod11)

1078(mod11)

10910(mod11).

Therefore,

(101)(103)(107)(109)(2)(4)(8)(10)(mod11)2(mod11).

Example 3.2.4:

Find the remainder when71453 is divided by 8.

Answer

701(mod8)

717(mod8)

721(mod8)

737(mod8),

As there is a consistent pattern emerging and we know that 1453 is odd, then 714537(mod8). Thus the remainder is 7.

Example 3.2.5:

Find the remainder when 72020 is divided by 18.

Answer

701(mod18)

717(mod18)

7213(mod18)

731(mod18),

As there is a consistent pattern emerging and we know that 2020=(673)3+172020=7(673)3+1=(73)673717(mod18). Thus the remainder is 7.

Example 3.2.6:

Find the remainder when 261453 is divided by 3.

Odd and Even integers:

An integer n is even iff n0(mod2).

An integer n is odd iff n1(mod2).

Two integers a and b are said to have some parity if they are both even or both odd otherwise a and b are said to have different parity.

Example 3.2.6:

Show that the sum of an odd integer and an even integer is odd.

Answer

Proof: Let a be an odd integer and let b be an even integer. We shall show that a+b is odd by using the language of congruency.

Since a is odd, a1(mod2).

Since b is even, b0(mod2).

Then (a+b)(1+0)(mod2),

(a+b)1(mod2).

Hence a+b is odd.

Example 3.2.7:

Show that the product of an odd integer and an even integer is even.

Answer

Proof: Let a be an odd integer and let b be an even integer. We shall show that ab is even by using the language of congruency.

Since a is odd, a1(mod2).

Since b is even, b0(mod2).

Then (ab)(1)(0)(mod2),

(ab)0(mod2).

Hence ab is even.

Example 3.2.8:

Show that n2+1 is not divisible by 3 for any integer n.

Answer

Proof: Let nZ. We shall show that (n2+1) is not divisible by 3 using the language of congruency.

We shall show that (n2+1)(mod3)0 by examining the possible cases.

Case 1: n0(mod3).

n202(mod3).

(n2+1)1(mod3).

Hence n2+1 is not divisible by 3.

Case 2: n1(mod3).

n212(mod3).

(n2+1)1(mod3).

Hence n2+1 is not divisible by 3.

Case 3: n2(mod3).

n222(mod3)1(mod3).

(n2+1)2(mod3).

Hence n2+1 is not divisible by 3.

Since none of the possible cases is congruent to 0(mod3),n2+1 is not divisible by 3.

Example 3.2.9:

Show that 5a5+4a for any integer a.

Answer

Notice that 41(mod5). Therefore, 5a5+4a iff 5a5a for all integer a.

Let .

We shall show that .

Then and .

We will proceed by examining the 5 possible cases of \( . \) Specifically, .

Case : If then

.

Thus .

Case : If then

.

Thus .

Case : If then

.

Thus .

Case : If then

.

Thus .

Case : If then

.

Thus .

Having examined all possible cases, .◻

 

Answer

Let where and .

Then .

Thus . Rearranging, we obtain .

Consider

.

Let .

Since , then .

Thus .

Clearly, . We shall examine the possible cases of .

Case b=0: If then . Thus .

Case b=1: If then and where q .

Thus .

Case b=2: If then and .

Thus .

Case b=3: If then and .

Thus .

Case b=4: If then and .

Thus .

Having examined all possible cases, .◻

Example 3.2.10

Answer

Proof:

Let be the statement .

says that .

says that . Since and , is true.

Assume is true for some .

We will show that is true.

Specifically, we will show that .

Consider that

.

Since , .

Let .

Thus .

Having shown the inductive step, for every positive integer , is divisible by .

 

ISBN Check Digit

ISBN is the abbreviation for the International Standard Book Number. ISBN numbers are 10 digits in length. In an ISBN of the form X-XX-XXXXXX-X:

  • The first block of digits on the left represents the language of the book (0 is used to represent English).
  • The second block of digits represents the publisher.
  • The third block of digits represents is the number assigned to the book by the publishing company.
  • The fourth block consists of the check digit.

Consider the ISBN 0-13-190190-?

To determine the check digit for this Book Number, follow the below steps.

Step 1: Multiply all nine assigned digits by weighted values. The weighted values are 1 for the first digit from the left, 2 for the second digit, three for the third digit, etc.

10+21+33+41+59+60+71+89+90=139.

Step 2: ISBN uses (mod11) to determine the check digit. So 139=11(11)+7 so 1397(mod11). Hence the check digit is 7. Note that X is used for 10.

If someone orders a book by the ISBN number then the check digit is a way of ensuring that the number was reported and recorded correctly so that the correct book is obtained.


This page titled 3.2: Modulo Arithmetic is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Pamini Thangarajah.

Support Center

How can we help?