Divisibility

$$a = qb + r, \quad\hbox{where}\quad 0 \le r < b.$$


You probably know that division can be defined in terms of multiplication. If m and n are integers and $m \ne 0$ , m divides n if $n = mk$ for some integer k. In this section, I'll look at properties of the divisibility relation.

I'll begin by discussing the Division Algorithm, which tells you something you've known since grade school --- namely, that you can divide one integer by another. Note that this isn't the {\it long-division algorithm}, which tells you how to divide one integer by another. The Division Algorithm follows from the Well-Ordering Axiom for the nonnegative integers.

Well-Ordering Axiom. The positive integers $\integer^+$ are well-ordered --- that is, every nonempty subset of the positive integers has a smallest element.

Even though your experience with the integers may lead you to think this is obvious, it's actually an axiom of the positive integers $\integer^+$ . It has many important consequences; mathematical induction is one, and the Division Algorithm is another.

Note that Well-Ordering applies to nonempty subsets of the {\it nonnegative} integers as well. If such a subset contains 0, then 0 is the smallest element; if the subset doesn't contain 0, then it consists of only positive integers, and Well-Ordering for the positive integers implies that it has a smallest element.


Example. ( Applying the Well-Ordering Axiom) Show that there is no positive integer less than 1.

In this proof, I'm going to assume familiar facts about inequalities involving integers, since the point is to illustrate how you might use Well-Ordering.

Suppose that there is a positive integer less than 1. Let S be the set of positive integers less than 1. Then S is nonempty, so by Well-Ordering, S has a smallest element.

Suppose that x is the smallest element of S. Now $0 < x < 1$ , so multiplying by x, I get

$$0 < x^2 < x, \quad\hbox{and}\quad x < 1, \quad\hbox{so}\quad 0 < x^2 < x < 1.$$

Thus, $x^2$ is a positive integer less than 1 which is smaller than x. This is a contradiction. Therefore, there is no positive integer less than 1.


Theorem. ( The Division Algorithm) Let a and b be integers, with $b > 0$ . There are unique integers q and r such that

$$a = b\cdot q + r, \quad\hbox{and}\quad 0 \le r < b.$$

Of course, q is the quotient and r is the remainder.

Proof. What is division? Division is successive subtraction. Therefore, you ought to be able to find r by subtracting multiples of b from a until the result becomes negative. For example, if you're dividing 23 by 7, you'd do this:

$$23 - 7 = 16, \quad 23 - 2\cdot 7 = 9, \quad 23 - 3\cdot 7 = 2, \quad 23 - 4\cdot 7 = -5. \quad\hbox{(Negative!)}$$

The quotient is 3 --- the last multiple of 7 which gave a nonnegative result. The last nonnegative result is the remainder, which is 2.

To do the proof, I have to take the idea exhibited in this example and write it out in general (with a, b, q, and r instead of specific numbers).

Look at the set of integers

$$S = \{a - bn \mid n \in \integer\}.$$

If I choose $n < \dfrac{a}{b}$ (as I can --- there's always an integer less than any number), then $bn < a$ , so $a - bn > 0$ . This choice of n produces a positive integer $a - bn$ in S. So the subset T consisting of nonnegative integers in S is nonempty.

Since T is a nonempty set of nonnegative integers, I can apply Well-Ordering. It tells me that there is a smallest element $r \in T$ . Thus, $r \ge 0$ , and $r = a - bq$ for some q (because $r \in T$ , $T \subset S$ , and everything in S has this form).

Moreover, if $r \ge b$ , then $r - b \ge 0$ , so

$$a - bq - b \ge 0, \quad\hbox{or}\quad a - b(q + 1) \ge 0.$$

So $a - b(q + 1) \in T$ , but $r
   = a - bq > a - b(q + 1)$ . This contradicts my assumption that r was the smallest element of T.

All together, I now have r and q such that

$$a = b\cdot q + r, \quad\hbox{and}\quad 0 \le r < b.$$

To show that r and q are unique, suppose $r'$ and $q'$ also satisfy these conditions:

$$a = b\cdot q' + r', \quad\hbox{and}\quad 0 \le r' < b.$$

Then

$$b\cdot q + r = b\cdot q' + r', \quad\hbox{so}\quad b(q - q') = r' - r.$$

But r and $r'$ are two nonnegative numbers less than b, so they are both in the range $0 \le x < b$ . Therefore, they have to be less than b units apart. But the last equation says they are $|b(q - q')|$ units apart --- a multiple of b).

