In mathematics, a binary operation * on a set S is called associative if for all x, y and z in S, (x * y) * z = x * (y * z).
The most commonly known examples of associativity are addition and multiplication of natural numbers; for example:
- (7 + 3) + 9 = 7 + (3 + 9), since the expression on the left evaluates to 10 + 9 = 19, which the expression on the right evaluates to 7 + 12 = 19, the same value;
- (10 × 5) × 3 = 10 × (5 × 3), since the expression on the left evaluates to 50 × 3 = 150, while the expression on the right evalutes to 10 × 15 = 150.
On the other hand, exponentiation is not associative; eg 2^(1^3)=2 but (2^1)^3=8. But the usual superscript notation tends to prevent questions of order arising.
A set with an associative binary operation on it is called a semigroup; monoids and groupss are examples of semigroups.
See also Commutativity, Distributive property, Identity element\n