Home page for accesible maths 4 Number theory

Style control - access keys in brackets

Font (2 3) - + Letter spacing (4 5) - + Word spacing (6 7) - + Line spacing (8 9) - +

4.1 Divisibility

In the next few sections we shall work in \mathbb{Z}. We know that we can always add, subtract and multiply two integers to obtain another; but division is more subtle.

Definition 4.1.1

Given a,ba,b\in\mathbb{Z}, we say that aa divides bb if there exists qq\in\mathbb{Z} such that b=qab=qa. If this is the case we write a|ba|b and say that aa is a factor (or divisor) of bb, while bb is a multiple of aa; otherwise we write a|ba\!\!\!\!\;\not\!\!\!\;|\!\;b.

Example 4.1.2
  1. (i)

    3|123|12, since 12=4312=4\cdot 3; the set of factors of 1212 is

    {±1,±2,±3,±4,±6,±12}.\{\pm 1,\pm 2,\pm 3,\pm 4,\pm 6,\pm 12\}.
  2. (ii)

    4| 94\!\!\!\!\;\not\!\!\!\;|\!\;9, since 94q9\neq 4q for any qq\in\mathbb{Z}; the set of multiples of 44 is

    {0,±4,±8,±12,}.\{0,\pm 4,\pm 8,\pm 12,\dots\}.
Remark 4.1.3

Let a,ba,b\in\mathbb{Z}.

  1. (i)

    Suppose that a|ba|b. Then also a|-ba|{-b}, -a|b-a|b and -a|-b-a|-b since if b=qab=qa for some qq\in\mathbb{Z} then -b=(-q)a-b=(-q)a, b=(-q)(-a)b=(-q)(-a) and -b=q(-a)-b=q(-a). Thus signs are irrelevant to questions of divisibility.

  2. (ii)

    Suppose that ab=0ab=0. Then either a=0a=0 or b=0b=0 (or both); we refer to this fact by saying that \mathbb{Z} has no zero divisors.

As explained in the course overview (Section 1.2), we are on the whole more interested in results which hold in general than in specific instances. For example, the result above that 3|123|12 is all very well, and is relevant if we happen to be considering the numbers 33 and 1212, but it goes no further. By contrast, if we can establish some general result about arbitrary numbers, then we can apply it to lots of different cases; in addition, such results give us a deeper insight into the world of integers than isolated examples ever will.

From this point of view, it is of interest to observe that the last part of Example 4.1.2(ii) above is a special case of the fact that, for each aa\in\mathbb{Z}, the set of multiples of aa is

{0,±a,±2a,±3a,}.\{0,\pm a,\pm 2a,\pm 3a,\dots\}.

We shall next state and prove some elementary facts about divisibility. To do so, we require the following concept.

Definition 4.1.4

The absolute value (or modulus) of xx\in\mathbb{R}, written |x||x|, is defined by