The only way r and $r'$ can be less than b units apart and a multiple of b units apart is if the multiple in question is 0. That is, $|b(q - q')| = 0$ . Since $b > 0$ , this means that $q - q' = 0$ , or $q = q'$ . If I plug $q = q'$ back into $b(q -
   q') = r' - r$ , I find that $r' - r = 0$ , so $r = r'$ . This proves that r and q are unique.


Example. ( Applying the Division Algorithm) (a) Find the quotient and remainder when the Division Algorithm is applied to divide 99 by 13.

$$99 = 7\cdot 13 + 8.$$

The quotient is 7 and the remainder is 8. According to the proof of the theorem, 8 should be the smallest positive number of the form $99 + k\cdot 13$ . In this case,

$$8 = 99 + (-7)\cdot 13.$$

Clearly, adding multiples of 13 to $99 + (-7)\cdot 13$ will give numbers larger than 8, whereas subtracting multiples of 13 from $99 + (-7)\cdot 13$ will give negative numbers.

(b) Find the quotient and remainder when the Division Algorithm is applied to divide -99 by 13.

$$-99 = (-8)\cdot 13 + 5.$$

Note that $0 \le 5 < 13$ . I don't write $-99 = (-7)\cdot 13 + -8$ (even though the equation is correct), because -8 is not between 0 and 13. The Division Algorithm always produces a nonnegative remainder.


Definition. If m and n are integers and $m \ne 0$ , then m divides n if $mk = n$ for some integer k.

The notation $m \mid n$ means that m divides n; $m \notdiv n$ means that m does not divide n.

If $m \mid n$ , then $mk = n$ . k is unique, by the Division Algorithm; it's the quotient of n by m. Note that without the stipulation that $m \ne 0$ , the quotient of 0 by 0 is not unique: $0\cdot 13 =
   0$ , but $0\cdot 57 = 0$ as well.

Remark. Be careful not to write "$\dfrac{n}{m}$ ", "$n/m$ ", or "$n \div m$ " when you mean "$m \mid n$ "!

"$\dfrac{n}{m}$ ", "$n/m$ ", and "$n \div m$ " all mean "n {\it divided by} m". Notice that this isn't a statement, since it's not a complete sentence that can be true or false --- it's an {\it expression}. On the other hand, "$m \mid n$ " means "m divides n", which is a statement.

Lemma.

(a) Let $m, n \in \integer$ . If $m \mid n$ and $n \mid p$ , then $m \mid p$ .

(b) Let $m, n \in \integer$ . If $m \mid n$ , then $m \mid an$ for all $a \in
   \integer$ .

(c) Let $m, n, p \in \integer$ . If $m \mid n$ and $m \mid p$ , then $m \mid n +
   p$ .

(d) Let $m, n, p \in \integer$ . If $m \mid n$ and $m \mid p$ , then $m \mid an
   + bp$ for all $a, b \in \integer$ .

(e) If $m \mid n$ and $m,
   n \in \integer^+$ , then $m \le n$ .

Proof. The idea in divisibility proofs is often to translate statements like "$m \mid n$ " into equations like "$mk = n$ ", then work with the equations.

(a) $m \mid n$ implies $mk = n$ for some k. $n \mid p$ implies $nj = p$ for some j. Substituting the first equation into the second gives

$$(mk)j = p, \quad\hbox{i.e.}\quad m(kj) = p,$$

so $m \mid p$ .

(b) $m \mid n$ implies $mk = n$ for some k. Then $mka = an$ , and so $m \mid
   an$ .

