Multiplicative group of integers modulo n
View on WikipediaIn modular arithmetic, the integers coprime (relatively prime) to n from the set of n non-negative integers form a group under multiplication modulo n, called the multiplicative group of integers modulo n. Equivalently, the elements of this group can be thought of as the congruence classes, also known as residues modulo n, that are coprime to n. Hence another name is the group of primitive residue classes modulo n. In the theory of rings, a branch of abstract algebra, it is described as the group of units of the ring of integers modulo n. Here units refers to elements with a multiplicative inverse, which, in this ring, are exactly those coprime to n.
| Algebraic structure → Group theory Group theory |
|---|
This group, usually denoted , is fundamental in number theory. It is used in cryptography, integer factorization, and primality testing. It is an abelian, finite group whose order is given by Euler's totient function: For prime n the group is cyclic, and in general the structure is easy to describe, but no simple general formula for finding generators is known.
Group axioms
[edit]It is a straightforward exercise to show that, under multiplication, the set of congruence classes modulo n that are coprime to n satisfy the axioms for an abelian group.
Indeed, a is coprime to n if and only if gcd(a, n) = 1. Integers in the same congruence class a ≡ b (mod n) satisfy gcd(a, n) = gcd(b, n); hence one is coprime to n if and only if the other is. Thus the notion of congruence classes modulo n that are coprime to n is well-defined.
Since gcd(a, n) = 1 and gcd(b, n) = 1 implies gcd(ab, n) = 1, the set of classes coprime to n is closed under multiplication.
Integer multiplication respects the congruence classes; that is, a ≡ a' and b ≡ b' (mod n) implies ab ≡ a'b' (mod n). This implies that the multiplication is associative, commutative, and that the class of 1 is the unique multiplicative identity.
Finally, given a, the multiplicative inverse of a modulo n is an integer x satisfying ax ≡ 1 (mod n). It exists precisely when a is coprime to n, because in that case gcd(a, n) = 1 and by Bézout's lemma there are integers x and y satisfying ax + ny = 1. Notice that the equation ax + ny = 1 implies that x is coprime to n, so the multiplicative inverse belongs to the group.
Notation
[edit]The set of (congruence classes of) integers modulo n with the operations of addition and multiplication is a ring. It is denoted or (the notation refers to taking the quotient of integers modulo the ideal or consisting of the multiples of n). Outside of number theory the simpler notation is often used, though it can be confused with the p-adic integers when n is a prime number.
The multiplicative group of integers modulo n, which is the group of units in this ring, may be written as (depending on the author) (for German Einheit, which translates as unit), , or similar notations. This article uses
The notation refers to the cyclic group of order n. It is isomorphic to the group of integers modulo n under addition. Note that or may also refer to the group under addition. For example, the multiplicative group for a prime p is cyclic and hence isomorphic to the additive group , but the isomorphism is not obvious.
Structure
[edit]The order of the multiplicative group of integers modulo n is the number of integers in coprime to n. It is given by Euler's totient function: (sequence A000010 in the OEIS). For prime p, .
Cyclic case
[edit]The group is cyclic if and only if n is 1, 2, 4, pk or 2pk, where p is an odd prime and k > 0. For all other values of n the group is not cyclic.[1][2][3] This was first proved by Gauss.[4]
This means that for these n:
- where
By definition, the group is cyclic if and only if it has a generator g; that is, the powers give all possible residues modulo n coprime to n (the first powers give each exactly once). A generator of is called a primitive root modulo n.[5] If there is any generator, then there are of them.
Powers of 2
[edit]Modulo 1 any two integers are congruent, i.e., there is only one congruence class, [0], coprime to 1. Therefore, is the trivial group with φ(1) = 1 element. Because of its trivial nature, the case of congruences modulo 1 is generally ignored and some authors choose not to include the case of n = 1 in theorem statements.
Modulo 2 there is only one coprime congruence class, [1], so is the trivial group.
Modulo 4 there are two coprime congruence classes, [1] and [3], so the cyclic group with two elements.
Modulo 8 there are four coprime congruence classes, [1], [3], [5] and [7]. The square of each of these is 1, so the Klein four-group.
Modulo 16 there are eight coprime congruence classes [1], [3], [5], [7], [9], [11], [13] and [15]. is the 2-torsion subgroup (i.e., the square of each element is 1), so is not cyclic. The powers of 3, are a subgroup of order 4, as are the powers of 5, Thus
The pattern shown by 8 and 16 holds[6] for higher powers 2k, k > 2: is the 2-torsion subgroup, so cannot be cyclic, and the powers of 3 are a cyclic subgroup of order 2k − 2, so:
General composite numbers
[edit]By the fundamental theorem of finite abelian groups, the group is isomorphic to a direct product of cyclic groups of prime power orders.
More specifically, the Chinese remainder theorem[7] says that if then the ring is the direct product of the rings corresponding to each of its prime power factors:
Similarly, the group of units is the direct product of the groups corresponding to each of the prime power factors:
For each odd prime power the corresponding factor is the cyclic group of order , which may further factor into cyclic groups of prime-power orders. For powers of 2 the factor is not cyclic unless k = 0, 1, 2, but factors into cyclic groups as described above.
The order of the group is the product of the orders of the cyclic groups in the direct product. The exponent of the group; that is, the least common multiple of the orders in the cyclic groups, is given by the Carmichael function (sequence A002322 in the OEIS). In other words, is the smallest number such that for each a coprime to n, holds. It divides and is equal to it if and only if the group is cyclic.
Subgroup of false witnesses
[edit]If n is composite, there exists a possibly proper subgroup of , called the "group of false witnesses", comprising the solutions of the equation , the elements which, raised to the power n − 1, are congruent to 1 modulo n.[8] Fermat's Little Theorem states that for n = p a prime, this group consists of all ; thus for n composite, such residues x are "false positives" or "false witnesses" for the primality of n. The number x = 2 is most often used in this basic primality check, and n = 341 = 11 × 31 is notable since , and n = 341 is the smallest composite number for which x = 2 is a false witness to primality. In fact, the false witnesses subgroup for 341 contains 100 elements, and is of index 3 inside the 300-element group .
Examples
[edit]n = 9
[edit]The smallest example with a nontrivial subgroup of false witnesses is 9 = 3 × 3. There are 6 residues coprime to 9: 1, 2, 4, 5, 7, 8. Since 8 is congruent to −1 modulo 9, it follows that 88 is congruent to 1 modulo 9. So 1 and 8 are false positives for the "primality" of 9 (since 9 is not actually prime). These are in fact the only ones, so the subgroup {1,8} is the subgroup of false witnesses. The same argument shows that n − 1 is a "false witness" for any odd composite n.
n = 91
[edit]For n = 91 (= 7 × 13), there are residues coprime to 91, half of them (i.e., 36 of them) are false witnesses of 91, namely 1, 3, 4, 9, 10, 12, 16, 17, 22, 23, 25, 27, 29, 30, 36, 38, 40, 43, 48, 51, 53, 55, 61, 62, 64, 66, 68, 69, 74, 75, 79, 81, 82, 87, 88, and 90, since for these values of x, x90 is congruent to 1 mod 91.
n = 561
[edit]n = 561 (= 3 × 11 × 17) is a Carmichael number, thus s560 is congruent to 1 modulo 561 for any integer s coprime to 561. The subgroup of false witnesses is, in this case, not proper; it is the entire group of multiplicative units modulo 561, which consists of 320 residues.
Examples
[edit]This table shows the cyclic decomposition of and a generating set for n ≤ 128. The decomposition and generating sets are not unique; for example,
(but ). The table below lists the shortest decomposition (among those, the lexicographically first is chosen – this guarantees isomorphic groups are listed with the same decompositions). The generating set is also chosen to be as short as possible, and for n with primitive root, the smallest primitive root modulo n is listed.
For example, take . Then means that the order of the group is 8 (i.e., there are 8 numbers less than 20 and coprime to it); means the order of each element divides 4; that is, the fourth power of any number coprime to 20 is congruent to 1 (mod 20). The set {3,19} generates the group, which means that every element of is of the form 3a × 19b (where a is 0, 1, 2, or 3, because the element 3 has order 4, and similarly b is 0 or 1, because the element 19 has order 2).
Smallest primitive root mod n are (0 if no root exists)
- 0, 1, 2, 3, 2, 5, 3, 0, 2, 3, 2, 0, 2, 3, 0, 0, 3, 5, 2, 0, 0, 7, 5, 0, 2, 7, 2, 0, 2, 0, 3, 0, 0, 3, 0, 0, 2, 3, 0, 0, 6, 0, 3, 0, 0, 5, 5, 0, 3, 3, 0, 0, 2, 5, 0, 0, 0, 3, 2, 0, 2, 3, 0, 0, 0, 0, 2, 0, 0, 0, 7, 0, 5, 5, 0, 0, 0, 0, 3, 0, 2, 7, 2, 0, 0, 3, 0, 0, 3, 0, ... (sequence A046145 in the OEIS)
Numbers of the elements in a minimal generating set of mod n are
- 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 1, 3, 1, 1, 1, 2, 1, 2, 1, 2, 2, 1, 2, 2, 1, 1, 2, 3, 1, 2, 1, 2, 2, 1, 1, 3, 1, 1, 2, 2, 1, 1, 2, 3, 2, 1, 1, 3, 1, 1, 2, 2, 2, 2, 1, 2, 2, 2, 1, 3, 1, 1, 2, 2, 2, 2, 1, 3, 1, 1, 1, 3, 2, 1, 2, 3, 1, 2, ... (sequence A046072 in the OEIS)
| Generating set | Generating set | Generating set | Generating set | |||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | C1 | 1 | 1 | 0 | 33 | C2×C10 | 20 | 10 | 2, 10 | 65 | C4×C12 | 48 | 12 | 2, 12 | 97 | C96 | 96 | 96 | 5 | |||
| 2 | C1 | 1 | 1 | 1 | 34 | C16 | 16 | 16 | 3 | 66 | C2×C10 | 20 | 10 | 5, 7 | 98 | C42 | 42 | 42 | 3 | |||
| 3 | C2 | 2 | 2 | 2 | 35 | C2×C12 | 24 | 12 | 2, 6 | 67 | C66 | 66 | 66 | 2 | 99 | C2×C30 | 60 | 30 | 2, 5 | |||
| 4 | C2 | 2 | 2 | 3 | 36 | C2×C6 | 12 | 6 | 5, 19 | 68 | C2×C16 | 32 | 16 | 3, 67 | 100 | C2×C20 | 40 | 20 | 3, 99 | |||
| 5 | C4 | 4 | 4 | 2 | 37 | C36 | 36 | 36 | 2 | 69 | C2×C22 | 44 | 22 | 2, 68 | 101 | C100 | 100 | 100 | 2 | |||
| 6 | C2 | 2 | 2 | 5 | 38 | C18 | 18 | 18 | 3 | 70 | C2×C12 | 24 | 12 | 3, 69 | 102 | C2×C16 | 32 | 16 | 5, 101 | |||
| 7 | C6 | 6 | 6 | 3 | 39 | C2×C12 | 24 | 12 | 2, 38 | 71 | C70 | 70 | 70 | 7 | 103 | C102 | 102 | 102 | 5 | |||
| 8 | C2×C2 | 4 | 2 | 3, 5 | 40 | C2×C2×C4 | 16 | 4 | 3, 11, 39 | 72 | C2×C2×C6 | 24 | 6 | 5, 17, 19 | 104 | C2×C2×C12 | 48 | 12 | 3, 5, 103 | |||
| 9 | C6 | 6 | 6 | 2 | 41 | C40 | 40 | 40 | 6 | 73 | C72 | 72 | 72 | 5 | 105 | C2×C2×C12 | 48 | 12 | 2, 29, 41 | |||
| 10 | C4 | 4 | 4 | 3 | 42 | C2×C6 | 12 | 6 | 5, 13 | 74 | C36 | 36 | 36 | 5 | 106 | C52 | 52 | 52 | 3 | |||
| 11 | C10 | 10 | 10 | 2 | 43 | C42 | 42 | 42 | 3 | 75 | C2×C20 | 40 | 20 | 2, 74 | 107 | C106 | 106 | 106 | 2 | |||
| 12 | C2×C2 | 4 | 2 | 5, 7 | 44 | C2×C10 | 20 | 10 | 3, 43 | 76 | C2×C18 | 36 | 18 | 3, 37 | 108 | C2×C18 | 36 | 18 | 5, 107 | |||
| 13 | C12 | 12 | 12 | 2 | 45 | C2×C12 | 24 | 12 | 2, 44 | 77 | C2×C30 | 60 | 30 | 2, 76 | 109 | C108 | 108 | 108 | 6 | |||
| 14 | C6 | 6 | 6 | 3 | 46 | C22 | 22 | 22 | 5 | 78 | C2×C12 | 24 | 12 | 5, 7 | 110 | C2×C20 | 40 | 20 | 3, 109 | |||
| 15 | C2×C4 | 8 | 4 | 2, 14 | 47 | C46 | 46 | 46 | 5 | 79 | C78 | 78 | 78 | 3 | 111 | C2×C36 | 72 | 36 | 2, 110 | |||
| 16 | C2×C4 | 8 | 4 | 3, 15 | 48 | C2×C2×C4 | 16 | 4 | 5, 7, 47 | 80 | C2×C4×C4 | 32 | 4 | 3, 7, 79 | 112 | C2×C2×C12 | 48 | 12 | 3, 5, 111 | |||
| 17 | C16 | 16 | 16 | 3 | 49 | C42 | 42 | 42 | 3 | 81 | C54 | 54 | 54 | 2 | 113 | C112 | 112 | 112 | 3 | |||
| 18 | C6 | 6 | 6 | 5 | 50 | C20 | 20 | 20 | 3 | 82 | C40 | 40 | 40 | 7 | 114 | C2×C18 | 36 | 18 | 5, 37 | |||
| 19 | C18 | 18 | 18 | 2 | 51 | C2×C16 | 32 | 16 | 5, 50 | 83 | C82 | 82 | 82 | 2 | 115 | C2×C44 | 88 | 44 | 2, 114 | |||
| 20 | C2×C4 | 8 | 4 | 3, 19 | 52 | C2×C12 | 24 | 12 | 7, 51 | 84 | C2×C2×C6 | 24 | 6 | 5, 11, 13 | 116 | C2×C28 | 56 | 28 | 3, 115 | |||
| 21 | C2×C6 | 12 | 6 | 2, 20 | 53 | C52 | 52 | 52 | 2 | 85 | C4×C16 | 64 | 16 | 2, 3 | 117 | C6×C12 | 72 | 12 | 2, 17 | |||
| 22 | C10 | 10 | 10 | 7 | 54 | C18 | 18 | 18 | 5 | 86 | C42 | 42 | 42 | 3 | 118 | C58 | 58 | 58 | 11 | |||
| 23 | C22 | 22 | 22 | 5 | 55 | C2×C20 | 40 | 20 | 2, 21 | 87 | C2×C28 | 56 | 28 | 2, 86 | 119 | C2×C48 | 96 | 48 | 3, 118 | |||
| 24 | C2×C2×C2 | 8 | 2 | 5, 7, 13 | 56 | C2×C2×C6 | 24 | 6 | 3, 13, 29 | 88 | C2×C2×C10 | 40 | 10 | 3, 5, 7 | 120 | C2×C2×C2×C4 | 32 | 4 | 7, 11, 19, 29 | |||
| 25 | C20 | 20 | 20 | 2 | 57 | C2×C18 | 36 | 18 | 2, 20 | 89 | C88 | 88 | 88 | 3 | 121 | C110 | 110 | 110 | 2 | |||
| 26 | C12 | 12 | 12 | 7 | 58 | C28 | 28 | 28 | 3 | 90 | C2×C12 | 24 | 12 | 7, 11 | 122 | C60 | 60 | 60 | 7 | |||
| 27 | C18 | 18 | 18 | 2 | 59 | C58 | 58 | 58 | 2 | 91 | C6×C12 | 72 | 12 | 2, 3 | 123 | C2×C40 | 80 | 40 | 7, 83 | |||
| 28 | C2×C6 | 12 | 6 | 3, 13 | 60 | C2×C2×C4 | 16 | 4 | 7, 11, 19 | 92 | C2×C22 | 44 | 22 | 3, 91 | 124 | C2×C30 | 60 | 30 | 3, 61 | |||
| 29 | C28 | 28 | 28 | 2 | 61 | C60 | 60 | 60 | 2 | 93 | C2×C30 | 60 | 30 | 11, 61 | 125 | C100 | 100 | 100 | 2 | |||
| 30 | C2×C4 | 8 | 4 | 7, 11 | 62 | C30 | 30 | 30 | 3 | 94 | C46 | 46 | 46 | 5 | 126 | C6×C6 | 36 | 6 | 5, 13 | |||
| 31 | C30 | 30 | 30 | 3 | 63 | C6×C6 | 36 | 6 | 2, 5 | 95 | C2×C36 | 72 | 36 | 2, 94 | 127 | C126 | 126 | 126 | 3 | |||
| 32 | C2×C8 | 16 | 8 | 3, 31 | 64 | C2×C16 | 32 | 16 | 3, 63 | 96 | C2×C2×C8 | 32 | 8 | 5, 17, 31 | 128 | C2×C32 | 64 | 32 | 3, 127 |
See also
[edit]Notes
[edit]- ^ Weisstein, Eric W. "Modulo Multiplication Group". MathWorld.
- ^ "Primitive root - Encyclopedia of Mathematics". encyclopediaofmath.org. Retrieved 2024-07-06.
- ^ Vinogradov 2003, pp. 105–121, § VI PRIMITIVE ROOTS AND INDICES
- ^ Gauss 1986, arts. 52–56, 82–891.
- ^ Vinogradov 2003, p. 106.
- ^ Gauss 1986, arts. 90–91.
- ^ Riesel covers all of this. Riesel 1994, pp. 267–275.
- ^ Erdős, Paul; Pomerance, Carl (1986). "On the number of false witnesses for a composite number". Mathematics of Computation. 46 (173): 259–279. doi:10.1090/s0025-5718-1986-0815848-x. Zbl 0586.10003.
References
[edit]The Disquisitiones Arithmeticae has been translated from Gauss's Ciceronian Latin into English and German. The German edition includes all of his papers on number theory: all the proofs of quadratic reciprocity, the determination of the sign of the Gauss sum, the investigations into biquadratic reciprocity, and unpublished notes.
- Gauss, Carl Friedrich (1986), Disquisitiones Arithmeticae (English translation, Second, corrected edition), translated by Clarke, Arthur A., New York: Springer, ISBN 978-0-387-96254-2
- Gauss, Carl Friedrich (1965), Untersuchungen uber hohere Arithmetik (Disquisitiones Arithemeticae & other papers on number theory) (German translation, Second edition), translated by Maser, H., New York: Chelsea, ISBN 978-0-8284-0191-3
- Riesel, Hans (1994), Prime Numbers and Computer Methods for Factorization (second edition), Boston: Birkhäuser, ISBN 978-0-8176-3743-9
- Vinogradov, I. M. (2003), "§ VI Primitive roots and indices", Elements of Number Theory, Mineola, NY: Dover Publications, pp. 105–121, ISBN 978-0-486-49530-9
External links
[edit]- Weisstein, Eric W. "Modulo Multiplication Group". MathWorld.
- Weisstein, Eric W. "Primitive Root". MathWorld.
- Web-based tool to interactively compute group tables by John Jones
- OEIS sequence A033948 (Numbers that have a primitive root (the multiplicative group modulo n is cyclic))
- Numbers n such that the multiplicative group modulo n is the direct product of k cyclic groups:
- k = 2 OEIS sequence A272592 (2 cyclic groups)
- k = 3 OEIS sequence A272593 (3 cyclic groups)
- k = 4 OEIS sequence A272594 (4 cyclic groups)
- OEIS sequence A272590 (The smallest number m such that the multiplicative group modulo m is the direct product of n cyclic groups)
Multiplicative group of integers modulo n
View on GrokipediaFundamentals
Definition
The multiplicative group of integers modulo $ n $, where $ n $ is a positive integer, is denoted $ (\mathbb{Z}/n\mathbb{Z})^\times $ and consists of the residue classes $ [a] $ with $ 1 \leq a \leq n $ and $ \gcd(a, n) = 1 $, under the operation defined by $ [a] \cdot [b] = [ab \mod n] $.[4] This operation is well-defined on these classes because multiplication and reduction modulo $ n $ preserve the equivalence relation of residues.[5] This structure forms an abelian group. Closure follows from the property that if $ \gcd(a, n) = 1 $ and $ \gcd(b, n) = 1 $, then $ \gcd(ab, n) = 1 $, ensuring the product residue remains coprime to $ n $.[6] The identity element is the residue class $ [1] $, as $ [a] \cdot [1] = [a] $ for any $ [a] $ in the set. Each element $ [a] $ admits a multiplicative inverse $ [x] $ satisfying $ [a] \cdot [x] = [1] $; by Bézout's identity, since $ \gcd(a, n) = 1 $, integers $ x $ and $ y $ exist such that $ ax + ny = 1 $, implying $ ax \equiv 1 \pmod{n} $.[7] Unlike the additive group $ \mathbb{Z}/n\mathbb{Z} $, which comprises all residue classes $ [0], [1], \dots, [n-1] $ under addition modulo $ n $ and includes non-invertible elements like $ [0] $, the multiplicative group $ (\mathbb{Z}/n\mathbb{Z})^\times $ is restricted to the invertible residue classes under multiplication modulo $ n $.[4] The notion arose in Leonhard Euler's 1763 investigation of what is now known as the totient function, which counts the elements of this group.[8]Elements and Order
The elements of the multiplicative group are the equivalence classes of integers modulo that are coprime to , specifically those represented by integers with and .[9] These residues form the set of units in the ring , as each such has a multiplicative inverse modulo .[10] The order of this group, denoted , equals Euler's totient function , which counts the number of integers from 1 to that are coprime to .[11] For , the group is trivial with the single element [1] (equivalently [0] modulo 1).[10] The explicit formula for isGroup Axioms
The set of residue classes modulo that are coprime to , equipped with multiplication modulo , forms a group. This is verified by checking the standard group axioms: closure, associativity, identity element, and existence of inverses. Additionally, the group is abelian due to the commutativity of multiplication. To establish closure, suppose and are elements of the group, meaning and . The product is . It must be shown that . Note that , since for some integer , and any common divisor of and divides . Now, because if a prime divides both and , then divides or , but implies does not divide , and similarly for , yielding a contradiction unless no such exists. Thus, the product is coprime to and belongs to the set.[12] Associativity follows from the associativity of integer multiplication: for in the set, , as the modulo operation preserves the associative property of multiplication in .[13] The identity element is [1], since for any in the set, [1] = [a \cdot 1 \mod n] = [a], and similarly [1][a] = [a].[14] For inverses, given with , Bézout's identity guarantees integers such that , so , meaning satisfies [1] and is thus the inverse of . This inverse can be computed explicitly using the extended Euclidean algorithm.[15] The group is abelian because multiplication of integers is commutative: , so for all elements.[13]Properties
Notation
The multiplicative group of integers modulo , where is a positive integer greater than 1, is commonly denoted by , representing the group of units in the quotient ring . This notation emphasizes its structure as the set of residue classes coprime to under multiplication modulo . An alternative and widely used symbol is , which highlights the group's role as the units of the ring .[16] Elements of the group are typically represented as equivalence classes, such as for the residue class of an integer modulo , where and , or alternatively as .[17] The group operation is multiplication modulo , expressed as , ensuring the result remains within the residue classes coprime to .[1] The order of the group, or the number of its elements, is denoted by Euler's totient function , which counts the integers up to that are coprime to .[11] In some older mathematical texts, the group may be denoted by , though this usage is less common in modern literature.[18] As the unit group of the ring , consists precisely of those elements that possess multiplicative inverses modulo .Cardinality
The multiplicative group of integers modulo , denoted , has cardinality , where denotes Euler's totient function, which counts the number of integers from 1 to that are coprime to .[11] The function is multiplicative, so that if , then .[11] Additionally, is even for all .[11] By Lagrange's theorem applied to the finite group , the order of any subgroup divides .[19] In particular, for any element , the order of divides . This implies Euler's theorem: if , then .[19] To sketch the proof of Euler's theorem using Lagrange's result, consider the cyclic subgroup generated by , which has order equal to the multiplicative order of modulo . By Lagrange's theorem, divides , so and thus .[19] Quantitative bounds on the size of the group are also known; in particular, there exists a constant such that for all sufficiently large .[20]Isomorphisms via Chinese Remainder Theorem
A fundamental result concerning the structure of the multiplicative group of integers modulo arises from the Chinese Remainder Theorem when factors into coprime parts. Specifically, if where , then there is a group isomorphismStructure
Cyclic Case
The multiplicative group is cyclic if and only if or where is an odd prime and .[23] Under these conditions, the group admits generators known as primitive roots modulo ; an integer coprime to is a primitive root if its multiplicative order modulo equals , the Euler totient function.[24] The existence of such generators ensures that every element coprime to can be expressed as a power of the primitive root modulo .[23] When is cyclic, it is isomorphic to the additive cyclic group of order .[25] A key structural property is that the group contains exactly one subgroup of order for each positive divisor of ; these subgroups consist of the elements whose orders divide .[25] The number of primitive roots modulo is precisely , reflecting the count of generators in a cyclic group of that order.[23] To identify a primitive root modulo , factorize into its prime factors , and test candidate integers (starting from small values like 2 or 3, ensuring ) by checking that for each .[24] If the condition holds for all prime factors, then the order of is exactly , confirming it as a primitive root; otherwise, proceed to the next candidate.[24] This method leverages the fact that the order must divide but not any proper divisor obtained by removing one prime factor.Powers of Odd Primes
The multiplicative group , where is an odd prime and , is cyclic of order .[26] This order counts the integers from 1 to that are coprime to , excluding multiples of .[27] As a cyclic group of order , is isomorphic to the cyclic group .[25] Primitive roots modulo exist, meaning there are generators such that the powers of modulo produce all units. Specifically, if is a primitive root modulo , it can be lifted to a primitive root modulo using Hensel's lemma applied to the polynomial , ensuring the lift preserves the order since the derivative condition holds.[28] The subgroup structure follows from cyclicity: for each positive divisor of , there is a unique cyclic subgroup of order , generated by for any generator .[25] In particular, the unique subgroup of order consists of elements congruent to 1 modulo , i.e., of the form for integers modulo , and this subgroup is cyclic, generated by . Such lifts ensure the full group structure is captured by iteratively adjusting primitive roots from lower powers, as in the construction where a primitive root modulo yields primitive roots modulo by adding multiples of .[29]Powers of 2
For , the group is the trivial group consisting of the single element .[22] For , the group is cyclic of order , generated by .[18] For , the group is isomorphic to .[22] This isomorphism is explicit, with the group generated by (of order ) and (of order ).[18] Consequently, the group is non-cyclic, as its maximum element order is , which is strictly less than .[22] The cyclic subgroup of order is generated by and consists precisely of the elements congruent to .[18]General Composite Case
For a general composite integer with prime factorization , where the are distinct odd primes and , , the multiplicative group is isomorphic to the direct product by the Chinese Remainder Theorem applied to the coprime factors of .[21] The structures of the prime power components are known from the cases of powers of 2 and odd primes.[21] This decomposition yields non-cyclic groups in many composite cases. For example, when , , which is non-cyclic of order .[21] Similarly, for , , a non-cyclic elementary abelian group of order .[21] The exponent of , the least common multiple of the orders of its elements, is the least common multiple of the exponents of the component groups .[21] This exponent equals the Carmichael function , defined as , where on prime powers matches the respective group exponents.[30] The group fails to be cyclic precisely when has two or more distinct odd prime factors, or when is divisible by 8 and by an odd prime, or when for ; it is cyclic only for or with an odd prime and .[31]Special Subgroups
Quadratic Residues
In the multiplicative group of integers modulo , denoted , the quadratic residues form the subgroup consisting of all squares of elements in the group. Formally, this subgroup is , where denotes the congruence class modulo . The squaring map is a group endomorphism of whose image is this subgroup of quadratic residues and whose kernel is the set of units satisfying . For , is even and this kernel always contains [1], [-1] \}, but its size is 2 only in specific cases such as odd prime powers or ; in general, the size (and thus the index of the quadratic residues subgroup) is where is the number of cyclic factors of even order in the primary decomposition of the group.[22] For an odd prime , the subgroup of quadratic residues in is cyclic of order . This follows from the cyclicity of and the fact that the quadratic residues are precisely the even powers of a primitive root modulo . The Legendre symbol provides a means to detect membership in this subgroup: for an integer not divisible by , , which equals 1 if is a quadratic residue modulo , -1 if it is a non-residue, and 0 if divides .[32][33] For powers of 2 with exponent , the subgroup of quadratic residues has index 4; for example, modulo 8 it is , and modulo 16 it is .[22] For composite , the structure of the subgroup of quadratic residues is determined via the Chinese Remainder Theorem, as decomposes into a direct product of the groups for the prime power factors of . An element is a quadratic residue modulo if and only if it is a quadratic residue modulo each such prime power. For an odd prime power with , the subgroup has index 2 and order . The overall index is the product of the local indices.[34]False Witnesses
In the context of primality testing for a composite integer , a false witness, also known as a Fermat liar, is an integer coprime to such that .[35] This condition mimics the conclusion of Fermat's Little Theorem, which states that if is prime, then for all coprime to ; thus, elements where serve as witnesses to the compositeness of .[35] Similarly, in the Miller-Rabin primality test, false witnesses (or strong liars) are bases that satisfy the stronger conditions derived from writing with odd, namely or for some .[36] The set of Fermat false witnesses forms a proper subgroup of the multiplicative group , consisting of all units modulo satisfying .[35] This subgroup contains the identity element 1, since , and is closed under multiplication: if and , then .[35] It is also closed under inversion, as the finite order of elements in ensures that if the order of divides , then the order of does as well.[35] The order of this subgroup divides , the order of , but is strictly less than unless is a Carmichael number, in which case every unit is a false witness and the subgroup coincides with the full group.[35] In contrast, the set of Miller-Rabin false witnesses does not necessarily form a subgroup of , though it is contained within a proper subgroup of index at most 4, ensuring that at least three-quarters of the units are witnesses for odd composite .[36] This structural distinction highlights the enhanced reliability of the Miller-Rabin test over the basic Fermat test in probabilistic primality verification.[36]Examples of False Witnesses
One concrete example of false witnesses occurs for , where the multiplicative group has order . For the Fermat primality test, false witnesses are bases coprime to 9 satisfying . Direct computation shows this holds for (trivially, as ) and (since and ), but fails for the others (e.g., , ).[35] Thus, there are 2 false witnesses out of 6 possible bases, a proportion of .[37] Another example is , with group order . False witnesses satisfy for coprime to 91. Base 3 is one such false witness, as its order in is 6 (lcm of orders 6 modulo 7 and 3 modulo 13), dividing 90, so .[38] The set of all false witnesses forms a subgroup of size 36 (computed via CRT: all 6 elements modulo 7 and the 6 elements of order dividing 6 modulo 13 satisfy the condition, yielding ).[39] This gives a proportion of false witnesses.[40] A more extreme case is the Carmichael number , with . As the smallest Carmichael number, it satisfies for every coprime to 561, making all 320 elements of the group false witnesses relative to the Fermat test (verified by the defining property that divides 560, where is the Carmichael function). The proportion is thus 1, with the entire group consisting of false witnesses.[35]Applications
Primality Testing
The Fermat primality test leverages the structure of the multiplicative group of integers modulo n, denoted , to assess whether n is prime. For a candidate prime n > 2, select a random base a with and , then verify if . If the congruence fails, n is composite. This test is grounded in Fermat's Little Theorem, which states that if n is prime, then the order of every element in the group divides n-1, the group's order, ensuring the congruence holds for all such a.[35] However, the test can err on composite n that are Fermat pseudoprimes to base a, where the congruence holds despite compositeness. The test fails deterministically for Carmichael numbers, which are square-free composite integers n such that the exponent of —the least common multiple of the orders of its elements—divides n-1. For these n, holds for all a coprime to n, mimicking prime behavior and causing the Fermat test to incorrectly classify them as probable primes.[41] This vulnerability arises because the group's exponent dividing n-1 implies every element's order divides n-1, just as in the prime case, though the group is not cyclic. To address these shortcomings, the Miller-Rabin test provides a stronger probabilistic primality test, also exploiting properties of . Write n-1 = with d odd, then for a random base a coprime to n, check if either or for some . If neither holds, a is a witness to compositeness. For prime n, the group is cyclic of order n-1, ensuring every a satisfies the conditions due to the existence of elements of order dividing n-1 with specific square root behaviors. If n is composite, at least three-fourths of bases are witnesses, yielding an error probability less than per trial; multiple independent trials reduce this exponentially.[36] These tests rely on the cyclic nature of for prime n, where a generator exists with order exactly n-1, guaranteeing the required congruences without the pitfalls seen in non-cyclic composite groups. Deterministic variants eliminate randomness by testing a fixed set of small bases; for example, bases 2, 3, 5, 7, 11, 13, 17, 19, and 23 suffice for all odd n < 3,825,123,056,546,413,051 (about 62 bits).[42]Cryptography
The Diffie-Hellman key exchange protocol utilizes the multiplicative group of integers modulo a prime , specifically cyclic subgroups generated by a primitive root , to enable secure key agreement between two parties over an insecure channel.[43] In this scheme, one party computes and sends it to the other, who responds with ; the shared secret is then derived as , without either party revealing their private exponents or .[43] The security of Diffie-Hellman relies on the hardness of the discrete logarithm problem (DLP) in the cyclic group for large primes , where given and , computing the exponent (the discrete log) is computationally infeasible with current algorithms.[43] This intractability ensures that an eavesdropper cannot efficiently recover the shared secret from the public values and , as solving the DLP would be required to extract or .[44] The RSA cryptosystem employs the multiplicative group where for distinct large primes and , with the public exponent chosen such that , allowing encryption as for message .[45] Decryption uses the private exponent , recovering via Euler's theorem, since for .[45] RSA's security stems from the difficulty of factoring to compute , as knowledge of enables finding and thus breaking the system, while factoring large semiprimes remains intractable.[46]Further Examples
For the prime modulus , the multiplicative group consists of the elements under multiplication modulo 5. This group is cyclic of order 4, generated by 2, as the powers are , , , . The orders of the elements are: 1 has order 1, 2 has order 4, 3 has order 4, and 4 has order 2.[22] For the composite modulus , the group has elements , which is isomorphic to and has order 8. The maximum order of any element is 4, for example, the order of 2 is 4 since and no smaller positive exponent works.[22] For the power-of-2 modulus , the group consists of the elements under multiplication modulo 8, isomorphic to with order 4. All non-identity elements have order at most 2, as , , and .[22] The following table summarizes Euler's totient function , the isomorphism type of , and an example generator (when the group is cyclic) for to 20, based on the standard classification of these groups.[22]| Structure | Example Generator | ||
|---|---|---|---|
| 1 | 1 | Trivial | — |
| 2 | 1 | Trivial | — |
| 3 | 2 | 2 | |
| 4 | 2 | 3 | |
| 5 | 4 | 2 | |
| 6 | 2 | 5 | |
| 7 | 6 | 3 | |
| 8 | 4 | — | |
| 9 | 6 | 2 | |
| 10 | 4 | 3 | |
| 11 | 10 | 2 | |
| 12 | 4 | — | |
| 13 | 12 | 2 | |
| 14 | 6 | 5 | |
| 15 | 8 | — | |
| 16 | 8 | — | |
| 17 | 16 | 3 | |
| 18 | 6 | 5 | |
| 19 | 18 | 2 | |
| 20 | 8 | — |