Loading [MathJax]/jax/element/mml/optable/BasicLatin.js
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 [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 aamod So using residue classes modulo m this gives [a]=[a\bmod m].\nonumber

Hence,

[a]+[b]=[(a+b)\bmod m]\nonumber

[a][b]=[(ab)\bmod m]\nonumber

So if a and b are in the set \{0,1,\dotsc,m-1\}, 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 \mathbb{Z}_m and addition and multiplication in \mathbb{Z}_m. For clarity we will use different notation.

Definition \PageIndex{2}

For m>0 define J_m=\{0,1,2,\dotsc,m-1\}\nonumber and for a,b\in J_m define \begin{aligned} a\oplus b &=(a+b)\bmod m \\ a\odot b &=(ab)\bmod m.\end{aligned}

Remark \PageIndex{1}

J_m with \oplus and \odot as defined is isomorphic to \mathbb{Z}_m with addition and multiplication given by Definition \PageIndex{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 J_4 are:

Table \PageIndex{3}

\oplus 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 \PageIndex{4}

\odot 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 \PageIndex{2}

Prove that for every modulus m>0 we have for all a,b\in J_m [a]+[b]=[a\oplus b],\nonumber and [a][b]=[a\odot b].\nonumber

Exercise \PageIndex{3}

Construct addition and multiplication tables for J_5.

Exercise \PageIndex{4}

Without doing it, tell how to obtain addition and multiplication tables for \mathbb{Z}_5 from the work in Exercise \PageIndex{3}.

Example \PageIndex{3}

Let’s solve the congruence \label{eq:1} 272x\equiv 901\pmod 9. Using residue classes modulo 9 we see that (1) is equivalent to \label{eq:2} [272x]=[901] which is equivalent to \label{eq:3} [272][x]=[901] which is equivalent to \label{eq:4} [2][x]=[1]. Now we know [x]\in\{[0],[1],\dotsc,[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?