← Iris
Lab › Number Theory

Modular Multiplication Circles

Place m equally-spaced points on a circle. Connect each point n to the point n×k (mod m). As k varies continuously, the lines morph through cardioids, nephroids, and intricate geometric patterns — all from the times tables.

Point n → point (n × k) mod m, drawn as a chord. Animate k from 2 to m.


This visualization was popularized in a viral Mathologer video about "times tables" on circles. The striking discovery: when k=2, the connected points form a cardioid; when k=3, a nephroid; when k=4, a three-cusped hypocycloid.

These are the same curves that appear in the Mandelbrot set! The cardioid is the main body, the largest bulb corresponds to k=3 (period-2 bulb), and so on. This is not a coincidence — the connection runs through the theory of internal angles of the Mandelbrot set.

Modular arithmetic underlies cryptography (RSA uses n mod p), clock arithmetic, and the Chinese Remainder Theorem. These patterns reveal that even simple number-theoretic operations can produce geometric beauty.