# Modular Arithmetic

Learn about modular arithmetic, congruence relations, and residue classes in this lesson.

We'll cover the following

## What is modular arithmetic?

Modular arithmetic is a system for the arithmetic of integers (or, to be precise: of congruences) that operates on the remainders of the integers divided by a fixed value called the modulus.

The system works similarly to the idea of clock arithmetic, where the sequence of numbers runs stepwise, starting from number 1, and after reaching the number 12, the numbers wrap around, and the sequence of numbers repeats itself again from 1. As a result, $11+3$ is not equal to $14$ anymore, but rather equal to $2$. Similarly, $4-7=9$, because 7 hours before it’s 4 o’clock, it was 9 o’clock. As a consequence, we can say that the numbers $-8$, $16$, and $28$ have the same meaning as $4$ because they have the same place on the dial, hence $-8$, $4$, $16$, and $28$ are equivalent to each other, or in a mathematical sense, $-8$, $16$, and $28$ are congruent to $4$ since division by $12$ gives the same remainder.

Get hands-on with 1200+ tech skills courses.