Suppose that a is an integer. If a is nonzero, not every integer b is a divisor of a. If b (not equal to 0) does not divide a, then there is a remainder after division of a by b. Here is a precise statement about division with remainder.

Theorem

If a element of Z and b element of N\{0}, then there are exactly one q element of Z and one r element of Z such that

a = qb + r   and   0 less than or equal r < b.

This theorem states that there exist a quotient q and a remainder r, but it does not tell you how to find those two integers. However, the proof that we give here is constructive: it provides an algorithm to find q and r.

Notation: The remainder r is often denoted by a mod b.