All courses › Discrete Mathematics › Modular arithmetic
Modular arithmetic
Modular arithmetic is about the remainder after integer division, like a clock that starts over. Two numbers are congruent modulo n if they leave the same remainder. It is used in check digits, hashing and cryptography.
a and b leave the same remainder when divided by n
work with remainders along the way
Symbols
| remainder of integer division | ||
| modulus |
Example
Which weekday is it in 100 days if today is Monday?
, so it will be Wednesday.
Reduce the numbers along the way, so you never have to handle huge numbers.
Practise graphs and modular arithmetic for free →
← Graphs · Greatest common divisor →
Part of Discrete Mathematics: Graphs and modular arithmetic.