I know that (x*y)%p = ((x%p) * (y%p))%p holds true for a prime p. Is this equation valid when p is a composite number? How do we write this equation when p is a composite number?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
The map $\mathbb Z\to \mathbb Z/(n\mathbb Z)$ is a ring homomorphism; this means the operations of addition, subtraction, and multiplication in $\mathbb Z/(n\mathbb Z)$ behave in the expected way.
The unusual feature of multiplication in $\mathbb Z/(n\mathbb Z)$ when $n$ is composite is that the product of two nonzero elements can be zero, as in $2\cdot 3 \equiv 0 \mod 6$.