Steply

Calculate -7 mod 3

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

Step by step

The question

Question: work out −7 mod 3.

−7 mod 3

Mod 3 means: the remainder after dividing by 3.

It is always a whole number from 0 to 2.

mod 3 = the remainder after ÷ 3
always 0 to 2

1 Divide by 3

Divide −7 by 3.

For a negative number we go down to the multiple of 3 just below it: 3 × (−3) = −9.

Then up 2.

−7 = 3 × (−3) + 2

Careful!

A remainder is never negative.

We go down to the multiple just below, then count up.

Careful: not −7 mod 3 = −1 ✗

2 On the clock

Think of a clock with 3 numbers, 0 to 2.

So −7 mod 3 = 2.

−7 mod 3 = 2

3 Check

Multiply back: 3 times (−3), plus 2, is −7.

3 × (−3) + 2 = −9 + 2 = −7

And 2 is from 0 to 2.

Right!

0 ≤ 2 < 3

Let's look back.

First: divide by 3.

Then: on the clock.

Last: check.

Answer
−7 mod 3 = 2

Your turn

Try this one yourself, then check:

−11 mod 6
Show the answer
−11 mod 6 = 1

More from Remainders

The whole lesson: Remainders →