Introduction to Modern Algebra

Eight hours after 7 o’clock, a clock reads 3 o’clock. Clock arithmetic adds hours and forgets multiples of 1212. Forgetting multiples of any positive integer nn in the same way gives two new families of groups.

Congruence

Two facts from earlier courses are used throughout. An equivalence relation on a set cuts it into disjoint equivalence classes, and two elements lie in the same class exactly when they are related. Division with remainder writes each integer aa as a=qn+ra = qn + r with 0≤r<n0 \le r < n, for exactly one pair of integers qq and rr; here rr is the remainder of aa on division by nn.

Definition 1.3.1 (Congruence mod nn).

Let nn be a positive integer. Integers aa and bb are congruent modulo nn, written a≡b(modn)a \equiv b \pmod n, if nn divides a−ba - b. The residue class of aa modulo nn is the set of integers congruent to aa:

[a]={b∈Z:b≡a(modn)}={…,a−n,a,a+n,… }.\begin{aligned} [a] &= \{b \in \mathbb{Z} : b \equiv a \pmod n\} \\ &= \{\dots, a - n, a, a + n, \dots\}. \end{aligned}

Congruence modulo nn is an equivalence relation. It is reflexive, since nn divides a−a=0a - a = 0; symmetric, since a−b=kna - b = kn gives b−a=(−k)nb - a = (-k)n; and transitive, since a−b=kna - b = kn and b−c=lnb - c = ln give a−c=(k+l)na - c = (k + l)n. The residue classes are its equivalence classes, so they cut Z\mathbb{Z} into disjoint pieces, and [a]=[b][a] = [b] exactly when a≡b(modn)a \equiv b \pmod n.

There are exactly nn residue classes, [0],[1],…,[n−1][0], [1], \dots, [n - 1]. Every class is one of these: dividing aa by nn gives a=qn+ra = qn + r with 0≤r<n0 \le r < n, so a−r=qna - r = qn and [a]=[r][a] = [r]. And no two of them are equal: if 0≤r<t<n0 \le r < t < n, then 0<t−r<n0 < t - r < n, so nn does not divide t−rt - r and [r]≠[t][r] \neq [t]. So [a][a] is the class of the remainder of aa, and two integers are congruent modulo nn exactly when they leave the same remainder.

When the modulus is not clear from the context, the class is written [a]n[a]_n.

Adding and multiplying classes

On a clock, 7+8=37 + 8 = 3: the class of 77 plus the class of 88 should be the class of 1515, which is [3][3]. The natural rule adds or multiplies classes through representatives: [a]+[b]=[a+b][a] + [b] = [a + b] and [a][b]=[ab][a][b] = [ab]. But a class has many representatives. Modulo 1212, [7]=[19][7] = [19] and [8]=[−4][8] = [-4], so the same rule also gives [7]+[8]=[19+(−4)]=[15][7] + [8] = [19 + (-4)] = [15]. For the rule to make sense, every choice of representatives must give the same class.

It does. Suppose [a]=[a′][a] = [a'] and [b]=[b′][b] = [b'], so that a′=a+kna' = a + kn and b′=b+lnb' = b + ln for some integers kk and ll. Then

a′+b′=(a+b)+(k+l)n,a′b′=ab+(al+kb+kln)n,\begin{aligned} a' + b' &= (a + b) + (k + l)n, \\ a'b' &= ab + (al + kb + kln)n, \end{aligned}

so a′+b′≡a+ba' + b' \equiv a + b and a′b′≡ab(modn)a'b' \equiv ab \pmod n. Changing the representatives changes the sum and the product by a multiple of nn, which does not change their classes. A rule on classes that gives the same class for every choice of representatives is called well defined. Checking it is the first step whenever classes are combined through representatives.

Definition 1.3.2 (The integers mod nn).

Let nn be a positive integer. The integers mod nn, written Z/nZ\mathbb{Z}/n\mathbb{Z}, are the nn residue classes [0],[1],…,[n−1][0], [1], \dots, [n - 1] modulo nn, with the addition and multiplication

[a]+[b]=[a+b],[a][b]=[ab].[a] + [b] = [a + b], \qquad [a][b] = [ab].
Example 1.3.3 (The clock group).

