Steply

Calculate (45 - 19) mod 6

Step by step, with the reason for every step · Remainders · Discrete Math

Step by step

The question

Question: work out (45 − 19) mod 6.

(45 − 19) mod 6

Mod 6 means: the remainder after dividing by 6.

mod 6 = the remainder after ÷ 6

1 Each remainder

Divide 45 by 6: 6 goes 7 times, that is 42, and 3 is left over.

45 = 6 × 7 + 3

19 is 6 × 3, plus 1.

19 = 6 × 3 + 1

Only the remainders matter: the groups of 6 can never change what is left over.

the 6s do not change the remainder

Careful!

Every number is swapped for its remainder, not just the first one.

Careful: not 3 − 19 ✗

2 Subtract the remainders

So we only need 3 − 1.

(45 − 19) mod 6 = (3 − 1) mod 6

3 minus 1 is 2.

= 2 mod 6

2 is already from 0 to 5.

= 2

3 Check

With a calculator: 45 minus 19 is 26.

That is 6 times 4, plus 2.

The same.

Right!

45 − 19 = 26 = 6 × 4 + 2

Let's look back.

First: each remainder.

Then: subtract the remainders.

Last: check.

Answer
= 2

Your turn

Try this one yourself, then check:

(50 − 24) mod 9
Show the answer
8

More from Remainders

The whole lesson: Remainders →