Thursday 13 July 2017

modular arithmetic - Why can we exchange numbers when working with modulo expressions?




Please excuse me if the answer is obvious because I'm a beginner.



Why can we exchange numbers when working with modulo expressions?



For example:



$$4^2 \equiv (-1)^2 \pmod{5}$$



You may say the replacement between $4$ and $-1$ is justified because:




$$4\equiv -1 \pmod{5}$$



I understand that equality, when you divide $4$ by $5$ you get a remainder $4$ and if we subtract $5$ from that we get $-1$. But I still don't understand why we can replace $4$ with $-1$.



Furthermore if $a\equiv c \pmod{b}$ are we justified in replacing $a$ with $c$ in every occasion?


Answer



You need the function you are dealing with to preserve multiplication. In fancier language, that means it is a homomorphism from $(\mathbb{Z},\cdot)$ to $(\mathbb{Z}/n\mathbb{Z},\cdot)$. In simpler language, that means that if $x,y$ are integers then $f(x \cdot y)=[x] \cdot [y]$, where the first $\cdot$ is integer multiplication, $[z]$ denotes the equivalence class of $z$ mod $n$, and the second $\cdot$ represents multiplication mod $n$. (Note that we often represent $[z]$ by the remainder of $z$ after division by $n$.)



For example $f : \mathbb{Z} \to \mathbb{Z}/n\mathbb{Z},f(x)=[x^2]$ is such a homomorphism, so $a^2 \equiv b^2 \mod n$ whenever $a \equiv b \mod n$. (Here $[y]$ denotes the equivalence class of $y$ mod $n$.) On the other hand, although $4 \equiv 9 \mod 5$, $2^4$ and $2^9$ are not equivalent mod 5.


No comments:

Post a Comment

real analysis - How to find $lim_{hrightarrow 0}frac{sin(ha)}{h}$

How to find $\lim_{h\rightarrow 0}\frac{\sin(ha)}{h}$ without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...