# Modular multiplication

inspired by the work of mathematician Simon Plouffe

In mathematics, a multiplication table or times table defines a multipli-cation operation for an algebraic system. In the States, many educators teach elementary decimal multiplication with times tables up to 9 × 9.

In modular arithmetic, for a positive integer n, two numbers a and b are said to be congruent modulo n, if their difference ab is an integer multiple of n (that is, there is an integer k such that ab = nk). This congruence relation is typically denoted ab (mod n).

A familiar example of modular arithmetic is the 12-hour clock where numbers "wrap around" upon reaching the modulus (12). We can determine congruence between a certain hour on the 24-hour clock with an hour on the 12-hour clock using modular arithmetic: 15:00 is congruent to 3:00 because 15 - 3 is 12, an integer multiple 12.

By relating points on a unit circle, modular multiplication can be visualized another way. In the figure below, b and n remain constant at b = 2 and n = 12, while a is incremented from zero. For each a, we take the product of ab (mod n) and trace a line from a on the unit circle to the product ab (mod n).

As a is incremented, the same relations are repeated. Because of this, all values of a when b = 2 and n = 12 can be displayed simultaneously. This is akin to displaying a single row or column in a times table.

Staying within this single row/column, we can still vary the modulus n. For b = 2 and all a, increasing the modulus has the effect of revealing better and better approximations of a cardioid.

The resulting cardioid occurs in many places: in the epicycloid of two circles with equal radii where (R + r) / r = 2, in elliptical catacaustics, and as the main continent in the Mandelbrot set where fc(z) = z2 + c

Moving to the next column for b = 3 and for all a, increasing the modulus has the effect of revealing a nephroid.

The resulting nephroid occurs in many similar places: in the epicycloid of two circles where (R + r) / r = 3, in circular catacaustics, and as the main continent in the Multibrot set where fc(z) = z3 + c.