The Quickest and easiest way to find the mod of a negative number is by using the below property

`if a = (b) mod c then a = (c*k + b) mod c (where k = 1,2,3.......) `

It simply says that the value of a is unchanged when we add a multiple of c to b

Example

```
a = (10) mod 3 we all know that a = 1 Now
a = (3*1 + 10) mod 3 - a is still = 1
a = (3*2 + 10) mod 3 - a is still = 1
a = (3*3 + 10) mod 3 - a is still = 1
a = (3*4 + 10) mod 3 - a is still = 1
```

So adding any multiple of 3 (> 0) to 10 does not effect the value of a

Now we use this to our advantage in finding mod of negative numbers

Example

a = (-10) mod 3

Now i add 12 to 10 as 12 is a multiple of 3 and hence the value of a will remain unchanged

so a = (3*4 – 10) mod 3 = 2 mod 3 = 2

easy isnt it?

Another example

a = (-340) mod 60

So a = (60*6 – 340) mod 60 = (360-340) mod 60 = 20 mod 60 = 20

## Comments

April 15, 2017 4:03 am

March 9, 2017 8:04 am

November 6, 2016 4:21 am

October 20, 2016 11:12 pm

October 9, 2016 7:16 am

August 5, 2016 8:56 pm

July 25, 2016 10:26 pm

August 25, 2015 4:27 am

November 30, 2014 1:56 pm

October 3, 2014 3:46 pm

March 13, 2014 4:14 pm

November 19, 2013 5:17 pm

May 4, 2012 8:20 am

May 4, 2012 12:41 pm