Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|cite|improve this question
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$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.