Interactive exploration · Mathematics
Easy· IntuitionModular Arithmetic
An interactive modular addition table: pick a modulus and watch sums loop back, revealing the patterns hidden in remainders.
Explore the model
Mathematics
Modular Arithmetic
Origin
This is a “modular addition table” which is based on the branch of mathematics called Number Theory, specifically Modular Arithmetic. It’s based on the principle that if the sum of non-negative integers exceeds or falls exactly at the agreed number n, it will loop back. That is: for whole numbers x, y (0, 1, 2, 3, ...), if x + y ≥ n, where n is a positive integer and the agreed modulus, the possible values you can get for the sum x + y can correspond to set z: {0, 1, 2, 3, ..., n − 2, n − 1}. With that being said, since the sum will always result in a non-negative value, the sum can be represented as n × m + q, where m, q are whole numbers and q is an element in set z.
How it works
Choose your “n” value, ideally between 1–10 for simplicity, and say n = 5. A table will be generated with the headers of rows and columns being: 0, 1, 2, 3, 4. For example, according to modular arithmetic: 0 + 1 = 1, 3 + 2 = 0 (because 3 + 2 ≥ 5, so it can be represented as 5 × 1 + 0, thus we get zero). Similarly, 4 + 4 = 3 (4 + 4 ≥ 5 and 5 × 1 + 3); To simplify this, when n = 5, calculate the sum of two numbers in algebra, then repeatedly subtract n until the new value is less than n but still non-negative: 4 + 4 = 8, and 8 − 5 = 3, and 0 ≤ 3 < 5, so in modular arithmetic, 4 + 4 = 3.
Explore
Please feel free to explore this feature, and I highly suggest observing any noticeable and recurring trends or patterns. You can try the same steps but with multiplication on your own if you are really fascinated by this concept!