HOME

TheInfoList



OR:

In
mathematics Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
, the associative property is a property of some
binary operation In mathematics, a binary operation or dyadic operation is a rule for combining two elements (called operands) to produce another element. More formally, a binary operation is an operation of arity two. More specifically, a binary operation ...
s that rearranging the parentheses in an expression will not change the result. In
propositional logic The propositional calculus is a branch of logic. It is also called propositional logic, statement logic, sentential calculus, sentential logic, or sometimes zeroth-order logic. Sometimes, it is called ''first-order'' propositional logic to contra ...
, 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
operand In mathematics, an operand is the object of a mathematical operation, i.e., it is the object or quantity that is operated on. Unknown operands in equalities of expressions can be found by equation solving. Example The following arithmetic expres ...
s 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: \begin (2 + 3) + 4 &= 2 + (3 + 4) = 9 \,\\ 2 \times (3 \times 4) &= (2 \times 3) \times 4 = 24 . \end 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 number In mathematics, a real number is a number that can be used to measure a continuous one- dimensional quantity such as a duration or temperature. Here, ''continuous'' means that pairs of values can have arbitrarily small differences. Every re ...
s, it can be said that "addition and multiplication of real numbers are associative operations". Associativity is not the same as
commutativity In mathematics, a binary operation is commutative if changing the order of the operands does not change the result. It is a fundamental property of many binary operations, and many mathematical proofs depend on it. Perhaps most familiar as a p ...
, 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 \times b = b \times a, but many important operations such as
function composition In mathematics, the composition operator \circ takes two function (mathematics), functions, f and g, and returns a new function h(x) := (g \circ f) (x) = g(f(x)). Thus, the function is function application, applied after applying to . (g \c ...
,
matrix multiplication In mathematics, specifically in linear algebra, matrix multiplication is a binary operation that produces a matrix (mathematics), matrix from two matrices. For matrix multiplication, the number of columns in the first matrix must be equal to the n ...
and the projection (x,y) \mapsto x are not commutative even though they are associative. However, associative operators defined on an interval of the (real) number line are commutative if they are continuous and injective in both arguments. A basic consequence is that every continuous, strictly rising, associative function (or operator) is commutative. Associative operations are abundant in mathematics; in fact, many
algebraic structure In mathematics, an algebraic structure or algebraic system consists of a nonempty set ''A'' (called the underlying set, carrier set or domain), a collection of operations on ''A'' (typically binary operations such as addition and multiplicatio ...
s (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 Subtraction (which is signified by the minus sign, –) is one of the four Arithmetic#Arithmetic operations, arithmetic operations along with addition, multiplication and Division (mathematics), division. Subtraction is an operation that repre ...
,
exponentiation In mathematics, exponentiation, denoted , is an operation (mathematics), operation involving two numbers: the ''base'', , and the ''exponent'' or ''power'', . When is a positive integer, exponentiation corresponds to repeated multiplication ...
, and the
vector cross product In mathematics, the cross product or vector product (occasionally directed area product, to emphasize its geometric significance) is a binary operation on two vectors in a three-dimensional oriented Euclidean vector space (named here E), and ...
. 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.


Definition

Formally, a
binary operation In mathematics, a binary operation or dyadic operation is a rule for combining two elements (called operands) to produce another element. More formally, a binary operation is an operation of arity two. More specifically, a binary operation ...
\ast on a
set Set, The Set, SET or SETS may refer to: Science, technology, and mathematics Mathematics *Set (mathematics), a collection of elements *Category of sets, the category whose objects and morphisms are sets and total functions, respectively Electro ...
is called associative if it satisfies the associative law: :(x \ast y) \ast z = x \ast (y \ast z), for all x,y,z in . Here, ∗ is used to replace the symbol of the operation, which may be any symbol, and even the absence of symbol (
juxtaposition Juxtaposition is an act or instance of placing two opposing elements close together or side by side. This is often done in order to Comparison, compare/contrast the two, to show similarities or differences, etc. Speech Juxtaposition in literary ...
) as for
multiplication Multiplication is one of the four elementary mathematical operations of arithmetic, with the other ones being addition, subtraction, and division (mathematics), division. The result of a multiplication operation is called a ''Product (mathem ...
. :(xy)z = x(yz), for all x,y,z in . The associative law can also be expressed in functional notation thus: (f \circ (g \circ h))(x) = ((f \circ g) \circ h)(x)


Generalized associative law

If a binary operation is associative, repeated application of the operation produces the same result regardless of how valid pairs of parentheses are inserted in the expression. This is called the generalized associative law. The number of possible bracketings is just the
Catalan number The Catalan numbers are a sequence of natural numbers that occur in various Enumeration, counting problems, often involving recursion, recursively defined objects. They are named after Eugène Charles Catalan, Eugène Catalan, though they were p ...
, C_n , for ''n'' operations on ''n+1'' values. For instance, a product of 3 operations on 4 elements may be written (ignoring permutations of the arguments), in C_3 = 5 possible ways: *((ab)c)d *(a(bc))d *a((bc)d) *(a(b(cd)) *(ab)(cd) If the product operation is associative, the generalized associative law says that all these expressions will yield the same result. So unless the expression with omitted parentheses already has a different meaning (see below), the parentheses can be considered unnecessary and "the" product can be written unambiguously as :abcd As the number of elements increases, the number of possible ways to insert parentheses grows quickly, but they remain unnecessary for disambiguation. An example where this does not work is the
logical biconditional In logic and mathematics, the logical biconditional, also known as material biconditional or equivalence or bidirectional implication or biimplication or bientailment, is the logical connective used to conjoin two statements P and Q to form th ...
. It is associative; thus, is equivalent to , but most commonly means , which is not equivalent.


Examples

Some examples of associative operations include the following. \mboxx,y,z\in\mathbb. , 6= Taking the
intersection In mathematics, the intersection of two or more objects is another object consisting of everything that is contained in all of the objects simultaneously. For example, in Euclidean geometry, when two lines in a plane are not parallel, their ...
or the union of sets: \left. \begin (A\cap B)\cap C=A\cap(B\cap C)=A\cap B\cap C\quad \\ (A\cup B)\cup C=A\cup(B\cup C)=A\cup B\cup C\quad \end \right\}\mboxA,B,C. , 7= If is some set and denotes the set of all functions from to , then the operation of
function composition In mathematics, the composition operator \circ takes two function (mathematics), functions, f and g, and returns a new function h(x) := (g \circ f) (x) = g(f(x)). Thus, the function is function application, applied after applying to . (g \c ...
on is associative:(f\circ g)\circ h=f\circ(g\circ h)=f\circ g\circ h\qquad\mboxf,g,h\in S. , 8= Slightly more generally, given four sets , , and , with , , and , 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. , 9= In
category theory Category theory is a general theory of mathematical structures and their relations. It was introduced by Samuel Eilenberg and Saunders Mac Lane in the middle of the 20th century in their foundational work on algebraic topology. Category theory ...
, composition of morphisms is associative by definition. Associativity of functors and natural transformations follows from associativity of morphisms. , 10= Consider a set with three elements, , , and . The following operation: is associative. Thus, for example, . This operation is not commutative. , 11= Because matrices represent
linear function In mathematics, the term linear function refers to two distinct but related notions: * In calculus and related areas, a linear function is a function whose graph is a straight line, that is, a polynomial function of degree zero or one. For di ...
s, and
matrix multiplication In mathematics, specifically in linear algebra, matrix multiplication is a binary operation that produces a matrix (mathematics), matrix from two matrices. For matrix multiplication, the number of columns in the first matrix must be equal to the n ...
represents function composition, one can immediately conclude that matrix multiplication is associative. , 12= For
real number In mathematics, a real number is a number that can be used to measure a continuous one- dimensional quantity such as a duration or temperature. Here, ''continuous'' means that pairs of values can have arbitrarily small differences. Every re ...
s (and for any
totally ordered set In mathematics, a total order or linear order is a partial order in which any two elements are comparable. That is, a total order is a binary relation \leq on some set X, which satisfies the following for all a, b and c in X: # a \leq a ( ref ...
), the minimum and maximum operation is associative: \max(a, \max(b, c)) = \max(\max(a, b), c) \quad \text \quad \min(a, \min(b, c)) = \min(\min(a, b), c).


Propositional logic


Rule of replacement

In standard truth-functional propositional logic, ''association'', or ''associativity'' are two valid rules of replacement. The rules allow one to move parentheses in logical expressions in logical proofs. The rules (using logical connectives notation) are: (P \lor (Q \lor R)) \Leftrightarrow ((P \lor Q) \lor R) and (P \land (Q \land R)) \Leftrightarrow ((P \land Q) \land R), where "\Leftrightarrow" is a metalogical
symbol A symbol is a mark, Sign (semiotics), sign, or word that indicates, signifies, or is understood as representing an idea, physical object, object, or wikt:relationship, relationship. Symbols allow people to go beyond what is known or seen by cr ...
representing "can be replaced in a proof with".


Truth functional connectives

''Associativity'' is a property of some
logical connective In logic, a logical connective (also called a logical operator, sentential connective, or sentential operator) is a logical constant. Connectives can be used to connect logical formulas. For instance in the syntax of propositional logic, the ...
s of truth-functional
propositional logic The propositional calculus is a branch of logic. It is also called propositional logic, statement logic, sentential calculus, sentential logic, or sometimes zeroth-order logic. Sometimes, it is called ''first-order'' propositional logic to contra ...
. The following
logical equivalence In logic and mathematics, statements p and q are said to be logically equivalent if they have the same truth value in every model. The logical equivalence of p and q is sometimes expressed as p \equiv q, p :: q, \textsfpq, or p \iff q, depending ...
s demonstrate that associativity is a property of particular connectives. The following (and their converses, since is commutative) are truth-functional tautologies. ;Associativity of disjunction :((P \lor Q) \lor R) \leftrightarrow (P \lor (Q \lor R)) ;Associativity of conjunction :((P \land Q) \land R) \leftrightarrow (P \land (Q \land R)) ;Associativity of equivalence :((P \leftrightarrow Q) \leftrightarrow R) \leftrightarrow (P \leftrightarrow (Q \leftrightarrow R)) Joint denial is an example of a truth functional connective that is ''not'' associative.


Non-associative operation

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. For such an operation the order of evaluation ''does'' matter. For example: ;
Subtraction Subtraction (which is signified by the minus sign, –) is one of the four Arithmetic#Arithmetic operations, arithmetic operations along with addition, multiplication and Division (mathematics), division. Subtraction is an operation that repre ...
: (5-3)-2 \, \ne \, 5-(3-2) ; Division : (4/2)/2 \, \ne \, 4/(2/2) ;
Exponentiation In mathematics, exponentiation, denoted , is an operation (mathematics), operation involving two numbers: the ''base'', , and the ''exponent'' or ''power'', . When is a positive integer, exponentiation corresponds to repeated multiplication ...
: 2^ \, \ne \, (2^1)^2 ;
Vector cross product In mathematics, the cross product or vector product (occasionally directed area product, to emphasize its geometric significance) is a binary operation on two vectors in a three-dimensional oriented Euclidean vector space (named here E), and ...
:\begin \mathbf \times (\mathbf \times \mathbf) &= \mathbf \times \mathbf = -\mathbf \\ (\mathbf \times \mathbf) \times \mathbf &= \mathbf \times \mathbf = \mathbf \end Also although addition is associative for finite sums, it is not associative inside infinite sums ( series). For example, (1+-1)+(1+-1)+(1+-1)+(1+-1)+(1+-1)+(1+-1)+\dots = 0 whereas 1+(-1+1)+(-1+1)+(-1+1)+(-1+1)+(-1+1)+(-1+1)+\dots = 1. Some non-associative operations are fundamental in mathematics. They appear often as the multiplication in structures called
non-associative algebra A non-associative algebra (or distributive algebra) is an algebra over a field where the binary operation, binary multiplication operation is not assumed to be associative operation, associative. That is, an algebraic structure ''A'' is a non-ass ...
s, which have also an addition and a
scalar multiplication In mathematics, scalar multiplication is one of the basic operations defining a vector space in linear algebra (or more generally, a module in abstract algebra). In common geometrical contexts, scalar multiplication of a real Euclidean vector ...
. Examples are the octonions and
Lie algebra In mathematics, a Lie algebra (pronounced ) is a vector space \mathfrak g together with an operation called the Lie bracket, an alternating bilinear map \mathfrak g \times \mathfrak g \rightarrow \mathfrak g, that satisfies the Jacobi ident ...
s. In Lie algebras, the multiplication satisfies Jacobi identity instead of the associative law; this allows abstracting the algebraic nature of
infinitesimal transformation In mathematics, an infinitesimal transformation is a limiting form of ''small'' transformation. For example one may talk about an infinitesimal rotation of a rigid body, in three-dimensional space. This is conventionally represented by a 3×3 ...
s. Other examples are
quasigroup In mathematics, especially in abstract algebra, a quasigroup is an algebraic structure that resembles a group in the sense that " division" is always possible. Quasigroups differ from groups mainly in that the associative and identity element pro ...
, quasifield,
non-associative ring A non-associative algebra (or distributive algebra) is an algebra over a field where the binary multiplication operation is not assumed to be associative. That is, an algebraic structure ''A'' is a non-associative algebra over a field ''K'' if ...
, and commutative non-associative magmas.


Nonassociativity of floating point calculation

In mathematics, addition and multiplication of real numbers are associative. By contrast, in computer science, addition and multiplication of floating point numbers are ''not'' associative, as different rounding errors may be introduced when dissimilar-sized values are joined in a different order. To illustrate this, consider a floating point representation with a 4-bit significand: Even though most computers compute with 24 or 53 bits of significand, this is still an important source of rounding error, and approaches such as the Kahan summation algorithm are ways to minimise the errors. It can be especially problematic in parallel computing.


Notation for non-associative operations

In general, parentheses must be used to indicate the order of evaluation if a non-associative operation appears more than once in an expression (unless the notation specifies the order in another way, like \dfrac). However,
mathematician A mathematician is someone who uses an extensive knowledge of mathematics in their work, typically to solve mathematical problems. Mathematicians are concerned with numbers, data, quantity, mathematical structure, structure, space, Mathematica ...
s agree on a particular order of evaluation for several common non-associative operations. This is simply a notational convention to avoid parentheses. A left-associative operation is a non-associative operation that is conventionally evaluated from left to right, i.e., \left. \begin a*b*c=(a*b)*c \\ a*b*c*d=((a*b)*c)*d \\ a*b*c*d*e=(((a*b)*c)*d)*e\quad \\ \mbox \end \right\} \mboxa,b,c,d,e\in S while a right-associative operation is conventionally evaluated from right to left: \left. \begin x*y*z=x*(y*z) \\ w*x*y*z=w*(x*(y*z))\quad \\ v*w*x*y*z=v*(w*(x*(y*z)))\quad\\ \mbox \end \right\} \mboxz,y,x,w,v\in S Both left-associative and right-associative operations occur. Left-associative operations include the following: ; Subtraction and division of real numbers"Using Order of Operations and Exploring Properties"
, section 9. Virginia Department of Education.Bronstein, '' :de:Taschenbuch der Mathematik'', pages 115-120, chapter: 2.4.1.1, :x-y-z=(x-y)-z :x/y/z=(x/y)/z ; Function application :(f \, x \, y) = ((f \, x) \, y) This notation can be motivated by the
currying In mathematics and computer science, currying is the technique of translating a function that takes multiple arguments into a sequence of families of functions, each taking a single argument. In the prototypical example, one begins with a functi ...
isomorphism, which enables partial application. Right-associative operations include the following: ;
Exponentiation In mathematics, exponentiation, denoted , is an operation (mathematics), operation involving two numbers: the ''base'', , and the ''exponent'' or ''power'', . When is a positive integer, exponentiation corresponds to repeated multiplication ...
of real numbers in superscript notation :x^=x^

Exponentiation is commonly used with brackets or right-associatively because a repeated left-associative exponentiation operation is of little use. Repeated powers would mostly be rewritten with multiplication:

:(x^y)^z=x^

Formatted correctly, the superscript inherently behaves as a set of parentheses; e.g. in the expression 2^ the addition is performed before the exponentiation despite there being no explicit parentheses 2^ wrapped around it. Thus given an expression such as x^, the full exponent y^z of the base x is evaluated first. However, in some contexts, especially in handwriting, the difference between ^z=(x^y)^z, x^=x^ and x^=x^ can be hard to see. In such a case, right-associativity is usually implied.

; Function definition :\mathbb \rarr \mathbb \rarr \mathbb = \mathbb \rarr (\mathbb \rarr \mathbb) :x \mapsto y \mapsto x - y = x \mapsto (y \mapsto x - y)

Using right-associative notation for these operations can be motivated by the

Curry–Howard correspondence In programming language theory and proof theory, the Curry–Howard correspondence is the direct relationship between computer programs and mathematical proofs. It is also known as the Curry–Howard isomorphism or equivalence, or the proofs-as-p ...
and by the
currying In mathematics and computer science, currying is the technique of translating a function that takes multiple arguments into a sequence of families of functions, each taking a single argument. In the prototypical example, one begins with a functi ...
isomorphism.

Non-associative operations for which no conventional evaluation order is defined include the following. ; Exponentiation of real numbers in infix notationExponentiation Associativity and Standard Math Notation
Codeplea. 23 August 2016. Retrieved 20 September 2016.
:(x^\wedge y)^\wedge z\ne x^\wedge(y^\wedge z) ; Knuth's up-arrow operators : a \uparrow \uparrow (b \uparrow \uparrow c) \ne (a \uparrow \uparrow b) \uparrow \uparrow c : a \uparrow \uparrow \uparrow (b \uparrow \uparrow \uparrow c) \ne (a \uparrow \uparrow \uparrow b) \uparrow \uparrow \uparrow c ; Taking the
cross product In mathematics, the cross product or vector product (occasionally directed area product, to emphasize its geometric significance) is a binary operation on two vectors in a three-dimensional oriented Euclidean vector space (named here E), and ...
of three vectors :\vec a \times (\vec b \times \vec c) \neq (\vec a \times \vec b ) \times \vec c \qquad \mbox \vec a,\vec b,\vec c \in \mathbb^3 ; Taking the pairwise
average In colloquial, ordinary language, an average is a single number or value that best represents a set of data. The type of average taken as most typically representative of a list of numbers is the arithmetic mean the sum of the numbers divided by ...
of real numbers :\ne \qquad \mboxx,y,z\in\mathbb \mboxx\ne z. ; Taking the
relative complement In set theory, the complement of a set , often denoted by A^c (or ), is the set of elements not in . When all elements in the universe, i.e. all elements under consideration, are considered to be members of a given set , the absolute complement ...
of sets :(A\backslash B)\backslash C \neq A\backslash (B\backslash C).

(Compare material nonimplication in logic.)


History

William Rowan Hamilton Sir William Rowan Hamilton (4 August 1805 – 2 September 1865) was an Irish astronomer, mathematician, and physicist who made numerous major contributions to abstract algebra, classical mechanics, and optics. His theoretical works and mathema ...
seems to have coined the term "associative property" around 1844, a time when he was contemplating the non-associative algebra of the octonions he had learned about from John T. Graves.


See also

* Light's associativity test * Telescoping series, the use of addition associativity for cancelling terms in an infinite series * A
semigroup In mathematics, a semigroup is an algebraic structure consisting of a set together with an associative internal binary operation on it. The binary operation of a semigroup is most often denoted multiplicatively (just notation, not necessarily th ...
is a set with an associative binary operation. *
Commutativity In mathematics, a binary operation is commutative if changing the order of the operands does not change the result. It is a fundamental property of many binary operations, and many mathematical proofs depend on it. Perhaps most familiar as a p ...
and
distributivity In mathematics, the distributive property of binary operations is a generalization of the distributive law, which asserts that the equality x \cdot (y + z) = x \cdot y + x \cdot z is always true in elementary algebra. For example, in elementary ...
are two other frequently discussed properties of binary operations. * Power associativity, alternativity,
flexibility Stiffness is the extent to which an object resists deformation in response to an applied force. The complementary concept is flexibility or pliability: the more flexible an object is, the less stiff it is. Calculations The stiffness, k, of a ...
and N-ary associativity are weak forms of associativity. * Moufang identities also provide a weak form of associativity.


References

{{reflist Properties of binary operations Elementary algebra Functional analysis Rules of inference