Arithmetic That Wraps Around
Modular arithmetic is the mathematics of things that cycle, like clocks and days of the week. We write:
This means is congruent to modulo , meaning they leave the same remainder when divided by , or equivalently, . For example, .
Congruence is an equivalence relation partitioning integers into residue classes for remainders .
| Property | Meaning |
|---|---|
| Addition | |
| Multiplication |
Because congruence is compatible with arithmetic, you can reduce as you go. To find , use to get , avoiding 289.
The Division Exception
Division is the exception in modular arithmetic. You cannot freely divide congruences or cancel common factors as you do in standard algebra.
| Operation | Allowed? | Rule |
|---|---|---|
| Add / Sub / Mul | Yes | Substitute freely |
| Division | No | Requires inverse |
Common pitfall: Cancelling common factors blindly. For example, , but cancelling 2 gives the false statement .
Valid division mod relies entirely on multiplicative inverses, which only exist for numbers coprime to .