Introduction to Modern Algebra

Contents › Chapter 2. Subgroups and cyclic groups

2.3 Subgroups of Z\mathbb{Z} and the greatest common divisor

For every integer n≥0n \ge 0 the multiples nZn\mathbb{Z} form a subgroup of Z\mathbb{Z} (Example 2.1.3), and nZn\mathbb{Z} is the cyclic subgroup ⟨n⟩\langle n \rangle. Are there any other subgroups of Z\mathbb{Z}? The answer gives the greatest common divisor of two integers a new description, and with it the rule behind the units mod nn (Example 1.3.4): modulo 88 they are [1],[3],[5],[7][1], [3], [5], [7], and modulo 1010 they are [1],[3],[7],[9][1], [3], [7], [9].

Every subgroup of Z\mathbb{Z} is cyclic

The proof uses division with remainder (each integer aa is a=qn+ra = qn + r with 0≤r<n0 \le r < n, for a positive integer nn) and one consequence of induction: every non-empty set of positive integers has a least element.

Theorem 2.3.1 (Subgroups of Z\mathbb{Z}).

Every subgroup HH of Z\mathbb{Z} is nZ=⟨n⟩n\mathbb{Z} = \langle n \rangle for exactly one integer n≥0n \ge 0. If H≠{0}H \neq \{0\}, then nn is the least positive element of HH.

Proof.

Idea. The least positive element nn of HH divides every element of HH, because the remainder on dividing by nn lies in HH and is smaller than nn.

  1. If H={0}H = \{0\}, then H=0ZH = 0\mathbb{Z}. Otherwise HH has a least positive element nn.

    If H≠{0}H \neq \{0\}, then HH contains some a≠0a \neq 0, and also −a-a by Inverses, and one of aa and −a-a is positive. So the positive elements of HH form a non-empty set, and it has a least element nn.

  2. nZ⊆Hn\mathbb{Z} \subseteq H.

    nZ=⟨n⟩n\mathbb{Z} = \langle n \rangle is the smallest subgroup of Z\mathbb{Z} containing nn (Definition 2.2.2).

  3. H⊆nZH \subseteq n\mathbb{Z}. So H=nZH = n\mathbb{Z}, with nn the least positive element of HH.

    Let a∈Ha \in H, and divide it by nn: a=qn+ra = qn + r with 0≤r<n0 \le r < n. Here qn∈nZ⊆Hqn \in n\mathbb{Z} \subseteq H, so r=a+(−qn)r = a + (-qn) lies in HH by Inverses and Closure. Since r<nr < n and nn is the least positive element of HH, the remainder rr is not positive. So r=0r = 0, and a=qn∈nZa = qn \in n\mathbb{Z}.

  4. The integer n≥0n \ge 0 with H=nZH = n\mathbb{Z} is unique.

    The subgroup 0Z={0}0\mathbb{Z} = \{0\} is different from every mZm\mathbb{Z} with m>0m > 0, which contains mm. And if nZ=mZn\mathbb{Z} = m\mathbb{Z} with n,m>0n, m > 0, then nn and mm are both the least positive element of the same set, so n=mn = m.

□

The greatest common divisor

For integers aa and bb, not both 00, the greatest common divisor gcd⁡(a,b)\gcd(a, b) is the largest integer that divides both aa and bb. It exists, since 11 divides both, and a common divisor is at most ∣a∣\lvert a \rvert when a≠0a \neq 0 (and at most ∣b∣\lvert b \rvert when b≠0b \neq 0). For example, gcd⁡(42,30)=6\gcd(42, 30) = 6, gcd⁡(17,5)=1\gcd(17, 5) = 1 and gcd⁡(a,0)=∣a∣\gcd(a, 0) = \lvert a \rvert.

Theorem 2.3.2 (Bézout’s identity).

Let aa and bb be integers, not both 00, and let d=gcd⁡(a,b)d = \gcd(a, b). Then the integer combinations of aa and bb are exactly the multiples of dd:

{ax+by:x,y∈Z}=dZ.\{ax + by : x, y \in \mathbb{Z}\} = d\mathbb{Z}.

In particular d=ax+byd = ax + by for some integers xx and yy, dd is the least positive integer of this form, and every common divisor of aa and bb divides dd.

Proof.

Idea. Collect all the combinations ax+byax + by into one set. It is a subgroup of Z\mathbb{Z}, so by Theorem 2.3.1 it consists of the multiples of its least positive element, and that element turns out to be gcd⁡(a,b)\gcd(a, b).

  1. The set S={ax+by:x,y∈Z}S = \{ax + by : x, y \in \mathbb{Z}\} is a subgroup of Z\mathbb{Z}.

    Closure: (ax+by)+(ax′+by′)=a(x+x′)+b(y+y′)(ax + by) + (ax' + by') = a(x + x') + b(y + y') lies in SS. Identity: 0=a⋅0+b⋅00 = a \cdot 0 + b \cdot 0 lies in SS. Inverses: −(ax+by)=a(−x)+b(−y)-(ax + by) = a(-x) + b(-y) lies in SS.

  2. S=cZS = c\mathbb{Z}, where c=ax0+by0c = ax_0 + by_0 is the least positive element of SS.

    SS is not {0}\{0\}, since it contains a=a⋅1+b⋅0a = a \cdot 1 + b \cdot 0 and b=a⋅0+b⋅1b = a \cdot 0 + b \cdot 1, which are not both 00. So by Theorem 2.3.1, S=cZS = c\mathbb{Z}, where cc is the least positive element of SS; say c=ax0+by0c = ax_0 + by_0.

  3. cc divides aa and bb.

    aa and bb lie in S=cZS = c\mathbb{Z}.

  4. Every common divisor mm of aa and bb divides cc, and m≤cm \le c.

    If a=ma′a = ma' and b=mb′b = mb', then c=ax0+by0=m(a′x0+b′y0)c = ax_0 + by_0 = m(a'x_0 + b'y_0). So m≤∣m∣≤cm \le \lvert m \rvert \le c, since c>0c > 0.

  5. c=gcd⁡(a,b)=dc = \gcd(a, b) = d, and every claim of the theorem holds.

    By the last two steps, cc is a common divisor of aa and bb that is at least as large as every common divisor, so cc is gcd⁡(a,b)=d\gcd(a, b) = d. With c=dc = d, the second and fourth steps prove every claim of the theorem.

