The associative property of addition states that for any and , . Similarly, the associative property of multiplication states that .
The associative property essentially means that the order in which we perform several additions (or multiplications) does not matter, which allows us to more simply write the above expressions as and without any potential for ambiguity. This is not the case for operations like division, where could mean or if we didn't specify further.
In comparison to commutativity, associativity is a relatively common property for operations. Nonetheless, it is still not immediately evident; many operations (both in real life and in mathematics) are not associative.
For instance, these operations are both associative:
- Mixing paint together (If we mix red and blue paint, then later add yellow paint, the result is the same as if we mixed blue and yellow paint then later added red paint)
- Addition (and multiplication)
But these two operations are not associative:
- The winner of rock-paper-scissors (If Rock plays Scissors and the winner plays Paper, the overall winner is different than if Scissors plays Paper and the winner plays Rock)
- Subtraction (and division)
Notably, while there are many common examples of associative operations that are not commutative (e.g. matrix multiplication, function composition, concatenation, etc.), there are relatively few operations that are commutative but not associative. One example is the average function: of course, and are usually different! It is thus important to distinguish between the associative and commutative properties; while they commonly appear hand-in-hand, they are very different properties and it is certainly possible to have one without the other.