# How do modular arithmetic rules hold for modulo with composite numbers?

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?

-
Of course it is – Harold Jan 3 '14 at 20:23
It is valid. No change required, except for clarity to replace $p$ by $m$. – André Nicolas Jan 3 '14 at 20:29
Perhaps it is just my browser but just before each instance of $p$ I see the character "%". I am not familiar with this notation. – Jay Jan 3 '14 at 20:48

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$.

-