Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been trying to find ways to explain to people why associativity is important. Subtraction is a good example of something that isn't associative, but it is not commutative.

So the best I could come up with is paper-rock-scissors; the operation takes two inputs and puts out the winner (assuming they are different).

So (paper rock) scissors= paper scissors = scissors,

But paper (rock scissors)= paper rock = paper.

This is a good example because it shows that associativity matters even outside of math.

What other real-life examples are there of commutative but non-associative operations? Preferably those with as little necessary math background as possible.

share|cite|improve this question
Your question is distinct, but these two questions are closely related:… and…. – Eric Thoma Dec 15 '13 at 20:49
The most "real-life" (or otherwise simplest) examples from the linked questions seem to be the operations: sending $(A,B)$ to the midpoint of $A$ and $B$, and $(x,y) \mapsto xy +1$ on the integers. – Eric Thoma Dec 15 '13 at 20:52
Mixing chemicals in chemistry is not necessarily associative when considering physical factors: i.e. suspensions/colloids. I do not know of an example where chemically mixing is not associative. The midpoint operation can be visualized with strings, where $(A,B)$ means you cut (or otherwise mark) at the midpoint of $A$ and $B$. – Eric Thoma Dec 15 '13 at 20:59
What's this "real-life" thing? – Karl Kronenfeld Dec 16 '13 at 10:22
See this answer; is "nor" not a real life example? – bof Jan 23 at 6:44

Let $\circ$ be the "function" of $a$ and $b$ having a child. Then $$(a\circ b)\circ c \neq a\circ(b\circ c)$$ assuming asexual reproduction...

share|cite|improve this answer
I am not sure whether a +1 is in order for a good answer, or a -1 for suggestions of incest. Very good example for why associativity is important. – Eric Thoma Dec 15 '13 at 21:01
@Eric thanks, but it only works fine for asexual reproduction... – draks ... Dec 15 '13 at 21:21
I was interpreting as $\circ$ takes two people and outputs their child. Then $(a\circ b)\circ c$ is the child made by (the child of $a$ and $b$) and $c$. And $a\circ(b\circ c)$ is the child of $a$ and (the child of $b$ and $c$). Taking $a$, $b$, and $c$ as the top nodes, you may draw the family tree, and see that in terms of DNA, the operation is not associative. I suppose it is not incest actually though, but does suggest a wide age gap between couples. – Eric Thoma Dec 16 '13 at 1:25
Since $x\circ y$ is not defined for $x$ and $y$ both male or both female, $\circ$ is clearly a halfoperation over the set of human beings. – MattAllegro Jul 31 '15 at 23:34

Mixing (same amount of ) primary colors:

(red + blue ) + blue = purple + blue = blue purple,

red + ( blue + blue ) = red + blue = purple.

share|cite|improve this answer
Do you mean light or paint? – draks ... Dec 15 '13 at 21:26
I was thinking about paint on a canvas – Avitus Dec 15 '13 at 21:27
For certain inputs that is associative. (cyan+magenta)+yellow=black=cyan+(magenta+yellow). – Boluc Papuccuoglu Dec 15 '13 at 23:41
And also, if you took two grams of blue paint and one gram of red paint, the end result would be the same shade no matter the order you mixed them in. – Boluc Papuccuoglu Dec 15 '13 at 23:42
@Boluc Papuccuoglu yes and shouldn't it be the answer mixing equal amounts of primary colors? – MattAllegro Feb 7 '15 at 11:40

What about commas?

Brian Rushton finds inspiration in cooking, his family and his dog.


Brian Rushton finds inspiration in cooking his family and his dog.

Shows pretty well how associativity makes a difference.

share|cite|improve this answer
I've rolled this answer back to its previous state, I'm 99% sure the previous edit was not at all appropriate -- perhaps as a comment, but certainly not as a revised answer. – pjs36 Feb 29 at 20:25
@pjs36, thank you. I also think that it wasn't appropriate. For reference, the comment was "Shouldn't we care about the fact that the word 'cooking' has two different meanings (noun vs verb or object vs process) in the two sentences?" – zneak Feb 29 at 21:10
Sure! Yes, it took me a while to piece it together, but something seemed off. It was a pretty good comment, just not a good revision! – pjs36 Feb 29 at 21:30

The averaging operation, defined by $$a\oplus b= \frac{a+b}2$$ is commutative but not associative.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.