# 结合律

结合律是二元运算的一种性质。所谓二元运算，是将集合中的两个元素结合起来产生第三个元素的运算。在结合律下，运算对象的分组方式不会改变结果：
\[ (a \star b) \star c = a \star (b \star c) \]
对集合中的所有元素 \( a \)、\( b \) 和 \( c \) 均成立。数的加法和乘法具有该性质；减法和除法则没有。该性质是抽象代数的标准公理之一，其实际推论是：一个结合运算的不间断链条，例如 \( a_1 + a_2 + \cdots + a_n \)，可以不加括号地书写，因为每一种分组都给出相同的值。<sup>[1](https://mathstats-materials.uncg.edu/mat112/web/secbinopassoc.html)</sup><sup> • </sup><sup>[2](https://encyclopediaofmath.org/wiki/Associativity)</sup>

| 关键事实 | 详情 |
|---|---|
| 定义 | 集合 \( S \) 上的二元运算 \( \star \) 是结合的，当且仅当对所有 \( a, b, c \in S \) 都有 \( (a \star b) \star c = a \star (b \star c) \)<sup>[1](https://mathstats-materials.uncg.edu/mat112/web/secbinopassoc.html)</sup> |
| 它允许什么 | 由单一结合运算构成的表达式可以任意分组；它不允许改变因子的顺序，改变顺序需要交换律<sup>[3](https://danielmiranda.prof.ufabc.edu.br/livros/ala/capitulo-01-estruturas-algebricas-e-polinomios.html)</sup> |
| 结合的运算 | 整数、有理数和实数的加法与乘法，以及自然数的乘法；方阵上的矩阵乘法；函数的复合；逻辑运算“与”和“或”<sup>[1](https://mathstats-materials.uncg.edu/mat112/web/secbinopassoc.html)</sup><sup> • </sup><sup>[4](https://encyclopediaofmath.org/wiki/Algebra_of_logic)</sup> |
| 非结合的运算 | 整数减法：\( 3-(2-1)=2 \) 但 \( (3-2)-1=0 \)；除法；浮点加法和乘法<sup>[1](https://mathstats-materials.uncg.edu/mat112/web/secbinopassoc.html)</sup><sup> • </sup><sup>[5](https://technav.ieee.org/topic/floating-point-arithmetic/)</sup> |
| 代数中的作用 | 结合律是半群的定义性公理，也是群的三条公理之一，与单位元和逆元并列<sup>[2](https://encyclopediaofmath.org/wiki/Associativity)</sup><sup> • </sup><sup>[6](https://math.libretexts.org/Bookshelves/Abstract_and_Geometric_Algebra/First-Semester_Abstract_Algebra%3A_A_Structural_Approach_%28Sklar%29/02%3A_Groups/2.03%3A_The_Definition_of_a_Group)</sup> |
| 历史注记 | 哈密顿的四元数（1843年）放弃了乘法的交换律，但保留了结合律和分配律<sup>[7](https://link.springer.com/article/10.1007/s00407-026-00366-y)</sup> |
| 学习困难 | 课堂观察发现，在小学教学中，该性质常与交换律相混淆<sup>[8](https://www.tandfonline.com/doi/abs/10.1080/19477503.2018.1425592)</sup> |

## 定义与含义

形式上，设 \( S \) 为一个集合，\( \star : S \times S \to S \) 为一个二元运算。当对所有 \( S \) 中的 \( a \)、\( b \) 和 \( c \) 都有 \( a \star (b \star c) = (a \star b) \star c \) 时，该运算是结合的。<sup>[1](https://mathstats-materials.uncg.edu/mat112/web/secbinopassoc.html)</sup> 这一恒等式只关心括号的位置；运算对象从左到右的顺序是固定的。这正是它与交换律的区别所在——交换律关心的是顺序：\( a \star b = b \star a \)。结合律允许重新分组，交换律允许重新排序，而一个运算可以具有其中一种性质而不具有另一种。<sup>[3](https://danielmiranda.prof.ufabc.edu.br/livros/ala/capitulo-01-estruturas-algebricas-e-polinomios.html)</sup>

当一个运算满足结合律时，推广是直接的：乘积或和 \( a_1 a_2 \cdots a_n \) 无需任何关于加括号的约定即可良定义，因为所有分组方式都求值到同一个元素。对于非结合运算，即便只有三项，这一点也不成立，因此括号或固定的求值约定（例如编程语言中减号的左结合性）就成为必要。<sup>[3](https://danielmiranda.prof.ufabc.edu.br/livros/ala/capitulo-01-estruturas-algebricas-e-polinomios.html)</sup>

## 哪些运算是结合的

整数、有理数和实数的加法与乘法是结合的，自然数的乘法也是。整数减法不是：\( 3-(2-1)=2 \)，而 \( (3-2)-1=0 \)。<sup>[1](https://mathstats-materials.uncg.edu/mat112/web/secbinopassoc.html)</sup> 一个这样的反例就足以否证结合律，因为该恒等式必须对所有三元组成立。<sup>[9](https://math.libretexts.org/Courses/Mount_Royal_University/Higher_Arithmetic/1%253A__Binary_operations/1.1%253A_Binary_operations)</sup>

方阵集合 \( M_n(\mathbb{K}) \) 上的矩阵乘法是结合的，这正是矩阵乘积不加括号书写的原因；当 \( m \neq n \) 时，普通乘法甚至不是长方形 \( m \times n \) 矩阵上的二元运算。<sup>[3](https://danielmiranda.prof.ufabc.edu.br/livros/ala/capitulo-01-estruturas-algebricas-e-polinomios.html)</sup> 在逻辑代数中，合取和析取都满足结合律，\( (x \& y) \& z = x \& (y \& z) \) 以及 \( (x \lor y) \lor z = x \lor (y \lor z) \)，这正是布尔表达式不加括号记法的基础。<sup>[4](https://encyclopediaofmath.org/wiki/Algebra_of_logic)</sup>

对一个具体定义的运算证明结合律可能需要实实在在的工作。对于由凯莱表给出的小有限集上的运算，检验过程是穷举所有元素三元组；对于由公式在整数上定义的运算，则归结为利用普通乘法的结合律进行代数变形。<sup>[1](https://mathstats-materials.uncg.edu/mat112/web/secbinopassoc.html)</sup><sup> • </sup><sup>[9](https://math.libretexts.org/Courses/Mount_Royal_University/Higher_Arithmetic/1%253A__Binary_operations/1.1%253A_Binary_operations)</sup>

## 在代数结构中的作用

结合律是代数结构标准层级中的第一条公理。半群恰好就是配备了一个结合二元运算的集合。<sup>[2](https://encyclopediaofmath.org/wiki/Associativity)</sup> 群在此基础上增加了单位元和逆元，其定义将结合律列为群的三条公理之首。<sup>[6](https://math.libretexts.org/Bookshelves/Abstract_and_Geometric_Algebra/First-Semester_Abstract_Algebra%3A_A_Structural_Approach_%28Sklar%29/02%3A_Groups/2.03%3A_The_Definition_of_a_Group)</sup> 正是这条公理使得 \( a^3 \) 这样的指数记法无歧义，也使得诸如在方程两边同时加上同一个逆元来解方程这样的代数变形成为可能。<sup>[6](https://math.libretexts.org/Bookshelves/Abstract_and_Geometric_Algebra/First-Semester_Abstract_Algebra%3A_A_Structural_Approach_%28Sklar%29/02%3A_Groups/2.03%3A_The_Definition_of_a_Group)</sup>

该定义可以推广到二元运算之外。对于 \( n \) 元运算 \( \omega \)，结合律由一组恒等式表达，即对每个位置 \( i = 1, \ldots, n \)，任意两个相邻的 \( n \) 元参数块都可以先行组合。<sup>[2](https://encyclopediaofmath.org/wiki/Associativity)</sup> 不满足完全结合律的运算仍可能满足较弱的定律；《数学百科全书》将幂结合性、交错恒等式和柔性恒等式列为这样的较弱性质。<sup>[2](https://encyclopediaofmath.org/wiki/Associativity)</sup>

## 浮点算术

在计算机算术中，该性质以一种对软件至关重要的方式失效。IEEE 754 浮点算术——几乎所有现代处理器都实现的标准——保证单次算术运算产生正确舍入的精确结果，但这一保证并不延伸到运算序列：\( (a + b) + c \) 可能与 \( a + (b + c) \) 相差一个小的舍入误差，因为中间值被舍入到有限精度。<sup>[5](https://technav.ieee.org/topic/floating-point-arithmetic/)</sup><sup> • </sup><sup>[10](https://indico.cern.ch/event/1422680/contributions/5983305/attachments/2900678/5086693/FlopTalkLecture.pdf)</sup>

其后果是，数值计算的结果可能依赖于运算的顺序和分组。累积的舍入误差在病态问题中可能变得显著，这促使人们设计旨在最小化误差增长的算法，例如卡汉补偿求和算法，以及使用更高精度的中间计算。融合乘加运算在计算 \( a \cdot b + c \) 时不进行中间舍入，从而减少了多项式求值和矩阵运算中的舍入误差。<sup>[5](https://technav.ieee.org/topic/floating-point-arithmetic/)</sup> 非结合性还影响高性能计算和深度学习中的可复现性，因为并行归约在不同运行或不同硬件上可能以不同顺序对值求和。<sup>[11](https://arxiv.org/abs/2408.05148)</sup> 这种取舍通常被认为是合理的，因为它允许浮点算术的快速硬件实现。<sup>[12](https://www.sci.utah.edu/~beiwang/teaching/cs6210-fall-2016/nonassociativity.pdf)</sup>

## 历史

结合律在十九世纪进入明确的数学意识，当时代数学家开始将运算定律本身作为研究对象。威廉·罗恩·哈密顿（William Rowan Hamilton）于1843年10月16日发现四元数，产生了第一个不遵循数的算术所有经典定律的代数：四元数乘法是结合的、分配的，但不是交换的。<sup>[13](https://old.maa.org/press/periodicals/convergence/algebraic-formalism-within-the-works-of-servois-and-its-influence-on-the-development-of-linear-4)</sup><sup> • </sup><sup>[7](https://link.springer.com/article/10.1007/s00407-026-00366-y)</sup> 哈密顿此前曾放弃与分配律不一致的构造，这表明他期望通常的定律——包括结合律和交换律——在可能的情况下得到保留；在四元数体系中，他证明了分配律和结合律得以保留而交换律不然，并主张保留下来的定律应因其在应用中的实用性而予以保留。<sup>[7](https://link.springer.com/article/10.1007/s00407-026-00366-y)</sup> 同时代的评论者 C. G. 诺特（C. G. Knott）写道，哈密顿是第一个清晰认识到结合律价值的人，且他的体系始终是唯一受结合律支配的三维向量分析体系。<sup>[14](https://mathshistory.st-andrews.ac.uk/Extras/Joly_books/)</sup>

在哈密顿之后，结合律成为新代数体系所采纳、修改或抛弃的定律之一。后来关于线性结合代数——即如今所谓超复数系的理论——的工作将结合性作为定义性特征，十九世纪晚期的发展通过从一个代数到另一个代数的类比推进，同时采纳其中一些相同的定律，如结合律、交换律和分配律。<sup>[15](https://mathshistory.st-andrews.ac.uk/Extras/Dickson_linear_algebras/)</sup><sup> • </sup><sup>[16](https://www.tandfonline.com/doi/abs/10.1080/14746700.2011.547014?role=tab&scroll=top&tab=permissions)</sup> 非结合体系也成为了独立的研究对象，尤其是李代数，其理论与结合代数理论并行发展。<sup>[17](https://math.hawaii.edu/~lee/algebra/history.html)</sup>

## 学习与误解

该性质是数学教育中的一个已知难点。一篇文献综述将结合律——其定义为允许某些运算以不同于其出现顺序的顺序执行的特性——描述为人们感到尤其困难的一条原理，并指出对其的研究仍然相对稀少——主要来自认知心理学，在那里它经常作为与其他算术原理对照的基准。<sup>[18](https://www.sciencedirect.com/science/article/pii/S2211949321000041)</sup>

课堂证据指向一种特定的混淆。一项基于课堂视频、针对大型城市学区小学数学课的观察研究发现，在教学过程中结合律常与交换律相混淆；其在许多计算任务中的作用即使在正式引入之后仍完全隐含；大多数课堂没有以具体表征的方式对该性质给出实质性论证。<sup>[8](https://www.tandfonline.com/doi/abs/10.1080/19477503.2018.1425592)</sup> 对学生错误的调查同样记录到“结合律就是交换律”这一信念，在一项研究中，28%的抽样学生报告了此信念。<sup>[19](https://ilkogretim-online.org/index.php/pub/article/download/4080/3966/7834)</sup>

发展研究还补充了按运算类型的分化。在加法版本上，甚至学龄前儿童都能利用加法与减法之间的结合关系来解决具体问题。对乘法版本的理解则较弱，并且在青春期乃至成年期一直较弱。<sup>[20](https://www.sciencedirect.com/science/article/abs/pii/S0022096516303174)</sup> 教育实践者呼吁加大对学生对包括结合律在内的算术原理的概念性知识的研究力度，因为这可能在从基础数学向更高级数学的过渡中发挥重要作用。<sup>[18](https://www.sciencedirect.com/science/article/pii/S2211949321000041)</sup>

## References

1. [Section 13.2: Associativity, MAT 112 materials, University of North Carolina at Greensboro](https://mathstats-materials.uncg.edu/mat112/web/secbinopassoc.html)
2. [Associativity, Encyclopedia of Mathematics](https://encyclopediaofmath.org/wiki/Associativity)
3. [Estruturas Algébricas e Polinômios, Álgebra Linear Avançada (UFABC)](https://danielmiranda.prof.ufabc.edu.br/livros/ala/capitulo-01-estruturas-algebricas-e-polinomios.html)
4. [Algebra of logic, Encyclopedia of Mathematics](https://encyclopediaofmath.org/wiki/Algebra_of_logic)
5. [Floating-point arithmetic, IEEE Technology Navigator](https://technav.ieee.org/topic/floating-point-arithmetic/)
6. [2.3: The Definition of a Group, Mathematics LibreTexts](https://math.libretexts.org/Bookshelves/Abstract_and_Geometric_Algebra/First-Semester_Abstract_Algebra%3A_A_Structural_Approach_%28Sklar%29/02%3A_Groups/2.03%3A_The_Definition_of_a_Group)
7. [Peacock's principle as a conservative strategy, Archive for History of Exact Sciences (Springer)](https://link.springer.com/article/10.1007/s00407-026-00366-y)
8. [Eli Barnett and Meixia Ding (2018). Teaching of the associative property: A natural classroom investigation. Investigations in Mathematics Learning 11(2), 148–166.](https://www.tandfonline.com/doi/abs/10.1080/19477503.2018.1425592)
9. [1.1: Binary operations, Mathematics LibreTexts](https://math.libretexts.org/Courses/Mount_Royal_University/Higher_Arithmetic/1%253A__Binary_operations/1.1%253A_Binary_operations)
10. [Floating point arithmetic is not associative, CERN Indico lecture](https://indico.cern.ch/event/1422680/contributions/5983305/attachments/2900678/5086693/FlopTalkLecture.pdf)
11. [Impacts of floating-point non-associativity on reproducibility for HPC and deep learning applications, arXiv:2408.05148](https://arxiv.org/abs/2408.05148)
12. [Effects of Floating-Point non-Associativity on Numerical Computations on Massively Multithreaded Systems, University of Utah](https://www.sci.utah.edu/~beiwang/teaching/cs6210-fall-2016/nonassociativity.pdf)
13. [Algebraic Formalism within the Works of Servois, Mathematical Association of America Convergence](https://old.maa.org/press/periodicals/convergence/algebraic-formalism-within-the-works-of-servois-and-its-influence-on-the-development-of-linear-4)
14. [Joly books, MacTutor History of Mathematics](https://mathshistory.st-andrews.ac.uk/Extras/Joly_books/)
15. [L. E. Dickson, Linear Algebras (preface), MacTutor History of Mathematics](https://mathshistory.st-andrews.ac.uk/Extras/Dickson_linear_algebras/)
16. [The Scope and Limitations of Algebras: Some Historical and Philosophical Considerations, Theology and Science 9(1)](https://www.tandfonline.com/doi/abs/10.1080/14746700.2011.547014?role=tab&scroll=top&tab=permissions)
17. [The Origins of Modern Algebra, University of Hawaii](https://math.hawaii.edu/~lee/algebra/history.html)
18. [Conceptual knowledge of the associativity principle: A review of the literature and an agenda for future research, ScienceDirect](https://www.sciencedirect.com/science/article/pii/S2211949321000041)
19. [Misconceptions study, İlköğretim Online](https://ilkogretim-online.org/index.php/pub/article/download/4080/3966/7834)
20. [Understanding arithmetic concepts: Does operation matter? ScienceDirect](https://www.sciencedirect.com/science/article/abs/pii/S0022096516303174)

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

Topic: 物质世界与数学 › 数学与统计学 › 数与代数 › Arithmetic and number systems › Elementary and formal arithmetic › Properties and laws of arithmetic

Copyright 2026 Edgepedia

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

Source: https://www.edgepedia.org/zh/associative-property

English original: https://www.edgepedia.org/associative-property
