Examples: Cyclic Groups and Modular Arithmetic
What is the smallest, most concrete example of a group? It should still reveal the full richness of group theory. The answer is the integers under addition. Their finite cousins, the integers modulo , also qualify. These examples are not mere warm-up exercises. They are the arithmetic engine underneath clock arithmetic and error-correcting codes. They also underlie the RSA cryptosystem. They are the template against which every abstract cyclic group is measured. The power of this example lies in its concreteness. We already know the group axioms abstractly (from Binary Operations and the Group Axioms). Now we want a supply of groups we can compute in by hand. We can add numbers, take remainders, check divisibility. The integers under addition are exactly this supply. So are the residues under addition mod . From them we also build a second, subtler family. This is the units , the residues coprime to under multiplication. This is where number theory and group theory first shake hands. Here Euler's theorem and Fermat's little theorem meet group structure. The big picture is this: is the prototype of an infinite cyclic group. It is a group generated by a single element under repeated addition. Each is the prototype of a finite cyclic group of order . Every cyclic group is a disguised copy of one of these. This holds no matter how it is dressed up. It may appear as rotations of a polygon, powers of a matrix, or roots of unity. Understanding and thoroughly means understanding all cyclic groups simultaneously. This article develops and as groups. It proves that is well-defined and forms a group under addition. It characterizes exactly which residues are invertible under multiplication. This gives the group . It works two nontrivial numerical examples in full. It closes with the standard traps students fall into when is not prime. Finally, it previews how these examples seed Cyclic Groups and Generators and Order of an Element.
- under addition is an infinite group generated by ; every subgroup of has the form .
- is the set of congruence classes mod ; addition of classes is well-defined and gives a group of order .
- Multiplication of classes mod is also well-defined, but is not a group under multiplication (zero, and other non-units, have no inverse).
- The invertible classes form a group , and is invertible exactly when .
- The size of this unit group is , Euler's totient function.
- Key idea: and are the concrete models on which all abstract cyclic group theory is built.
Where this lives today
The additive group literally models clock arithmetic and calendar computations, and underlies checksum and hash algorithms in computer science, where operations wrap around modulo a fixed modulus. The unit group is the algebraic heart of the RSA cryptosystem: encryption and decryption exponents are chosen using Euler's theorem, for coprime to , exactly the theorem proved via part (d) above. In coding theory, cyclic redundancy checks and linear feedback shift registers use arithmetic in or related polynomial rings mod . In pure mathematics, is the first ring students meet with zero divisors, motivating the distinction between rings and fields, and its subgroup lattice (mirroring divisors of ) is the model for the general classification of subgroups of any finite cyclic group. The unit groups for prime , shown cyclic of order , underlie discrete-logarithm-based cryptography such as Diffie–Hellman key exchange.
:::quiz[For which does equal ?]
- Only
- Only when is even
- Only when is prime ✓
- For every
:::quiz[What characterizes exactly when has a multiplicative inverse mod ?]
- is odd
- ✓
- is a perfect square mod
:::quiz[In , why does fail to have a multiplicative inverse?]
- Because
- Because ✓
- Because is even
- Because is not prime, so no element has an inverse
Ask the tutor: How does the classification of subgroups of as generalize to describe all subgroups of any cyclic group?
Fix an integer .
The integers. is the set of integers under ordinary addition, with identity and inverse of equal to .
Congruence mod . For , say if . This is an equivalence relation on ; the equivalence class of is
called the residue class of mod . The set of all such classes is
a set of exactly elements.
Addition mod . Define . Under this operation is a group, called the group of integers mod , with identity and inverse of equal to .
Units mod . Define . An element is called a unit if there exists with . The set of units,
forms a group under multiplication mod , called the group of units mod .
Intuition
Think of as an infinite line of equally spaced points, and think of as that same line wrapped around a circle of points — literally a clock. Addition on the line becomes rotation on the clock: adding moves you one tick clockwise, and after ticks you return to where you started. This wraparound is exactly what the relation "" captures: two integers land on the same clock position precisely when they differ by a multiple of . The subtler picture is the unit group . Not every clock position can be "undone" by multiplication — only those coprime to . Picture (a literal clock): the numbers are coprime to , and these four form a small group inside the twelve residues, closed under multiplication, while (and ) are dead ends that can never be multiplied back to .
Prose continued
This picture already foreshadows the entire subject. In , every subgroup is a "sub-clock-less line" of the form (multiples of some fixed ), and this classification is the seed of the Cyclic Groups and Generators theory: every cyclic group's subgroup structure mirrors divisibility of integers. In , the additive order of an element — the smallest positive with — is governed by , which is precisely the subject of Order of an Element.
Let be an integer. Then:
(a) is a group, and every subgroup equals for a unique .
(b) Congruence mod is an equivalence relation on with exactly classes . The operation is well-defined (independent of the chosen representatives ), and is a group of order .
(c) The operation is also well-defined on , but for , is not a group (it fails to have inverses for every nonzero element in general, and never has an inverse).
(d) For , the class is a unit (has a multiplicative inverse in ) if and only if . Consequently , the set of units, is a group under multiplication mod , of order
where is Euler's totient function, the number of integers in coprime to .
We prove each part in turn. The technique throughout is direct verification from definitions, together with the division algorithm and Bézout's identity, both elementary facts about that do not presuppose group theory.
(a) is a group; its subgroups are . Addition on is associative and commutative (a basic property of integer arithmetic), is an identity since for all , and is an inverse of since . Thus satisfies the group axioms. Now let be a subgroup. If , then and we take . Otherwise contains some nonzero integer, and since is closed under inverses, contains a positive integer. By the well-ordering principle, the set has a least element . We claim . Since is closed under addition and contains , it contains , and closed under inverses it contains ; hence . Conversely, let . By the division algorithm, write with . Since and , we get (as is a subgroup, closed under addition and inverses). If , then is a positive element of smaller than , contradicting minimality of . Hence , so . Thus , giving . Uniqueness of : if with , then forces , and symmetrically ; since both are nonnegative this forces .
(b) is a well-defined group of order under addition. Equivalence relation. Reflexivity: . Symmetry: if then . Transitivity: if and then . So congruence mod is an equivalence relation. Exactly classes. By the division algorithm, every integer can be written with , so , i.e. for some . This shows every class equals one of . These classes are pairwise distinct: if and , then , but , impossible. Hence has exactly elements. Well-definedness of . Suppose and , i.e. and . We must check , i.e. . Indeed,
a sum of two multiples of , hence itself a multiple of . So the class depends only on the classes of and , not on the particular representatives chosen; the operation is well-defined. Group axioms. Associativity: , using associativity of integer addition. Identity: . Inverse: . Thus is a group, and it has order by the previous paragraph.
(c) Multiplication is well-defined but not a group operation. Well-definedness. Suppose and ; write , for integers . Then
so is a multiple of . Hence , so is well-defined. Failure to be a group. The operation is associative and commutative (inherited from ) and has identity . However, for , the class satisfies for every , which is never since (as when ). So has no multiplicative inverse, and fails the inverse axiom; it is not a group. (For composite , other nonzero classes also fail to have inverses, as part (d) will show precisely.)
(d) Units are exactly the classes coprime to , and they form a group of order . Suppose is a unit, so there is with , i.e. , i.e. for some integer , i.e.
Let . Since and , divides , forcing . Hence . Suppose . By Bézout's identity, there exist integers with
(Bézout's identity is a standard consequence of the Euclidean algorithm applied to and , established independently of group theory.) Then is a multiple of , so . Thus has inverse , i.e. is a unit. This proves the equivalence: is a unit . Note this characterization is well-defined on classes: if then , since implies any common divisor of divides and vice versa. is a group. Multiplication restricted to units is closed: if , then (a prime dividing both and would have to divide or , contradicting coprimality with ), so is again a unit. Associativity and commutativity are inherited from . The identity is a unit () and lies in . Every unit has an inverse by definition, and that inverse is itself a unit (if then too, by commutativity, so is a unit). Hence satisfies all group axioms. Order . By definition, counts the integers with . Every residue class mod has a unique representative in (shown in part (b)), or equivalently in (replacing representative by , since and agree, and this does not affect the coprimality count as neither is coprime to unless ). By the characterization just proved, the classes that are units correspond exactly to representatives coprime to , of which there are by definition. Hence .
∎Worked examples
Example 1: , computing directly. We list residues through (excluding ) and test for each, using :
The classes with are , giving
a group of order . This matches (using multiplicativity of on coprime factors, a standard number-theoretic fact). Let us verify closure and find an inverse explicitly, e.g. for . We seek with . By Bézout on : , so , giving , i.e. (since ). Check: , confirming . So inside , consistent with the theorem. By contrast, take a non-unit, say : since , part (d) says has no multiplicative inverse mod . Indeed one can check directly that for and this cycle of five values (as ranges over residues) never hits — because every multiple of mod is a multiple of , and is not a multiple of . This illustrates precisely why itself is not a group for composite : elements like are permanently stuck.
Example 2: Subgroups of and the corresponding quotient, with inside , related to . By part (a), the subgroup is the unique subgroup of "generated by ." Consider its cosets in :
which partition into exactly classes — these are precisely the residue classes mod , i.e. as defined abstractly, confirming part (b) concretely: the quotient of by the subgroup recovers . Now compute using part (d): test for : , , . So
Multiplication table check: , so is its own inverse, and is the identity — a group of order , matching exactly. Meanwhile is not a unit (): indeed , , , — the value never appears, confirming has no inverse.
The theorem's part (d) shows the units form a group, but one might be tempted to claim (incorrectly) that all of forms a group under multiplication mod — dropping the coprimality hypothesis entirely and just excluding zero. This fails whenever is composite. Take and consider , closed under mod- multiplication in the naive sense that products are computed by reducing mod . Check closure: . But ! So is not even closed under multiplication mod — the product of two nonzero classes can be zero. This happens precisely because is composite: and are nonzero zero divisors, satisfying and , so by part (d) neither is a unit. Removing zero is not enough to get a group; one must remove all non-units, which for composite means removing more than just . Contrast with (prime): here every nonzero class satisfies automatically (since is prime, its only divisors are and , and ), so genuinely is a group of order . This is exactly why " minus zero is a group" holds only when is prime — the hypothesis collapses to "" only in that special case, and dropping primality breaks the conclusion, as the computation shows.
Scope, edge cases & common traps
| Situation | What holds | What fails / must be checked |
|---|---|---|
| , trivial group | by convention (the empty-looking count of "integers in coprime to " is taken as ) | |
| prime | , order | Do not assume this for composite (see counterexample) |
| composite | Zero divisors exist; under is not a group | |
| Subgroups of | All are , | gives trivial subgroup ; do not forget this edge case |
| Choosing representatives | depends only on | Any claim about "" (not just its class) that is not proved independent of representative is invalid |
The mathematician behind it
Origins · 1 minCarl Friedrich Gauss and how this was discovered
Gauss introduced the systematic language of congruences — the notation and the arithmetic of residue classes — in his 1801 treatise Disquisitiones Arithmeticae. Although the group-theoretic vocabulary ("group," "subgroup," axioms) did not yet exist in his time, his treatment of congruences mod and of the multiplicative structure of residues coprime to laid the entire concrete foundation on which the abstract theory of cyclic groups was later built.
Is itself a cyclic group, and if so, generated by what?
Yes. A group is cyclic if it is generated by a single element, meaning every element can be written as repeated application of the operation to that one generator (and its inverse). In , every integer can be written as (adding to itself times if , or adding repeatedly if ), so . Note also generates , since . These are the only two generators, since any other integer with generates only the proper subgroup .
Why is it called "" rather than just "residues mod "?
The notation signals that this group is a quotient group: it is obtained by collapsing the subgroup to a single point, identifying integers that differ by a multiple of . This is the general construction of a quotient of a group by a subgroup (here automatically valid since is abelian, so every subgroup is normal). The notation "residues mod " describes the same objects concretely, but emphasizes the structural origin as a quotient construction.
Does have a nice size formula when factors into primes?
Yes. Euler's totient function is multiplicative on coprime arguments: if then . Combined with the prime-power formula , this lets you compute from the prime factorization of . For example , matching the direct count done in the worked example. This multiplicativity is itself a consequence of the Chinese Remainder Theorem, a further structural fact about .
Why is under multiplication not simply "fixed" by excluding zero divisors from consideration?
Because for composite , the non-units are not just ; they include every class sharing a nontrivial common factor with . Excluding only leaves zero divisors like and in , whose product is , immediately breaking closure (see the counterexample above). The correct fix is to restrict to , the set of classes coprime to , which is proved in part (d) to be closed and to form a genuine group.
How does this relate to fields? Is ever a field?
is a field exactly when is prime. In that case every nonzero element is a unit (as shown above), so is a group under multiplication, which together with the additive group structure makes a field, commonly denoted . For composite , the presence of zero divisors (nonzero elements whose product is zero) means is only a commutative ring, not a field.
What is the connection to "Cyclic Groups and Generators" that this article foreshadows?
Both and are generated by a single element under the group operation (namely , or ), which is the defining property of a cyclic group. The general theory shows every cyclic group is isomorphic to exactly one of these two models: infinite cyclic groups look like , and finite cyclic groups of order look like . This article's concrete computations (subgroups of , orders of elements mod ) are the special case from which the general classification is later abstracted.