Associativity
Encyclopedia : A : AS : ASS : Associativity
- This article is about associativity in mathematics. For associativity in central processor unit memory cache architecture see CPU cache.
- (5+2)+1 = 5+(2+1)
Associative operations are abundant in mathematics, and in fact most algebraic structures explicitly require their binary operations to be associative. However, many important and interesting operations are non-associative; one common example would be the vector cross product.
Definition
Formally, a binary operation [*\!\!\!] on a set S is called associative if it satisfies the associative law:
- [(x*y)*z=x*(y*z)\qquad\mboxx,y,z\in S.]
- [x*y*z.\,]
Examples
Some examples of associative operations include the following.
- In arithmetic, addition and multiplication of real numbers are associative; i.e.,
- :[ \left. \begin (x+y)+z=x+(y+z)=x+y+z\quad \\ (x\,y)z=x(y\,z)=x\,y\,z\qquad\qquad\qquad\quad\ \ \, \end \right\} \mboxx,y,z\in\mathbb. ]
- Addition and multiplication of complex numbers and quaternions is associative. Addition of octonions is also associative, but multiplication of octonions is non-associative.
- The greatest common divisor and least common multiple functions act associatively.
- Matrix multiplication is associative. Because linear transformations can be represented by matrices, one can immediately conclude that linear transformations compose associatively.
- Taking the intersection or the union of sets:
- If M is some set and S denotes the set of all functions from M to M, then the operation of functional composition on S is associative:
- Slightly more generally, given four sets M, N, P and Q, with h: M to N, g: N to P, and f: P to Q, then
- :[(f\circ g)\circ h=f\circ(g\circ h)=f\circ g\circ h]
- as before. In short, composition of maps is always associative.
Non-associativity
A binary operation [*] on a set S that does not satisfy the associative law is called non-associative. Symbolically,
- [(x*y)*z\ne x*(y*z)\qquad\mboxx,y,z\in S.]
- [ \begin (5-3)-2\ne 5-(3-2)\quad \\ (4/2)/2\ne 4/(2/2)\qquad\qquad \\ 2^\ne (2^1)^2.\quad\qquad\qquad \end]
A left-associative operation is a non-associative operation that is conventionally evaluated from left to right, i.e.,
- [ \left. \begin x*y*z=(x*y)*z\qquad\qquad\quad\, \\ w*x*y*z=((w*x)*y)*z\quad \\ \mbox\qquad\qquad\qquad\qquad\qquad\qquad\ \ \, \end \right\} \mboxw,x,y,z\in S ]
- [ \left. \begin x*y*z=x*(y*z)\qquad\qquad\quad\, \\ w*x*y*z=w*(x*(y*z))\quad \\ \mbox\qquad\qquad\qquad\qquad\qquad\qquad\ \ \, \end \right\} \mboxw,x,y,z\in S ]
More examples
Left-associative operations include the following.
- Subtraction and division of real numbers:
- :[x-y-z=(x-y)-z\qquad\mboxx,y,z\in\mathbb;]
- :[x/y/z=(x/y)/z\qquad\qquad\quad\mboxx,y,z\in\mathbb\mboxy\ne0,z\ne0.]
- Exponentiation of real numbers:
- :[x^=x^.\,]
- The reason exponentiation is right-associative is that a repeated left-associative exponentiation operation would be less useful. Multiple appearances could (and would) be rewritten with multiplication:
- :[(x^y)^z=x^.\,]
- Taking the pairwise average of real numbers:
- :[\ne\ne\qquad\mboxx,y,z\in\mathbb.]
See also
- A semigroup is a set with an associative binary operation.
- Commutativity and distributivity are two other frequently discussed properties of binary operations.
- Power associativity and alternativity are weak forms of associativity.
From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.

