Loading [MathJax]/jax/output/HTML-CSS/jax.js
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

5.5: Division in Zb

( \newcommand{\kernel}{\mathrm{null}\,}\)

The next result is a game changer! It tells us that there is a unique element a1 such that aa1=b1 if and only if a is in the reduced set of residues (modulo b). Thus division is well-defined in the reduced set of residues modulo b. This serves as a clear signal to emphasize two distinct algebraic structures. A ring is a structure with addition and its inverse subtraction plus multiplication, but where multiplication may not have an inverse. A field is almost the same, but now multiplication always has an inverse: division. A more detailed description of these algebraic construction is given in Section ??. The numbers 1 and 1 are always in the reduced set of residues modulo b. This set is sometimes called the set of units (see Definition ??) of Zb.

Proposition 5.16

Let R be a reduced set of residues modulo b. Then

  1. for every aR, there is a unique a in R such that aa=baa=b1
  2. for every aR, there exists no xZb such that ax=b1
  3. let R={xi}φ(b)i=1, then also R={x1}φ(b)i=1.
Proof

Statement 1: The existence of a solution follows immediately from Be ́zout’s Lemma, namelya=bx solves for x in ax+by=1. This solution must be in R, because a, in turn, is the solution of ax+by=1 and thus Be ́zout’s Lemma implies that gcd(a,b)=1. Suppose we have two solutions ax=b1 and ay=b1, then uniqueness follows from applying the cancelation Theorem 2.7 to the difference of these equations.

Statement 2: By hypothesis, gcd(a,b)>1. We have that ax=b1 is equivalent to ax+by=1, which contradicts Be ́zout’s Lemma.

Statement 3: This is similar to Lemma 5.3. By (1), we know that all inverses are in R. So if the statement is false, there must be two elements of R. So if the statement is false, there must be two elements of R with the same inverse: ax=bcx. This is impossible by cancelation.

Lemma 5.17

Let p be prime. Then a2=p1 if and only if a=p±1

Proof

We have

a2=p1a21=p(a+1)(a1)=p0p|(a+1)(a1)

Because p is prime, Corollary 2.12 says that either p|a+1 (and so a=p1) or p|a1 (and so a=p+1).

Perhaps, surprisingly, this last lemma is false if p is not prime. For example, 42=151, but 415±1.

Theorem 5.18 (Wilson's theorem)

If p prime in Z, then (p1)!=p1. If b is composite, then (b1)!b1

Proof

This is true for p=2. If p>2, then Proposition 5.16(3) and Lemma 5.17 imply that every factor ai in the product (p1)! other than 1 or 1 has a unique inverse ai different from itself. The factors ai run through all factors 2 through p2 exactly once. Thus in the product, we can pair each ai different from ±1 with its inverse. This gives

(p1)!=p(+1)(1)aiai=p1

The second part is easier. If b is composite, there are least residues a and b greater than 1 so that ad=b0. Now either we can choose a and b distinct and then (b1)! contains the product ad, and thus it equals zero mod b. Or else this is impssible and b=a2. But then still gcd((b1)!,b)a. By Be ́zout, we must have (b1)! mod b must be a multiple of a.

Wilson's theorem could be used to test primality of a number n. However, this takes n multiplications, which in practice is more expensive than trying to divide n by all numbers less than n. Note, however, that if you want to compute a list of all primes between 1 and N, Wilson’s theorem can be used much more efficiently. After computing (k1)!=k to determine whether k is prime, it takes only 1 multiplication and 1 division to determine whether k+1 is prime.

Here is the take-away that will be important for Chapter ??. More in particular, we have the following result.

Corollary 5.19

Let p be prime.

For every aZp there is a unique a=pa such that a+a=p0.

For every aZp and a0, there is a unique a=a1 so that aa=p1.

Addition and multiplication are well-defined in Zb (see exercises 5.1 and 5.2). Thus when p is prime, we can add, multiply, subtract, and divide in Zp. In the words of Chapter ??, when p is a prime, then Zp is a field. It is an interesting fact that the same is not true for a composite number b. According to Proposition 5.16, we need the reduced set of residues for the multiplication to be invertible. At the same time, for the set to be closed under multiplication, we need all of Zb (think of 1+1+). Thus the operations addition and multiplication in Zb collaborate with each other only if b is a prime.


This page titled 5.5: Division in Zb is shared under a CC BY-NC license and was authored, remixed, and/or curated by J. J. P. Veerman (PDXOpen: Open Educational Resources) .

Support Center

How can we help?