Modular Arithmetic
Modular arithmetic is a fascinating branch of mathematics that deals with numbers “wrapping around” when they reach a certain value, known as the modulus. Here are the key concepts: Definition: In modular arithmetic, we work with integers and consider their remainders when divided by a fixed quantity (the modulus). Think of it like a clock: after reaching 12 hours, the clock “wraps around” to 1. The modern approach to modular arithmetic was developed by Carl Friedrich Gauss The Modulus If $a$ is an integer and $n$ is a positive integer, we define $ a \: mod \: n $ to be the remainder when $a$ is divided by $n$ . The integer is called the modulus. Thus, for any integer , $$a = qn+r \quad 0 \le r \lt n \quad q=\lfloor a/n \rfloor$$ $$r= a - \lfloor a/n \rfloor .n $$ Example: $11 \: \mod \: 7 =4$ and $-11 \: \mod \: 7=3$ Two integers $a$ and $b$ are said to congruent modulo $n$, if $a \: \mod \: n= b \: \mod \: n$.This is written as $$a \equiv b (\mod...
Comments
Post a Comment