(c) $m \mid n$ implies $mk = n$ for some k, and $m \mid p$ implies $mj = p$ for some j. Then

$$n + p = mk + mj = m(k + j), \quad\hbox{so}\quad m \mid n + p.$$

(d) Since $m \mid n$ , $m
   \mid an$ by (b); since $m \mid p$ , $m \mid bp$ by $(b)$ . Therefore, $m \mid an + bp$ by (c).

(e) Suppose $m \mid n$ and $m,
   n \in \integer^+$ . $m \mid n$ implies $km = n$ for some $k \in \integer$ ; k must be a positive integer, since m and n are positive integers. Thus, $k
   \ge 1$ , and multiplying both sides of this inequality by m gives

$$n = km \ge m.\quad\halmos$$


Example. ( Illustrating divisibility for specific numbers) $6 \mid 72$ , since $6\cdot
   12 = 72$ . $-5 \mid 25$ , since $(-5)\cdot (-5) = 25$ .

If n is any integer, $1 \mid n$ , since $1\cdot n = n$ .

Likewise, if n is a nonzero integer, then $n \mid 0$ , since $n\cdot 0
   = 0$ .

Warning: $7 \mid (-7)$ and $(-7) \mid 7$ , so $m \mid n$ and $n \mid m$ do not imply that $m = n$ --- only that $m
   = \pm n$ .


Example. ( Proving a divisibility property) Prove that if m and n are positive integers, $m \mid n$ , and $n \mid m$ , then $m = n$ .

One approach is to use property (e) of the preceding lemma. Since m and n are positive integers, $m
   \mid n$ implies $m \le n$ , and $n \mid m$ implies $n \le m$ . The two inequalities imply that $m = n$ .

Here's another proof which uses the definition of divisibility.

Since $m \mid n$ , $ma =
   n$ for some $a \in \integer$ . Since $n \mid
   m$ , $nb = m$ for some $b \in
   \integer$ . Hence, $m(ab) = m$ . Since $m > 0$ , I may cancel it from both sides to obtain $ab = 1$ .

a and b are integers, so either $a = b = 1$ or $a = b = -1$ . But if $a =
   -1$ , then $m\cdot (-1) = n$ , which is impossible since m and n are positive. Therefore, $a = 1$ , so $m
   = n$ .


Example. ( Even and odd integers) An integer $n \in
   \integer$ is even if $2 \mid n$ . An integer is odd if it is not even.

(a) Prove that even integers can be written in the form $2m$ for some $m \in
   \integer$ , and odd integers can be written in the form $2m + 1$ for some $m \in \integer$ .

If n is even, then $2 \mid n$ , so $2m = n$ for some $m \in
   \integer$ .

Suppose n is odd. Use the Division Algorithm to divide n by 2, obtaining a quotient of m and a remainder of r:

$$n = 2m + r, \quad\hbox{where}\quad 0 \le r < 2.$$

Now $0 \le r < 2$ implies that $r = 0$ or $r = 1$ . If $r = 0$ , the equation says $n = 2m$ , which means that n is even. But n was odd, so this is a contradiction. Therefore, $r
   = 1$ , and $n = 2m + 1$ .

(b) Prove that if $n \in
   \integer$ is even, so is $n^2$ .

Suppose $n \in \integer$ is even. By (a), $n = 2m$ for some $m \in
   \integer$ . Then

$$n^2 = (2m)^2 = 4m^2 = 2(2m^2).$$

Therefore, $2 \mid n^2$ , and $n^2$ is even.

Note: It would not be a good proof to stop with "$4m^2$ " and say "$n^2$ must be even, because I know that $4m^2$ is even". While it's true that $4m^2$ is even, you haven't proved that yet. All you know at the moment is that even numbers are numbers that are divisible by 2. So you have to write $4m^2$ as $2(2m^2)$ , which shows {\it explicitly} that it's divisible by 2.


Contact information

Bruce Ikenaga's Home Page

Copyright 2008 by Bruce Ikenaga