What does it mean to "divide evenly"? Why number theory begins with mod
The modular reduction map is a projection that deliberately discards information. Clocks, days of the week, and the competitive-programming modulus 10^9+7 all share the same algebraic structure. From the definition of divisibility through congruences to the ring Z/nZ, we uncover the reason number theory starts where it does.
Open any number theory textbook and, within the first few pages, you will encounter the notation . What the textbook rarely pauses to explain is why number theory begins with remainders. In this article we shall see that the mod operation is a deliberate act of forgetting – a projection that discards the quotient and retains only the remainder – and that the arithmetic of clocks, calendars, and competitive-programming problems all rest on exactly the same algebraic foundation.
1 Divisibility: the starting point
Divisibility is deceptively simple, yet it carries powerful consequences.
If and , then and .
If , then for every integer .
If and , then (transitivity).
Each of these is straightforward to prove, but together they express a single essential fact: the divisibility relation is preserved under linear combinations.
2 The Division Theorem: existence and uniqueness of remainders
This theorem guarantees that the remainder is well-defined – a fact on which the entire theory of congruences depends.
3 Congruences: focusing on remainders
The power of congruences lies in their compatibility with arithmetic.
4 Everyday mod: clocks, calendars, and
Modular arithmetic pervades daily life.
is a prime. Working modulo a prime guarantees that every nonzero element has a multiplicative inverse, so division is possible (a point we shall develop in a later article).
, so the product of two residues satisfies and fits in a 64-bit integer.
5 Mod as information projection
6 A first look at the ring
Equipping the set of remainders with addition and multiplication gives the algebraic structure denoted .
7 Takeaway
Divisibility is the most fundamental relation in number theory.
Congruences formalize the idea of "looking only at remainders," and they are compatible with addition and multiplication.
The mod operation is a projection that deliberately discards information. Clocks, days of the week, and the modulus all share the same underlying structure.
endows the world of remainders with an algebraic structure; when is prime, that structure is a field.
In the next article, we turn to the computation of greatest common divisors – the Euclidean algorithm – and ask why its simple recursion always finds the largest common factor.
Mathematics "between the lines" — exploring the intuition textbooks leave out, written in LaTeX on Folio.