□

To find the coefficients xx and yy, run the Euclidean algorithm. If a=qb+ra = qb + r, then the common divisors of aa and bb are exactly the common divisors of bb and rr: a common divisor of bb and rr divides a=qb+ra = qb + r, and a common divisor of aa and bb divides r=a−qbr = a - qb. So gcd⁡(a,b)=gcd⁡(b,r)\gcd(a, b) = \gcd(b, r). Dividing again and again, the remainders get smaller until one is 00, and the last non-zero remainder is the gcd. For gcd⁡(42,30)\gcd(42, 30):

42=1⋅30+12,30=2⋅12+6,12=2⋅6+0,\begin{aligned} 42 &= 1 \cdot 30 + 12, \\ 30 &= 2 \cdot 12 + 6, \\ 12 &= 2 \cdot 6 + 0, \end{aligned}

so gcd⁡(42,30)=gcd⁡(30,12)=gcd⁡(12,6)=6\gcd(42, 30) = \gcd(30, 12) = \gcd(12, 6) = 6. Running the divisions backwards, each time replacing a remainder by what it equals in the line above, writes the gcd as a combination:

6=30−2⋅12=30−2(42−30)=3⋅30−2⋅42.\begin{aligned} 6 &= 30 - 2 \cdot 12 \\ &= 30 - 2(42 - 30) \\ &= 3 \cdot 30 - 2 \cdot 42. \end{aligned}

The theorem is named after Étienne Bézout, whose work on polynomial equations led to the corresponding statement for polynomials. For integers it already appears in a 1624 book by Claude-Gaspar Bachet de Méziriac.

Euclid’s lemma

An integer p>1p > 1 is prime if its only positive divisors are 11 and pp.

Theorem 2.3.3 (Euclid’s lemma).Not yet reviewed

Let aa, bb and cc be integers. If aa divides bcbc and gcd⁡(a,b)=1\gcd(a, b) = 1, then aa divides cc. In particular, if a prime pp divides bcbc, then pp divides bb or pp divides cc.

Proof.

The idea is to write 11 as a combination of aa and bb and multiply it by cc.

Since gcd⁡(a,b)=1\gcd(a, b) = 1, Theorem 2.3.2 gives integers xx and yy with 1=ax+by1 = ax + by. Multiplying by cc gives c=acx+bcyc = acx + bcy. The integer aa divides acxacx, and it divides bcybcy because it divides bcbc. So aa divides their sum cc.

For the prime case, suppose pp divides bcbc but not bb. The positive divisors of pp are 11 and pp, and pp does not divide bb, so gcd⁡(p,b)=1\gcd(p, b) = 1. The first part, with a=pa = p, shows that pp divides cc. □

Without the hypothesis gcd⁡(a,b)=1\gcd(a, b) = 1 the conclusion can fail: 66 divides 4⋅9=364 \cdot 9 = 36, but 66 divides neither 44 nor 99. The statement for primes is Proposition 30 of Book VII of Euclid’s Elements.

Which classes are units

Theorem 2.3.4 (Units mod nn).

Let n≥1n \ge 1 and a∈Za \in \mathbb{Z}. The class [a][a] is a unit in Z/nZ\mathbb{Z}/n\mathbb{Z} exactly when gcd⁡(a,n)=1\gcd(a, n) = 1. In that case, if ax+ny=1ax + ny = 1, then [a]−1=[x][a]^{-1} = [x].

Proof.

The idea is that [a][x]=[1][a][x] = [1] says that nn divides ax−1ax - 1, that is, ax+ny=1ax + ny = 1 for some integer yy; and Bézout’s identity says when such a combination exists.

Suppose [a][a] is a unit, with [a][x]=[ax]=[1][a][x] = [ax] = [1]. Then nn divides ax−1ax - 1, say ax−1=knax - 1 = kn, and with y=−ky = -k this reads ax+ny=1ax + ny = 1. Every common divisor of aa and nn divides ax+ny=1ax + ny = 1, so gcd⁡(a,n)=1\gcd(a, n) = 1.

Conversely, suppose gcd⁡(a,n)=1\gcd(a, n) = 1. By Theorem 2.3.2 there are integers xx and yy with ax+ny=1ax + ny = 1. For any such xx and yy, ax−1=−nyax - 1 = -ny is a multiple of nn, so [a][x]=[ax]=[1][a][x] = [ax] = [1]. So [a][a] is a unit, and its inverse is [x][x]. □

The units mod 88 are therefore the classes of the odd numbers 1,3,5,71, 3, 5, 7, and the units mod 1010 are the classes of 1,3,7,91, 3, 7, 9, the numbers from 00 to 99 divisible by neither 22 nor 55. When n=pn = p is prime, every aa that pp does not divide has gcd⁡(a,p)=1\gcd(a, p) = 1, so (Z/pZ)×={[1],[2],…,[p−1]}(\mathbb{Z}/p\mathbb{Z})^\times = \{[1], [2], \dots, [p - 1]\} has p−1p - 1 elements.