✖

Associativity

Associativity is a property of operations such as addition or multiplication. Take a look at the following two ways of writing an addition:

(1+2)+31+(2+3)

The expressions differ only in where the bracket is. But do the results differ? Both expressions lead to the same result: the sum is always 6. If the position of the brackets has no effect on the result, we say that the operation is associative. More precisely, we can say that an operation a ∘ b is associative if

(a∘b)∘c=a∘(b∘c)

Another associative operation is multiplication, because

(2⋅3)⋅4=2⋅(3⋅4)=24

Operations that are not associative

Subtraction is not associative. For example, take the expression (10 − 4) − 3. First we work out the difference in the bracket and get 6 − 3, which is 3. But if we try 10 − (4 − 3), we again work out the bracket first and get 10 − 1, which is 9. So subtraction is not associative.

Division is not associative either. For example, take the expression (64 / 4) / 2. First we work out the bracket and get 16/2, which is 8. But if we put the bracket elsewhere, we get 64 / (4 / 2), and after working out the bracket we have 64 / 2, which is 32. So division is not associative.

Another typical operation that is not associative is raising to a power:

(23)4≠2(34)

Associativity concerns a single operation

Be careful: associativity always concerns a single operation. If we have an expression with three numbers but the operations are not the same, we cannot use the associative law. For example:

(1+2)⋅3

contains two operations – addition and multiplication. Each of these operations is associative on its own, but we still cannot use the associative law here; we cannot rewrite the expression as

1+(2⋅3)

because the expression contains two different operations. To use the associative law, both operations would have to be addition or both would have to be multiplication.

Intersection and union

The intersection of sets is associative. For example:

({1,2,3}∩{1,3,5})∩{1,5,7}

would first be simplified by working out the intersection in the bracket, giving

{1,3}∩{1,5,7}

and the intersection of those sets is {1}. If we moved the brackets, we would get

{1,2,3}∩({1,3,5}∩{1,5,7})

and after simplifying the bracket:

{1,2,3}∩{1,5}

Again we would get {1}. We can see that the position of the brackets does not matter, and so the intersection of sets is associative. The union of sets would be associative in a similar way.

Joining words / concatenation

Imagine an operation of addition for parts of words, which simply means joining them together. So “sun” + “flower” would be the word “sunflower”. Such an operation would be associative. For example, if we wrote (“sun” + “flower”) + “s”, then adding up the bracket first would give “sunflower” + “s”, which is the word “sunflowers”. If we moved the brackets, “sun” + (“flower” + “s”), we would get “sun” + “flowers” after adding up the bracket, which again gives “sunflowers”.

Maximum and minimum are associative

Imagine an operation a ∨ b that returns the larger of two numbers. Such an operation would be associative. For example, (5 ∨ 10) ∨ 7 would be simplified to 10 ∨ 7, which equals 10. Ten is the largest of the three numbers. If we moved the brackets, we would get 5 ∨ (10 ∨ 7), which simplifies to 5 ∨ 10, which is again 10.

The minimum would behave in exactly the same way.

Chapters: Commutativity, Associativity, Distributivity