Steply

Calculate (123 × 456) mod 7

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

Step by step

The question

Question: work out (123 × 456) mod 7.

(123 × 456) mod 7

Mod 7 means: the remainder after dividing by 7.

mod 7 = the remainder after ÷ 7

1 Each remainder

Divide 123 by 7: 7 goes 17 times, that is 119, and 4 is left over.

123 = 7 × 17 + 4

456 is 7 × 65, plus 1.

456 = 7 × 65 + 1

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

the 7s do not change the remainder

Careful!

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

Careful: not 4 × 456 ✗

2 Multiply the remainders

So we only need 4 × 1.

(123 × 456) mod 7 = (4 × 1) mod 7

4 times 1 is 4.

= 4 mod 7

4 is already from 0 to 6.

= 4

3 Check

With a calculator: 123 times 456 is 56088.

That is 7 times 8012, plus 4.

The same.

Right!

123 × 456 = 56088 = 7 × 8012 + 4

Let's look back.

First: each remainder.

Then: multiply the remainders.

Last: check.

Answer
= 4

Your turn

Try this one yourself, then check:

(119 × 455) mod 2
Show the answer
1

More from Remainders

The whole lesson: Remainders →