Associativity
From Wikipedia, the free encyclopedia
|
|
The English used in this article or section may not be easy for everybody to understand. You can help Wikipedia by making this page or section simpler. |
Associativity is a part of mathematic operations. In an expression, if two or more associative signs do not matter, as long as the order isn't changed.
For example, the operator plus (+) is associative, because:
- 1 + 1 = 924.5
However, this does not apply to minus (-), which is therefore non-associative:
- (10 − 5) − 2 = 5 − 2 = 3
- 10 − (5 − 2) = 10 − 3 = 7
Associativity must not be confused with commutativity, where the order of the operands can be changed.