2.5.6 · D1Number Theory (Intermediate)

Foundations — Modular arithmetic — definition, addition, multiplication, congruence

1,779 words8 min readBack to topic

Before you can read a single line of the parent note, you need to own every symbol it throws at you. This page builds them one at a time, in an order where each new piece leans only on pieces already standing. Nothing is assumed — not even what a remainder is.


1. The number line and the integers

The picture: a straight line with evenly spaced dots, in the middle, positives marching right, negatives marching left.

Figure — Modular arithmetic — definition, addition, multiplication, congruence

Why the topic needs it: modular arithmetic only talks about integers. When the parent writes , all of , , , are integers — points on this line. Fractions never appear (that is exactly why "division" is the dangerous operation later).


2. Divides, quotient, and remainder — the Division Algorithm

Everything in this topic rests on one everyday act: splitting a pile into equal groups and seeing what's left over.

The rule that this pair always exists and is unique is the Division Algorithm — the true foundation stone of the whole chapter.

The picture: lay dots along the line, then chop the line into blocks of width . The number of complete blocks is ; the short stub past the last complete block is .

Figure — Modular arithmetic — definition, addition, multiplication, congruence

Why the topic needs it: the parent's second definition of congruence — "same remainder when divided by " — is meaningless until you know that "the remainder" is a single, well-defined number. The Division Algorithm guarantees it.


3. The symbol — "divides"

The picture: on the number line, lands exactly on one of the tick marks you'd hit by counting in steps of .

Why the topic needs it: the first definition of congruence says — that is exactly " divides ," or . So "divides" and "same remainder" are two costumes on the same idea, which we now have the tools to prove.


4. The letters — what each stands for

Symbol Plain-words role
the modulus — the wrap-around size, always a positive integer
the numbers we compare or combine
quotient — how many whole 's fit
remainder — the leftover, in
any integer multiplier (as in " is copies of ")

Why the topic needs it: every rule in the parent ("", "") is stated with these letters so it holds for all integers simultaneously. Reading modular arithmetic is largely reading these letters correctly.


5. Wrapping the line into a circle — the picture of "mod"

Now the key mental move. Take the number line from Section 1 and roll it up so that all stack on the same spot.

Figure — Modular arithmetic — definition, addition, multiplication, congruence

Every integer, positive or negative, lives at exactly one of the marks. That mark is its remainder.


6. The congruence symbol and the tag

Notice the symbol is (three bars), not (two bars). Two things being equal means identical numbers; being congruent means only "same clock position." and are not equal, but because both point at the mark.


7. Equivalence classes — the "buckets"

The picture: each mark on the circle is the mouth of a bucket; all integers funnelling into that mark live inside it.

Why the topic needs it: the parent's phrase "they're in the same bucket" and the claim that congruence is an equivalence relation (reflexive, symmetric, transitive) are exactly statements about these buckets. Reflexive = every number is in its own bucket; symmetric = bucket-sharing goes both ways; transitive = if share a bucket and share a bucket, then do too.


8. and coprime — the gate that guards division

The picture: list the tick-spacings that hit both numbers exactly; the biggest such spacing is the gcd. (See GCD and LCM for the full machinery.)

Why the topic needs it: the parent's "can't cancel in " fails precisely because . Division mod is legal only when the divisor is coprime to — the doorway into Modular Inverses and Linear Congruences.


Prerequisite map

Integers Z and the number line

Division Algorithm: a = qn + r

Quotient q and remainder r

Divides symbol n divides m

Wrap line into a circle of size n

Congruence a is congruent to b mod n

Equivalence classes the buckets

gcd and coprime

Division and inverses mod n

Modular arithmetic topic 2.5.6


Equipment checklist

Give a numeral or one-line answer, then reveal.

What set does modular arithmetic operate on, and what's its symbol?
The integers — whole numbers both directions from zero, no fractions.
In , what two conditions pin down uniquely?
It must satisfy , and by the Division Algorithm exactly one such exists.
Write " divides " in symbols and say it as a multiple.
, meaning for some integer .
What is the difference between and ?
means identical numbers; means same position on the size- clock (same remainder).
Compute .
, since lands in .
Which two everyday sentences both define ?
" and have the same remainder mod " and " divides ."
When are two integers coprime, and why does it matter here?
When ; only then can you legally divide (cancel) by that number mod .
How many equivalence classes are there modulo ?
Exactly — one per remainder .