š¢Learn Modular Arithmetic Basics: Clock Math That Secures the Internet
Start with the clock on your wall and finish by encrypting a short message with a toy RSA example, using primes you pick yourself. You'll feel modular arithmetic as a living tool, not a programming operator.
Phase 1Clocks, Wraparound, and Equivalence Classes
Feel wraparound and equivalence classes through clocks
Your clock is already doing modular arithmetic
5 minYour clock is already doing modular arithmetic
Two numbers are 'the same' if they differ by a multiple of n
6 minTwo numbers are 'the same' if they differ by a multiple of n
Mod n turns infinity into a ring of n numbers
6 minMod n turns infinity into a ring of n numbers
You can reduce at every step without breaking anything
6 minYou can reduce at every step without breaking anything
Phase 2Arithmetic Inside a Finite World
Compute sums, products, and inverses mod small primes
Subtraction mod n is addition in disguise
5 minSubtraction mod n is addition in disguise
Build a multiplication table and spot the zeros
7 minBuild a multiplication table and spot the zeros
Some numbers have a multiplicative inverse ā and some don't
7 minSome numbers have a multiplicative inverse ā and some don't
Fast exponentiation: square, reduce, repeat
8 minFast exponentiation: square, reduce, repeat
Mod a prime, a^(pā1) always equals 1
7 minMod a prime, a^(pā1) always equals 1
Phase 3Where Modular Math Already Runs
See modular math inside RSA, hashing, and ISBNs
Your dictionary lookup relied on mod the whole time
6 minYour dictionary lookup relied on mod the whole time
The barcode on your book was mod 11
7 minThe barcode on your book was mod 11
What day of the week will Nov 7, 2055 be?
7 minWhat day of the week will Nov 7, 2055 be?
RSA is just Fermat's theorem wearing a suit
8 minRSA is just Fermat's theorem wearing a suit
Phase 4Your Own Toy RSA Cipher
Encrypt a short message using a toy RSA
Encrypt a short message with your own toy RSA
8 minEncrypt a short message with your own toy RSA
Frequently asked questions
- What is modular arithmetic in simple terms?
- This is covered in the āLearn Modular Arithmetic Basics: Clock Math That Secures the Internetā learning path. Start with daily 5-minute micro-lessons that build from fundamentals to hands-on application.
- Why is modular arithmetic used in cryptography like RSA?
- This is covered in the āLearn Modular Arithmetic Basics: Clock Math That Secures the Internetā learning path. Start with daily 5-minute micro-lessons that build from fundamentals to hands-on application.
- How is the mod operator different from 'true' modular arithmetic?
- This is covered in the āLearn Modular Arithmetic Basics: Clock Math That Secures the Internetā learning path. Start with daily 5-minute micro-lessons that build from fundamentals to hands-on application.
- What is Fermat's little theorem and why does it matter?
- This is covered in the āLearn Modular Arithmetic Basics: Clock Math That Secures the Internetā learning path. Start with daily 5-minute micro-lessons that build from fundamentals to hands-on application.
- Can I really do RSA by hand with small primes?
- This is covered in the āLearn Modular Arithmetic Basics: Clock Math That Secures the Internetā learning path. Start with daily 5-minute micro-lessons that build from fundamentals to hands-on application.
Related paths
ā«Understand the Fundamental Theorem of Calculus
Build the Fundamental Theorem of Calculus from accumulation first ā feel why differentiation undoes integration before you ever see the formal statement. You'll finish by pulling a real dataset and verifying the theorem numerically with your own code.
š§®Understand Vector Spaces: The Rulebook Behind Linear Algebra
See why polynomials, pixel images, and 3D arrows all live in the same mathematical world ā then design your own vector space of polynomials up to degree two and compute its dimension from scratch.
šUnderstand Correlation vs Causation With Real Examples
Go beyond 'correlation is not causation' ā learn to spot confounders, recognize when randomization or natural experiments are doing the real work, and leave with a 30-second rule of thumb you'll actually use on tomorrow's headline.
šµLearn Set Theory Basics: The Language Every Math Class Assumes
Stop squinting at āŖ, ā©, and ā ā shade Venn diagrams first, then translate them into clean notation, until you can model anything from music genres to probability events as sets you can actually picture.