Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

1.21: Addition and Multiplication in Zm

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

In this chapter we show how to define addition and multiplication of residue classes modulo m. With respect to these binary operations Zm is a ring as defined in Appendix A.

Definition 1.21.1

For [a],[b]Zm we define [a]+[b]=[a+b] and [a][b]=[ab].

Example 1.21.1

For m=5 we have [2]+[3]=[5], and [2][3]=[6]. Note that since 50(mod5) and 61(mod5) we have [5]=[0] and [6]=[1] so we can also write (1.21.1)[2]+[3]=[0][2][3]=[1].

Since a residue class can have many representatives, it is important to check that the rules given in Definition 1.21.1 do not depend on the representatives chosen. For example, when m=5 we know that [7]=[2] and [11]=[21] so we should have [7]+[11]=[2]+[21] and [7][11]=[2][21]. In this case we can check that [7]+[11]=[18] and [2]+[21]=[23]. Now 2318(mod5) since 52318. Hence [18]=[23], as desired. Also [7][11]=[77] and [2][21]=[42]. Then 7742=35 and 535 so 7742(mod5) and hence [77]=[42], as desired.

Theorem 1.21.1

For any modulus m>0 if [a]=[b] and [c]=[d] then [a]+[c]=[b]+[d] and [a][c]=[b][d].

Proof

(This follows immediately from Theorem 15.3 and Theorem 19.2.)

Exercise 1.21.1

Prove Theorem 1.21.1.

When performing addition and multiplication in Zm using the rules in Definition 1.21.1, due to Theorem 1.21.1, we may at any time replace [a] by [a] if aa(modm). This will sometimes make calculations easier.

Example 1.21.2

Take m=151. Then 1501(mod151) and 1492(mod151), so [150][149]=[1][2]=[2] and [150]+[149]=[1]+[2]=[3]=[148] since 1483(mod151).

When working with Zm it is often useful to write all residue classes in the least nonnegative residue system, as we do in constructing the following addition and multiplication tables for Z4.

Table 1.21.1

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

Table 1.21.2

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

Recall that by Exercise 15.1 we have for all a and m>0 aamodm(modm). So using residue classes modulo m this gives [a]=[amodm].

Hence,

[a]+[b]=[(a+b)modm]

[a][b]=[(ab)modm]

So if a and b are in the set {0,1,,m1}, these equations give us a way to obtain representations of the sum and product of [a] and [b] in the same set. This leads to an alternative way to define Zm and addition and multiplication in Zm. For clarity we will use different notation.

Definition 1.21.2

For m>0 define Jm={0,1,2,,m1} and for a,bJm define (1.21.2)ab=(a+b)modmab=(ab)modm.

Remark 1.21.1

Jm with and as defined is isomorphic to Zm with addition and multiplication given by Definition 1.21.1. [Students taking Elementary Abstract Algebra will learn a rigorous definition of the term isomorphic. For now, we take “isomorphic” to mean “has the same form.”] The addition and multiplication tables for J4 are:

Table 1.21.3

0 1 2 3
0 0 1 2 3
1 1 2 3 0
2 2 3 0 1
3 3 0 1 2

Table 1.21.4

0 1 2 3
0 0 0 0 0
1 0 1 2 3
2 0 2 0 2
3 0 3 2 1

Exercise 1.21.2

Prove that for every modulus m>0 we have for all a,bJm [a]+[b]=[ab], and [a][b]=[ab].

Exercise 1.21.3

Construct addition and multiplication tables for J5.

Exercise 1.21.4

Without doing it, tell how to obtain addition and multiplication tables for Z5 from the work in Exercise 1.21.3.

Example 1.21.3

Let’s solve the congruence (1.21.3)272x901(mod9). Using residue classes modulo 9 we see that (1) is equivalent to (1.21.4)[272x]=[901] which is equivalent to (1.21.5)[272][x]=[901] which is equivalent to (1.21.6)[2][x]=[1]. Now we know [x]{[0],[1],,[8]} so by trial and error we see that x=5 is a solution.


1.21: Addition and Multiplication in Zm is shared under a All Rights Reserved (used with permission) license and was authored, remixed, and/or curated by LibreTexts.

Support Center

How can we help?