Associative property

本文介绍了数学中结合律的概念及其在不同运算中的应用。结合律表明,在进行多次相同结合操作时,无论怎样组合括号,只要操作数的顺序不变,运算结果就不会改变。文章通过加法和乘法的例子说明了这一点,并探讨了结合律与交换律的区别。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

In mathematics, the associative property[1] is a property of some binary operations, which means that rearranging the parentheses in an expression will not change the result. In propositional logic, associativity is a valid rule of replacement for expressions in logical proofs.

Within an expression containing two or more occurrences in a row of the same associative operator, the order in which the operations are performed does not matter as long as the sequence of the operands is not changed. That is (after rewriting the expression with parentheses and in infix notation if necessary), rearranging the parentheses in such an expression will not change its value. Consider the following equations:

{\displaystyle {\begin{aligned}(2+3)+4&=2+(3+4)=9,\2\times (3\times 4)&=(2\times 3)\times 4=24.\end{aligned}}}{\displaystyle {\begin{aligned}(2+3)+4&=2+(3+4)=9,\2\times (3\times 4)&=(2\times 3)\times 4=24.\end{aligned}}}
Even though the parentheses were rearranged on each line, the values of the expressions were not altered. Since this holds true when performing addition and multiplication on any real numbers, it can be said that “addition and multiplication of real numbers are associative operations”.

Associativity is not the same as commutativity, which addresses whether the order of two operands affects the result. For example, the order does not matter in the multiplication of real numbers, that is, a × b = b × a, so we say that the multiplication of real numbers is a commutative operation. However, operations such as function composition and matrix multiplication are associative, but (generally) not commutative.

Associative operations are abundant in mathematics; in fact, many algebraic structures (such as semigroups and categories) explicitly require their binary operations to be associative.

However, many important and interesting operations are non-associative; some examples include subtraction, exponentiation, and the vector cross product. In contrast to the theoretical properties of real numbers, the addition of floating point numbers in computer science is not associative, and the choice of how to associate an expression can have a significant effect on rounding error.

在这里插入图片描述

Contents
1 Definition
2 Generalized associative law
3 Examples
4 Propositional logic
4.1 Rule of replacement
4.2 Truth functional connectives
5 Non-associative operation
5.1 Nonassociativity of floating point calculation
5.2 Notation for non-associative operations
6 History
7 See also

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值