# 整数模n乘法群

**整数模n乘法群**，记作 \( (\mathbb{Z}/n\mathbb{Z})^{\times} \) 或 \( U(n) \)，是由模 \( n \) 与 \( n \) 互素的剩余类在模 \( n \) 乘法下构成的群。它是一个有限阿贝尔群，阶为欧拉函数 \( \varphi(n) \)，其结构完全由中国剩余定理以及素数幂模的单位群结构刻画。<sup>[1](https://calc-path.com/abstract-algebra/modules/groups)</sup><sup> • </sup><sup>[2](https://finitegroupdatabase.com/c/multiplicative)</sup>

| 关键事实 | 细节 |
|---|---|
| 元素 | 满足 \( \gcd(a, n) = 1 \) 的类 \( [a]_n \)；这些恰好是模 \( n \) 有乘法逆元的类<sup>[3](https://www.math.gordon.edu/ntic/ntic2017/section-groups-numbers.html)</sup> |
| 阶 | \( \varphi(n) \)，即欧拉函数；对于 \( n = 26 \)，\( U_{26} = \{1, 3, 5, 7, 9, 11, 15, 17, 19, 21, 23, 25\} \) 有 12 个元素<sup>[1](https://calc-path.com/abstract-algebra/modules/groups)</sup><sup> • </sup><sup>[4](https://zoo.cs.yale.edu/classes/cs467/2006f/attach/ln08.html)</sup> |
| 结构 | 在 \( n \) 的素因数分解下，\( (\mathbb{Z}/n\mathbb{Z})^{\times} \cong \prod_i (\mathbb{Z}/p_i^{r_i}\mathbb{Z})^{\times} \)<sup>[5](https://perso.pages.math.cnrs.fr/users/diego.izquierdo/media/Polytechnique/Course_notes_final.pdf)</sup> |
| 素数幂 | 对奇素数 \( p \)，\( (\mathbb{Z}/p^r\mathbb{Z})^{\times} \) 是阶为 \( p^{r-1}(p-1) \) 的循环群；\( (\mathbb{Z}/2^r\mathbb{Z})^{\times} \cong \mathbb{Z}/2\mathbb{Z} \times \mathbb{Z}/2^{r-2}\mathbb{Z} \)<sup>[5](https://perso.pages.math.cnrs.fr/users/diego.izquierdo/media/Polytechnique/Course_notes_final.pdf)</sup> |
| 循环情形 | 原根仅对模 \( 2, 4, p^a, 2p^a \)（\( p > 2 \) 为素数）存在<sup>[6](https://encyclopediaofmath.org/wiki/Primitive_root)</sup> |
| 指数 | 卡迈克尔函数 \( \lambda(n) \)，即对所有与 \( n \) 互素的 \( x \) 满足 \( x^k \equiv 1 \pmod n \) 的最小 \( k \)；\( \lambda(n) \) 整除 \( \varphi(n) \)<sup>[7](https://encyclopediaofmath.org/wiki/Carmichael_function)</sup> |
| 域判别 | \( \mathbb{Z}/n\mathbb{Z} \) 是域当且仅当 \( n \) 是素数<sup>[8](https://www.youtube.com/watch?v=U_iutpWS2nE)</sup> |

## 定义与群结构

设 \( \mathbb{Z}/n\mathbb{Z} \) 为整数模 \( n \) 的剩余类环。单位是存在乘法逆元的元素，而单位恰好是满足 \( \gcd(a, n) = 1 \) 的类 \( [a] \)。这个条件在类上是良定义的，因为同一个类的任意两个代表元与模数的最大公约数相同。<sup>[3](https://www.math.gordon.edu/ntic/ntic2017/section-groups-numbers.html)</sup><sup> • </sup><sup>[9](https://www3.nd.edu/~sevens/znzstar.pdf)</sup>

单位集合对乘法封闭：若 \( \gcd(a, n) = \gcd(b, n) = 1 \)，则 \( \gcd(ab, n) = 1 \)，这可由贝祖等式推出：写出 \( ar + ns = 1 \) 和 \( bx + ny = 1 \)，再将两式相乘。<sup>[9](https://www3.nd.edu/~sevens/znzstar.pdf)</sup> 乘法结合且交换，因为它继承自整数；单位元是 1 所在的类；\( [a] \) 的逆元由满足 \( ax \equiv 1 \pmod n \) 的类 \( [x] \) 给出，该逆元由贝祖等式保证存在，且本身也是单位。因此 \( (\mathbb{Z}/n\mathbb{Z})^{\times} \) 是阿贝尔群。<sup>[9](https://www3.nd.edu/~sevens/znzstar.pdf)</sup><sup> • </sup><sup>[3](https://www.math.gordon.edu/ntic/ntic2017/section-groups-numbers.html)</sup>

由于该环恰好有 \( n \) 个剩余类，群是有限的，其阶为 \( \varphi(n) \)，即 1 到 \( n \) 中与 \( n \) 互素的整数个数。<sup>[10](https://androma.org/theorems/11030)</sup><sup> • </sup><sup>[1](https://calc-path.com/abstract-algebra/modules/groups)</sup> 当 \( n \) 为素数时，每个非零类都是单位，因此 \( \mathbb{Z}/n\mathbb{Z} \) 是域；反之，域没有零因子，这迫使 \( n \) 为素数。<sup>[8](https://www.youtube.com/watch?v=U_iutpWS2nE)</sup>

## 由中国剩余定理分解

中国剩余定理给出环同构 \( \mathbb{Z}/n\mathbb{Z} \cong \prod_i \mathbb{Z}/p_i^{r_i}\mathbb{Z} \)，其中 \( n = p_1^{r_1} \cdots p_s^{r_s} \) 为素因数分解。环同构保持单位，因此单位群相应地分解：<sup>[5](https://perso.pages.math.cnrs.fr/users/diego.izquierdo/media/Polytechnique/Course_notes_final.pdf)</sup>

\[ (\mathbb{Z}/n\mathbb{Z})^{\times} \cong \prod_{i=1}^{s} (\mathbb{Z}/p_i^{r_i}\mathbb{Z})^{\times}. \]

这将群的描述归结为素数幂模的情形。它还给出欧拉函数的乘积公式 \( \varphi(n) = \prod_i p_i^{r_i - 1}(p_i - 1) \)，因为群的直积的阶等于各群阶的乘积。<sup>[5](https://perso.pages.math.cnrs.fr/users/diego.izquierdo/media/Polytechnique/Course_notes_final.pdf)</sup>

## 素数幂模与原根

对奇素数 \( p \) 和 \( r \ge 1 \)，群 \( (\mathbb{Z}/p^r\mathbb{Z})^{\times} \) 是阶为 \( p^{r-1}(p-1) \) 的循环群。该群的生成元称为模 \( p^r \) 的**原根**：即整数 \( g \)，满足 \( g^{\varphi(m)} \equiv 1 \pmod m \)，且对 \( 1 \le \gamma < \varphi(m) \) 有 \( g^{\gamma} \not\equiv 1 \pmod m \)。此时幂 \( g^0, \ldots, g^{\varphi(m)-1} \) 构成缩剩余系，每个与 \( m \) 互素的 \( a \) 都有一个指数，即满足 \( g^{\gamma} \equiv a \pmod m \) 的指数 \( \gamma \)。<sup>[5](https://perso.pages.math.cnrs.fr/users/diego.izquierdo/media/Polytechnique/Course_notes_final.pdf)</sup><sup> • </sup><sup>[6](https://encyclopediaofmath.org/wiki/Primitive_root)</sup>

\( r = 1 \) 的情形基于一个一般事实：域乘法群的任何有限子群都是循环群，其证明通过在有限阿贝尔群的结构分解中计算 \( x^{n_1} = 1 \) 的解数得到。<sup>[5](https://perso.pages.math.cnrs.fr/users/diego.izquierdo/media/Polytechnique/Course_notes_final.pdf)</sup> 对于 2 的幂，当 \( r \ge 3 \) 时群不是循环的：\( (\mathbb{Z}/2^r\mathbb{Z})^{\times} \cong \mathbb{Z}/2\mathbb{Z} \times \mathbb{Z}/2^{r-2}\mathbb{Z} \)，其中 5 的阶为 \( 2^{r-2} \)，提供第二个因子。<sup>[5](https://perso.pages.math.cnrs.fr/users/diego.izquierdo/media/Polytechnique/Course_notes_final.pdf)</sup> 一个具体例子是 \( (\mathbb{Z}/8\mathbb{Z})^{\times} \)，其中对每个奇数 \( x \) 都有 \( x^2 \equiv 1 \pmod 8 \)，因此没有元素生成该群，模 8 的原根不存在。<sup>[11](https://ramanujan.math.trinity.edu/rdaileda/teach/s18/m3341/ZnZ.pdf)</sup>

结合两种情形，原根恰好对模 \( 2, 4, p^a, 2p^a \)（\( p > 2 \) 为素数）存在；对这些模，缩剩余类群是阶为 \( \varphi(m) \) 的循环群。<sup>[6](https://encyclopediaofmath.org/wiki/Primitive_root)</sup> 阶为 \( n \) 的有限循环群恰好有 \( \varphi(n) \) 个生成元，因此当模 \( m \) 的原根存在时，共有 \( \varphi(\varphi(m)) \) 个原根。<sup>[11](https://ramanujan.math.trinity.edu/rdaileda/teach/s18/m3341/ZnZ.pdf)</sup>

## 指数：卡迈克尔函数

**卡迈克尔函数** \( \lambda(n) \) 是群的指数：即对所有与 \( n \) 互素的 \( a \) 满足 \( a^{\lambda} \equiv 1 \pmod n \) 的最小正整数 \( \lambda \)。该函数的计算方式为：取它在 \( n \) 的每个素数幂因子处取值的最小公倍数：\( \lambda(n) = \mathrm{lcm}\{\lambda(p_i^{a_i})\} \)。<sup>[7](https://encyclopediaofmath.org/wiki/Carmichael_function)</sup> 由于群的阶为 \( \varphi(n) \)，拉格朗日定理给出 \( \lambda(n) \mid \varphi(n) \)。对奇素数幂，\( \lambda(p^a) = \varphi(p^a) = p^{a-1}(p-1) \)；而 \( \lambda(2) = 1 \)，\( \lambda(4) = 2 \)，且对 \( a \ge 3 \) 有 \( \lambda(2^a) = 2^{a-2} \)。<sup>[7](https://encyclopediaofmath.org/wiki/Carmichael_function)</sup> 等价地，\( \lambda(n) \) 是群中任意元素的最大阶。<sup>[12](https://oeis.org/A002322)</sup>

指数在实际中很重要，因为满足 \( \lambda(n) \mid n - 1 \) 的合数 \( n \) 是卡迈克尔数，即对所有与 \( n \) 互素的底数都能通过费马素性检验的合数；这样的数存在，因此该检验可以证明合数性，但不能证明素性。<sup>[7](https://encyclopediaofmath.org/wiki/Carmichael_function)</sup><sup> • </sup><sup>[13](https://oeis.org/wiki/Carmichael_numbers)</sup>

## 欧拉定理与密码学

欧拉定理指出，对每个 \( x \in (\mathbb{Z}/n\mathbb{Z})^{\times} \) 有 \( x^{\varphi(n)} \equiv 1 \pmod n \)，费马小定理 \( x^{p-1} \equiv 1 \pmod p \) 是素数模的特殊情形。一个推论是：当 \( r \equiv s \pmod{\varphi(n)} \) 且 \( a \) 是单位时，\( a^r \equiv a^s \pmod n \)。<sup>[4](https://zoo.cs.yale.edu/classes/cs467/2006f/attach/ln08.html)</sup>

这个推论是 RSA 的工作原理：取模 \( n = pq \) 和满足 \( ed \equiv 1 \pmod{\varphi(n)} \) 的密钥，解密能恢复消息，因为对 \( m \in (\mathbb{Z}/n\mathbb{Z})^{\times} \) 有 \( m^{ed} \equiv m \pmod n \)。<sup>[4](https://zoo.cs.yale.edu/classes/cs467/2006f/attach/ln08.html)</sup> 同一个群也构成了基于有限域上离散对数问题的密钥建立方案的基础，如 NIST SP 800-56A 中对迪菲-赫尔曼和 MQV 变体的规定。<sup>[14](https://csrc.nist.gov/pubs/sp/800/56/a/r3/final)</sup>

## 小阶数下群的样子

同构类型并不由 \( \varphi(n) \) 单独决定。对于 \( \varphi(n) = 8 \)，模 \( n \in \{15, 16, 20, 24, 30\} \) 都有八个单位，但所得的群没有一个是循环群；循环群 \( C_8 \) 从不会作为模 \( n \) 的单位群出现。<sup>[2](https://finitegroupdatabase.com/c/multiplicative)</sup> 分类由素数幂分解得出：奇素数幂因子贡献循环群，而 \( r \ge 3 \) 的因子 \( 2^r \) 贡献非循环直积 \( \mathbb{Z}/2 \times \mathbb{Z}/2^{r-2} \)。<sup>[5](https://perso.pages.math.cnrs.fr/users/diego.izquierdo/media/Polytechnique/Course_notes_final.pdf)</sup>

## 历史

模素数的原根由莱昂哈德·欧拉（Leonhard Euler）引入，而任意素数模原根的存在性由卡尔·弗里德里希·高斯（Carl Friedrich Gauss）在 1801 年的《算术研究》（*Disquisitiones Arithmeticae*）中证明，其中第 57 条讨论了原根，高斯将这一术语归功于欧拉。<sup>[6](https://encyclopediaofmath.org/wiki/Primitive_root)</sup> 《算术研究》还推广了相对于固定原根的指数的使用，类比于对数表。<sup>[15](https://www.sophiararebooks.com/sep2018.pdf)</sup>

## References

1. [Definition 1.22 and Proposition 1.23, Abstract Algebra — Groups, calc-path.com](https://calc-path.com/abstract-algebra/modules/groups)
2. [Multiplicative group mod n, Finite Group Database](https://finitegroupdatabase.com/c/multiplicative)
3. [NTIC: Groups and Number Systems, Gordon College](https://www.math.gordon.edu/ntic/ntic2017/section-groups-numbers.html)
4. [Lecture notes 8: Modular exponentiation and Euler's theorem, Yale CS 467](https://zoo.cs.yale.edu/classes/cs467/2006f/attach/ln08.html)
5. [D. Izquierdo, Course notes, §3.1: The group of units of Z/nZ, École Polytechnique](https://perso.pages.math.cnrs.fr/users/diego.izquierdo/media/Polytechnique/Course_notes_final.pdf)
6. [Primitive root, Encyclopedia of Mathematics](https://encyclopediaofmath.org/wiki/Primitive_root)
7. [Carmichael function, Encyclopedia of Mathematics](https://encyclopediaofmath.org/wiki/Carmichael_function)
8. [AG07: The group of units of integers modulo n; Z/nZ a field iff n prime (video), Shahriari](https://www.youtube.com/watch?v=U_iutpWS2nE)
9. [The multiplicative group (Z/nZ)*, University of Notre Dame lecture notes](https://www3.nd.edu/~sevens/znzstar.pdf)
10. [Unit group modulo an integer is finite abelian, Androma](https://androma.org/theorems/11030)
11. [R. Daileda, The structure of (Z/nZ)×, Trinity University](https://ramanujan.math.trinity.edu/rdaileda/teach/s18/m3341/ZnZ.pdf)
12. [A002322: Reduced totient function (Carmichael lambda), OEIS](https://oeis.org/A002322)
13. [Carmichael numbers, OeisWiki](https://oeis.org/wiki/Carmichael_numbers)
14. [NIST SP 800-56A Rev. 3: Recommendation for Pair-Wise Key-Establishment Schemes Using Discrete Logarithm Cryptography](https://csrc.nist.gov/pubs/sp/800/56/a/r3/final)
15. [Sophia Rare Books: Gauss, Disquisitiones Arithmeticae (1801), sale catalog description](https://www.sophiararebooks.com/sep2018.pdf)

---
*Initially written Sep 17, 2026 · Reviewed: Oct 15, 2026 · Edited: Oct 15, 2026; Oct 25, 2026 · Last review: Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 数与代数 › Number theory › Elementary number theory › Orders, primitive roots, and the multiplicative group mod n

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/multiplicative-group-of-integers-modulo-n

English original: https://www.edgepedia.org/multiplicative-group-of-integers-modulo-n
