# Modular Arithmetic: Addition, Subtraction, Multiplication…

- July 30, 2021
- Posted by: LrnTube
- Category: Mathematics

**Contents**hide

**Definition of Modular Arithmetic**

**WATCH VIDEO**

Modular arithmetic is the type of arithmetic that is concerned with the remainder when an integer is divided by a fixed non-zero integer.

It is a system of arithmetic for integers, where numbers “wrap around” – kind of

like a cycle when they reach or get to a certain value, Known as modulus or moduli

in plural. The word remainder as used in the refers to the excess in number after a full

cycle has been completed.

**Modulo**

Modulo or modulus denoted by “mod” is the divisor representing one cycle. In

technical form, we can define modulo-plural form, moduli- as a fixed non-zero

integer that divides another integer to yield a quotient and a reminder.

Now, we perform the following divisions in mod 5 to determine the number

of cycles as well as the remainder in each case:

(i) 7 = 1, remainder 2.

(ii) 13 = 2, remainder 3.

(iii) 29 = 5, remainder 4.

(iv) 48 = 9, remainder 3.

**Residues In ****Modular Arithmetic**

The remainder that an integer will generate when it completely divides another

integer is called a residue.

The possible set of residues that the following integers can generate are:

(i) 3 – {0.1.2}

(ii) 4 – {0,1,2,3}

(in) 5 – {0,1,2,3,4), and so on.

In general

{0.1.2.3. ..P-1) is the possible set of residues when a division operation is performed

on a number in modulo P.

### Example 1

Write down the set of residues relative to:

(a) modulo 6 (b) modulo 7

**Solution**

(a) {0.1.2.3.4.5) is the possible set of residues, mod 6.

(b) {0.1.2.3,4,5,6) is the possible set of residues, mod 7.

## Addition and Subtraction in **Modular ****Arithmetic**

In modular arithmetic, addition and subtraction are symbolized by and respectively.

### Example 2

Find the additions in mod 5:

(i) 0 + 2 (ii) 1 + 2 (iii) 2 + 2 (iv) 1+2 (v) 3 + 2

**solution**

(i) 0+2=2

2/5= 0, remainder 2

(ii) 1+2=3

3/5=0, remainder 3

(iii) 2+2 = 4

4/5= 0, remainder 4

(iv) 3+2=5

5/5=1, remainder, 0 and so on.

In modular arithmetic, these additions are

symbolized as follows:

(1) 0+2 = 2 (mod 5)

(i) 1 + 2 = 3 (mod 5)

(m) 2 + 2 = 4(mod 5)

(iv) 3 + 2 = 0 (mod 5)

## Subtraction **Modular Arithmetic**

Subtractions are solved in modular arithmetic, as follows:

(1) 0-2 = -2 , -2 = -1×5+3 -1 = -1×5+4= 3

(ii) 1-2 = -1, -1 = -1 x 5 + 4= 4

(iii) 2-2 = 0, 05 = 0, remainder 0

(v) 3-2= 1, 15= 0, remainder 1, and so on

Hence for subtraction in mod 5

(1) 0 – 2=3(mod 5)

(i) 1 – 2= 4(mod 5)

(ii) 2 – 2 = 0(mod 5)

(iv) 3 – 2 = 1(mod 5)

### Example 3

Express each of the following additions in terms of the given modulo:

(a) 5 + 6 (mod 4) (b) 7 + 8 (mod 6)

(c) 9+12 (mod 8)

**Solution**

(a) **Step 1:** Add 5 and 6,

i.e. 5 + 6 = 11.

**Step 2:** Express 11 in terms of 4,

i.e. 2 x 4 +3.

(b) **Step 1:** Add 7 and 8,

i.e. 7 + 8 = 15.

**Step 2:** Express 15 in terms of 6,

i.e. 2 x 6 +3.

(c) 9+12=21

21=2 x 8 + 5

## Example 4

Reduce:

(a) – 23 (mod 4) (b) – 7 (mod 5) to the simplest form in the given modulo.

** **

**Solution**

**(a) Step 1:** Select the closest multiple of 4, which

is less than -23, i.e. – 24

**Step2:** Express -23 in terms of -24, i.e.

-23 = 24 + 1

=> -23 =-6×4 + 1

Hence, – 23(mod 4)

= 1 (mod 4)

(b)**Step 1:** Select the closest multiples of 5, which is less than-7, i.e. -10

**Step2:** Express – 7 in terms of -10, i.e.

– 7 = -10 + 3

=>-7=-2 x 5 + 3

**Hence,** – 7 (mod 5), = 3 (mod 5)

## Example 5

Express each subtraction in the form

axb+1, find the following in the given moduli:

(a) 11- 6 (mod 3) (b) 24 – 13 (mod 4)

(c) 17 + 26 (mod5)

**Solution**

(a) **Step1:** Subtract 6 from 11, i.e. 11-6=5

**Step2:** Select the closest multiple of 3, which is less than 5. i.e.3

**Step 3:** Express 5 in terms of the given mod. 3, i.e

5=3+2

5=1 x 3+2

Hence, 11 – 6(mod 3)

=> 5= 1 x 3+2

= 2 (mod 3)

We now apply the steps in (a) above to the solution of (b) and (c) without further

explanations

(b) 24 – 13 (mod 4).

=>11=8 +3

=>11=2 x 4+ = 3(mod 4)

(c) 17 + 26 (mod 5)

=>33 = 30 + 3

=> 33 = 6 x 5+3

= 3 (mod 5)

## Multiplication and Division in **Modular ****Arithmetic**

**Example 6**

Evaluate each of the following multiplications in modulo 5;

(a) 0 X 3 (b) 1 X 3 (c)2 X 3 (d)3 X 3

**Solution**

(a) 0 X 3(mod 5)

=>0 x 3= 0

05= 0, remainder 0.

(b)1X 3(mod 5)

=> 1×3=3, 35 =0, remainder 3.

(c) 2 X 3 (mod 5)

=> 2 x 3= 6

65 = 1, remainder 1.

(d) 3X 3 (mod 5)

=> 3 x 3=9

95 =1, remainder 4.

**Example 7**

Find the values of the following division, where possible, in modulo 5:

(a) 3/4 (b) 4/3 (c) 3/2 (d) 2/3 (e) 3/3

**Solution**

(a) 3/4= *? (mod5)

Step 1: If 3/ 4=X,

then 4x = 3 (mod 5)

Step 2: Recall that 3 is a remainder in mod 5, so we add 5 to convert it to

the dividend:

4x= 3+5=8 (dividend)

..x= 2

Hence, 3/4=2 (mod 5).

We now apply the steps in (a) above to the

solution of(b), (c) and (d).

(b) 4/3 (mod 5)

If 4 /3= x, then 3x = 4 (mod5)

=> 3x = 4 + 5 =9

x = = 3

Hence, 4/3=3 (mod 5)

(c) 3/2 (mod 5)

If 3/2= x, then 2x=3 (mod 5)

=> 2x = 3 + 5 = 8

Hence, 3/2 = 4(mod 5)

(d) 2/3 (mod 5)

As we have discussed,

if 2/3= x, then 3x = 2 (mod 5)

=>3x = 2 + 5 = 7.

This particular problem is naturally insoluble as 7 is NOT exactly divisible by 3. However, the problem can still be solved by adding another multiple of 5 (e.g. 10) to the right-hand side

(RhS) to make it exactly divisible by 3:

3x = 2+ 10 = 12

X = = 4

Hence 2/3 = 4 (mod 5)