|x|={xif x0;-xif x<0.|x|=\left\{\begin{array}[]{ll}x&\hbox{if }x\geqslant 0;\\ -x&\hbox{if }x<0.\end{array}\right.

In other words, |x||x| measures how ‘‘large’’ xx is, irrespective of sign; it is clear that |xy|=|x||y||xy|=|x|\cdot|y| for any x,yx,y\in\mathbb{R}. Although this definition applies to real numbers in general, we shall only apply it to integers.

Example 4.1.5

|2|=2=|-2|.|2|=2=|{-2}|.

Proposition 4.1.6

Let a,b,ca,b,c\in\mathbb{Z}. Then:

  1. (i)

    if a|ba|b and b|cb|c, then a|ca|c;

  2. (ii)

    if a|ba|b, then ac|bcac|bc;

  3. (iii)

    a|1a|1 if and only if a=±1a=\pm 1;

  4. (iv)

    a|ba|b and b|ab|a if and only if b=±ab=\pm a.

Before presenting the proof, we shall consider a numerical example; this will help you understand what exactly the statement of the proposition is and thus what we need to prove; the example may also give you an idea of why the statement is true. Do not, however, get confused by this approach: a numerical example is never a valid substitute for a proof of a statement.

Example 4.1.7
  1. (i)

    2|42|4 (because 4=224=2\cdot 2) and 4|124|12 (because 12=3412=3\cdot 4), so 2|122|12 because

    12=34=322=62.12=3\cdot 4=3\cdot 2\cdot 2=6\cdot 2.
  2. (ii)

    2|42|4, so 6|126|12 because

    12=34=322=62.12=3\cdot 4=3\cdot 2\cdot 2=6\cdot 2.

Proof. (i) If b=qab=qa and c=rbc=rb for q,rq,r\in\mathbb{Z}, then c=rb=(rq)ac=rb=(rq)a with rqrq\in\mathbb{Z}, so a|ca|c.

(ii) If b=qab=qa for qq\in\mathbb{Z}, then bc=q(ac)bc=q(ac), so ac|bcac|bc.

(iii) ‘‘\Rightarrow’’. Suppose that 1=qa1=qa for some qq\in\mathbb{Z}. Then 1=|1|=|qa|=|q||a|1=|1|=|qa|=|q|\cdot|a|, so that |q|=|a|=1|q|=|a|=1, and hence a=±1a=\pm 1.

‘‘\Leftarrow’’. Suppose that a=±1a=\pm 1. Then a|1a|1 because 1=aa1=a\cdot a.

(iv) ‘‘\Rightarrow’’. Suppose that a|ba|b and b|ab|a, and choose q,rq,r\in\mathbb{Z} such that b=qab=qa and a=rba=rb. If a=0a=0 then b=q0=0b=q\cdot 0=0 as well; so assume that a0a\neq 0. Since a=rqaa=rqa, we have a(1-rq)=0a(1-rq)=0, and as a0a\neq 0, this implies that 1-rq=01-rq=0 because \mathbb{Z} has no zero divisors. Thus rq=1rq=1. From (iii) this gives q=±1q=\pm 1, so b=±ab=\pm a.

‘‘\Leftarrow’’. Suppose that b=±ab=\pm a. Then a|ba|b because b=±1ab=\pm 1\cdot a, and b|ab|a because a=±1b.a=\pm 1\cdot b. \Box

Although some numbers cannot be divided by others, we are all familiar with the idea of dividing ‘‘as much as possible’’ to get a quotient and a remainder; for example, we might divide 2727 by 44 to get a quotient of 66 and a remainder of 33. This idea turns out to be worth pursuing; to formalize it, we first need to clarify what exactly is going on. In the first place, the statement ‘‘2727 divided by 44 equals 66 with remainder 33’’ means that 27=64+3.27=6\cdot 4+3. However, there are other values which could be used in place of the 66 and the 33 in such an equation; for example, we have 27=54+727=5\cdot 4+7, or 27=74+(-1)27=7\cdot 4+(-1). What distinguishes the choice of 66 and 33 here is that the remainder should be ‘‘small’’ (less than 44) and non-negative. The following result shows that we may always ‘‘divide’’ in this way to obtain a unique quotient and a unique remainder; it is called division with remainder.

Theorem 4.1.8

(Division with remainder.) Given aa\in\mathbb{Z} and dd\in\mathbb{N}, there exist unique q,rq,r\in\mathbb{Z} such that a=qd+ra=qd+r and 0r<d0\leqslant r<d.

Example 4.1.9
  1. (i)

    If a=27a=27 and d=6d=6, then we have

    27=46+3,27=4\cdot 6+3, (4.1.1)

    so as 03<60\leqslant 3<6, we conclude that q=4q=4 and r=3r=3. We find the equation (4.1.1) by observing that 27-46=3027-4\cdot 6=3\geqslant 0, whereas 27-56=-3<027-5\cdot 6=-3<0.

  2. (ii)

    If a=-17a=-17 and d=5d=5, then the fact that -17=-45+3-17=-4\cdot 5+3, where 03<50\leqslant 3<5, implies that q=-4q=-4 and r=3r=3. As in (i), we obtain this from the identities -17-(-4)5=30-17-(-4)\cdot 5=3\geqslant 0 and -17-(-3)5=-2<0-17-(-3)\cdot 5=-2<0.

  3. (iii)

    If a=35a=35 and d=7d=7, then we have 35=57+035=5\cdot 7+0, so that r=0r=0 and d|a.d|a.

  4. (iv)

    If a=6a=6 and d=9d=9, then we have 6=09+66=0\cdot 9+6, so that q=0q=0 and r=a.r=a.

Proof. We begin with the existence part. Let qq be the largest integer such that qa/d,q\leqslant a/d, and set r=a-qdr=a-qd\in\mathbb{Z}. Then a=qd+ra=qd+r holds by definition. Further, the choice of qq implies that qdaqd\leqslant a, and so 0a-qd=r0\leqslant a-qd=r. Since qq is the largest integer less than or equal to a/da/d, we have a/d<q+1a/d<q+1, so that a<(q+1)d=qd+da<(q+1)d=qd+d and thus r=a-qd<dr=a-qd<d, as required.

To show that qq and rr are unique, suppose that a=q1d+r1a=q_{1}d+r_{1} and a=q2d+r2,a=q_{2}d+r_{2}, where q1,q2q_{1},q_{2}\in\mathbb{Z} and r1,r2{0,1,,d-1}r_{1},r_{2}\in\{0,1,\ldots,d-1\}. We must show that q1=q2q_{1}=q_{2} and r1=r2r_{1}=r_{2}. We may suppose that r1r2r_{1}\geqslant r_{2}. Then d>r1r1-r20d>r_{1}\geqslant r_{1}-r_{2}\geqslant 0, and since r1=a-q1dr_{1}=a-q_{1}d and r2=a-q2dr_{2}=a-q_{2}d, we have

r1-r2\displaystyle r_{1}-r_{2} =(a-q1d)-(a-q2d)=a-q1d-a+q2d\displaystyle=(a-q_{1}d)-(a-q_{2}d)=a-q_{1}d-a+q_{2}d
=q2d-q1d=(q2-q1)d.\displaystyle=q_{2}d-q_{1}d=(q_{2}-q_{1})d.

However, the only multiple of dd in {0,1,,d-1}\{0,1,\ldots,d-1\} is 00, so we conclude that r1-r2=0r_{1}-r_{2}=0 and thus also q2-q1=0q_{2}-q_{1}=0 (because \mathbb{Z} has no zero divisors) as required. \Box

Remark 4.1.10
  1. (i)

    Note that we have stated the result for d>0d>0, for convenience. However, it is easy to extend it to all non-zero dd; we just replace the condition on rr with ‘‘0r<|d|0\leqslant r<|d|’’.

  2. (ii)

    In the first part of the proof we used the elementary fact that any non-empty set of integers which is bounded above contains a largest element (this is obvious; we may simply start at the upper bound and then count downwards until an element in the set is reached).