Loading...
Loading...
Number Theory · Axiom Academy
LESSON Modular Addition and Multiplication Master the fundamental operations of modular arithmetic and understand the ring structure When adding numbers modulo n, we add them normally and then take the remainder when divided by n. The key insight is that addition "wraps around" like a clock. Example in mod 5: What is 3 + 4 (mod 5)? 3 + 4 = 7, and 7 mod 5 = 2 Multiplication in modular arithmetic follows the same pattern: multiply first, then reduce modulo n. The distributive property still holds, making computations efficient. Example in mod 7: What is 5 × 6 (mod 7)? 5 × 6 = 30, and 30 mod 7 = 2 Subtraction is the inverse of addition. When subtracting in modular arithmetic, we can add the modulus to ensure we get a positive result. Example in mod 5: What is 2 - 4 (mod 5)? 2 - 4 = -2, and (-2 + 5) mod 5 = 3 Alternatively: 2 - 4 ≡ 2 + (-4) ≡ 2 + 1 ≡ 3 (mod 5) (since -4 ≡ 1 in mod 5) The integers modulo n form what mathematicians call a "ring" - a structure with both addition and multiplication that satisfy specific properties. 5. Why Division Requires Special Treatment Unlike addition and multiplication, division doesn't always work in modular arithmetic. We can only "divide" by numbers that have multiplicative inverses. Example in mod 6: • 5 has an inverse: 5 × 5 = 25 ≡ 1 (mod 6) ✓ • 2 has NO inverse: 2 × k can never equal 1 (mod 6) ✗ (because gcd(2, 6) = 2 ≠ 1) When n is prime: Every non-zero element has an inverse, making Z/pZ a "field" - you can always divide (except by 0)!
This is the written version of the interactive lesson above. See the full Number Theory course.