Under addition, Z/nZ\mathbb{Z}/n\mathbb{Z} is an abelian group. Each condition comes from the same fact about the integers, applied to representatives:

  • (i) Closure: [a]+[b]=[a+b][a] + [b] = [a + b] is again a residue class.
  • (ii) Associativity: ([a]+[b])+[c]=[(a+b)+c]=[a+(b+c)]=[a]+([b]+[c])([a] + [b]) + [c] = [(a + b) + c] = [a + (b + c)] = [a] + ([b] + [c]).
  • (iii) Identity: [0]+[a]=[a]+[0]=[a][0] + [a] = [a] + [0] = [a].
  • (iv) Inverses: [a]+[−a]=[−a]+[a]=[0][a] + [-a] = [-a] + [a] = [0], and among [0],…,[n−1][0], \dots, [n - 1] the class [−a][-a] is [n−a][n - a] for 0<a<n0 < a < n, and [0][0] for a=0a = 0.

It is abelian, since [a]+[b]=[a+b]=[b+a]=[b]+[a][a] + [b] = [a + b] = [b + a] = [b] + [a]. As the group is written additively, its identity is [0][0] and the inverse of [a][a] is −[a]=[−a]-[a] = [-a].

For n=12n = 12 this is the arithmetic of a clock. Adding [k][k] turns the hand kk notches, so [7]+[8]=[15]=[3][7] + [8] = [15] = [3], and −[7]=[5]-[7] = [5]: turning seven notches is undone by turning five more.

Units

Under multiplication, Z/nZ\mathbb{Z}/n\mathbb{Z} is not a group when n≥2n \ge 2: [1][1] is an identity, but [0][0] has no inverse, since [0][b]=[0]≠[1][0][b] = [0] \neq [1]. Removing [0][0] is not enough in general. In Z/10Z\mathbb{Z}/10\mathbb{Z} the classes [2][2] and [5][5] have no inverse either (the last example of Definition 1.3.2), and the non-zero classes are not even closed, since [2][5]=[10]=[0][2][5] = [10] = [0]. What works is to keep exactly the classes that can be undone.

Example 1.3.4 (The units mod nn).

A class [a][a] in Z/nZ\mathbb{Z}/n\mathbb{Z} is a unit if some class [b][b] satisfies [a][b]=[1][a][b] = [1]. The units form a group under multiplication, written (Z/nZ)×(\mathbb{Z}/n\mathbb{Z})^\times.

Multiplication of classes is commutative, since [a][b]=[ab]=[ba]=[b][a][a][b] = [ab] = [ba] = [b][a], so each condition needs checking on one side only:

  • (i) Closure: if [a][a′]=[1][a][a'] = [1] and [b][b′]=[1][b][b'] = [1], then ([a][b])([a′][b′])=([a][a′])([b][b′])=[1][1]=[1]([a][b])([a'][b']) = ([a][a'])([b][b']) = [1][1] = [1], so [a][b][a][b] is a unit.
  • (ii) Associativity: ([a][b])[c]=[(ab)c]=[a(bc)]=[a]([b][c])([a][b])[c] = [(ab)c] = [a(bc)] = [a]([b][c]).
  • (iii) Identity: [1][1] is a unit, since [1][1]=[1][1][1] = [1], and [1][a]=[a][1][a] = [a].
  • (iv) Inverses: if [a][a′]=[1][a][a'] = [1], then [a′][a'] is a unit too, undone by [a][a], so the inverse of [a][a] lies in the set.

The group is abelian. By Theorem 1.2.4, each unit has exactly one inverse, written [a]−1[a]^{-1}.

For example, (Z/8Z)×={[1],[3],[5],[7]}(\mathbb{Z}/8\mathbb{Z})^\times = \{[1], [3], [5], [7]\}, and each of these is its own inverse: 3⋅3=93 \cdot 3 = 9, 5⋅5=255 \cdot 5 = 25 and 7⋅7=497 \cdot 7 = 49 are all 11 more than a multiple of 88. The classes [0],[2],[4],[6][0], [2], [4], [6] are not units: for even aa the number ab−1ab - 1 is odd, so 88 does not divide it, and [a][b]≠[1][a][b] \neq [1].

Which classes are units follows a pattern. 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].