70
$\begingroup$

There are lots of operations that are not commutative.

I'm looking for striking counter-examples of operations that are not associative.

Or may associativity be genuinely built-in the concept of an operation? May non-associative operations be of genuinely lesser importance?

Which role do algebraic structures with non-associative operations play?

There's a big gap between commutative and non-commuative algebraic structures (e.g. Abelian vs. non-Abelian groups or categories). Both kinds of algebraic structures are of equal importance. Does the same hold for assosiative vs. non-associative algebraic structures?

$\endgroup$
14
  • 15
    $\begingroup$ Lie algebras${}$? $\endgroup$ Commented Aug 23, 2018 at 17:08
  • 15
    $\begingroup$ Multiplication in the octonions? $\endgroup$
    – Mark S.
    Commented Aug 23, 2018 at 17:11
  • 23
    $\begingroup$ cross product in vector calculus $\endgroup$
    – trying
    Commented Aug 23, 2018 at 17:11
  • 55
    $\begingroup$ At a pre-school algebra level, the operation of exponentiation is not associative --- $2^{(3^2)} = 2^9 = 512$ and $(2^3)^2 = 8^2 = 64.$ That is, 2^(3^2) differs from (2^3)^2. $\endgroup$ Commented Aug 23, 2018 at 17:33
  • 79
    $\begingroup$ "At a pre-school algebra level" --- Looking at this the next day, I notice that the most natural reading of this has "pre" modifying "school", that is "(pre-school) algebra", rather having "pre" modifying "school algebra", that is "pre-(school algebra)", where the latter is of course what I intended. Incidentally, this distinction gives an example of verbal non-associativity. $\endgroup$ Commented Aug 24, 2018 at 12:16

28 Answers 28

127
$\begingroup$

Subtraction:

$$ (1-2)-3 = -4 $$ $$ 1-(2-3) = 2 $$

$\endgroup$
10
  • 9
    $\begingroup$ +1, however this gets a little sketchy once you consider various possible definitions of subtraction and how it should be treated as an operation $\endgroup$ Commented Aug 23, 2018 at 22:21
  • 10
    $\begingroup$ Also, this no longer holds if you consider subtraction as the adding of negative numbers, (so $1-2-3=1+(-2)+(-3)$). $\endgroup$ Commented Aug 24, 2018 at 9:29
  • 32
    $\begingroup$ No matter how one defines subtraction (but assuming its usual relation to addition, which is associative), it is not associative (unless $x=0-x$ holds for all $x$, in which case subtraction is the same as addition), since it obeys the laws $(x-y)-z=x+(0-y)+(0-z)$ and $x-(y-z)=x+(0-y)+z$, and after some cancellation the two are equal iff $0-z=z$. (Here I avoided possible confusion by not using the negation operation $-x$.) The comment by @User123456789 only shows that you can work around the lack of associativity of subtraction by rewriting in terms of addition; this is beside the point. $\endgroup$ Commented Aug 24, 2018 at 12:47
  • 4
    $\begingroup$ @User123456789 I think the relevant calculations would actually be $(1 - 2) - 3 = (1 + (-2)) + (-3) = (-1) + (-3) = -4$ and $1 - (2 - 3) = 1 + (-(2 + (-3))) = 1 + (-(-1)) = 1 + 1 = 2$. $\endgroup$
    – David Z
    Commented Aug 25, 2018 at 0:25
  • 2
    $\begingroup$ @Adayah there are plenty of beginner questions here. MO is the professional site $\endgroup$
    – qwr
    Commented Aug 26, 2018 at 4:04
116
$\begingroup$

A simple example, and one that even elementary school students should be able to understand, is averaging.

average(average(a,b),c)

and

average(a,average(b,c))

are, generally, not equal to each other.

$\endgroup$
3
  • 41
    $\begingroup$ This is an especially interesting example because averaging is commutative, idempotent, and medial. But it's not associative, of course. $\endgroup$ Commented Aug 24, 2018 at 6:31
  • 16
    $\begingroup$ If anyone is looking for a definition of "medial": en.wikipedia.org/wiki/Medial_magma $\endgroup$ Commented Aug 25, 2018 at 23:16
  • $\begingroup$ If anyone wants details, see math.codidact.com/posts/284997. $\endgroup$
    – user53259
    Commented Nov 27, 2021 at 15:19
56
$\begingroup$

Division

$$(1\div2)\div4 = 1/8$$ $$1\div(2\div4) = 2$$

It is my perception that this is one of the main causes of fractions being difficult to grasp for a lot of people.

$\endgroup$
12
  • 14
    $\begingroup$ It's also why that sign ÷ should be banned altogether. $\endgroup$ Commented Aug 24, 2018 at 11:09
  • 5
    $\begingroup$ Like the subtraction example, this can be explained away by defining $a \div b = a\cdot b^{-1}$. In fact, I view this more as a problem with the symbol $\div$ more than anything else. $\endgroup$ Commented Aug 24, 2018 at 12:19
  • 21
    $\begingroup$ Come one, there is nothing wrong with the symbol '$\div$' (apart from forcing you to lift your pen from the paper twice) although in programming it is usually written '$/$'. It obeys similar laws to '$-$' (though has higher precedence, the same as '$\times$'), in particular it associates to the left, so $a\div b\div c$ is interpreted as $(a\div b)\div c$ (or $a/b/c$ is interpreted as $(a/b)/c$, check with your favourite programming language). $\endgroup$ Commented Aug 24, 2018 at 12:57
  • 4
    $\begingroup$ @StellaBiderman -- That doesn't "explain it away", it's still non-associative: $$(a\cdot b^{-1})\cdot c^{-1}\neq a\cdot(b\cdot c^{-1})^{-1}$$ I guess your point is that multiplication is more fundamental... I agree. $\endgroup$
    – mr_e_man
    Commented Aug 24, 2018 at 19:05
  • 4
    $\begingroup$ Not directly related: I once guessed that $\div$ was a fraction bar with placeholder dots, like the inner product $\langle\cdot\, ,\cdot\rangle$. divisbyzero.com/2017/09/15/the-division-symbol-goes-viral $\endgroup$
    – mr_e_man
    Commented Aug 24, 2018 at 21:28
53
$\begingroup$

The Cross Product

For example let $\bf i$, $\bf j$ and $\bf k$ be the unit vectors. The cross product is the unique bilinear product that satisfies the formulae:

$\bf i \times j = \bf k \ \ \ \ \ \ \ \ \ \bf j \times k = \bf i \ \ \ \ \ \ \ \ \ \bf k \times i = \bf j$

$\bf j \times i = \bf -k \ \ \ \ \ \ \bf k \times j = \bf -i \ \ \ \ \ \ \bf i \times k = \bf -j$

$\bf i \times i = \bf 0 \ \ \ \ \ \ \ \ \ \bf j \times j = \bf 0 \ \ \ \ \ \ \ \ \ \bf k \times k = \bf 0$

Now consider the expressions $(\bf i \times i) \times j$ and $\bf i \times (i \times j)$. The first evaluates to $\bf 0 \times j = \bf 0$ while the second evaluates to $\bf i \times k = -j$.

$\endgroup$
5
  • 2
    $\begingroup$ This would’ve been an awesome time to use the MathJax trick \newcommand{\i}{\mathbf i} $\endgroup$ Commented Aug 23, 2018 at 23:21
  • 3
    $\begingroup$ Worth mentioning that the cross product can be thought of as the Lie bracket of the Lie algebra $\mathfrak{su}(2)$ -- tying this to another answer. $\endgroup$
    – Adam
    Commented Aug 26, 2018 at 0:59
  • 1
    $\begingroup$ @ChaseRyanTaylor : OMG, MathJax allows that now? And it even works in one LaTeX environment if defined in another!? You are my new best friend for telling me about this! $\endgroup$ Commented Aug 26, 2018 at 6:26
  • 1
    $\begingroup$ @TobyBartels: It is not recommended, because it affects all math on the same page. If someone else writes an answer where they do \newcommand{\i}{\imath} instead, you get dueling definitions and random results as answers move around according to vote totals. $\endgroup$ Commented Aug 28, 2018 at 13:35
  • $\begingroup$ @HenningMakholm : OK, maybe that it is a little too magic. I will endeavour to be responsible! $\endgroup$ Commented Aug 31, 2018 at 7:03
53
$\begingroup$

Exponentiation: \begin{align*} \left(2^2\right)^3&=2^6=64\\ 2^\left(2^3\right)&=2^8=256 \end{align*}

$\endgroup$
2
  • 2
    $\begingroup$ The Wikipedia hyperlink was a, uh, nice touch; I’d actually never heard of “exponentiation” before.... $\endgroup$ Commented Aug 26, 2018 at 6:39
  • 2
    $\begingroup$ @ChaseRyanTaylor: Good to see the answer is useful. :-) $\endgroup$ Commented Aug 26, 2018 at 7:41
41
$\begingroup$

How about the Rock-Paper-Scissors binary relation? It is a (commutative!) binary relation on $r, p, $ and $s$ given by the "winning" relations $rp=p$ (paper covers rock), $rs=r$ (rock smashes scissors), and $sp=s$ (scissors cut paper). For ties, we have $r^2=r, p^2=p$ and $s^2=s$.

In it, we have the expressions $r(ps)$ and $(rp)s$, which simplify as follows: $$r(ps)=rs=r$$ and $$(rp)s=ps=s$$

Here, non-associativity and the lack of an always winning position are closely related.

$\endgroup$
1
  • 2
    $\begingroup$ Interesting way to look at it. I would have rather described Rock-Paper-Scissors as an anticommutative relation $\{\mathrm{r,p,s}\}\times\{\mathrm{r,p,s}\}\to \{-1,0,1\}$. $\endgroup$ Commented Aug 26, 2018 at 21:04
41
$\begingroup$

In general, we do have:

$$ (A \setminus B) \setminus C \neq A \setminus (B \setminus C)$$ that is, set difference is non-associative, and it is quite an important elementary operation.

$\endgroup$
25
$\begingroup$

Which role do algebraic structures with non-associative operations play?

Probably the most important such structure is a Lie Algebra. Lie algebras are fundamental to the study of Lie groups, and appear in many other areas of mathematics.

The “product” operation of Lie algebras is called the Lie bracket $[x,y]$, and it is non-associative except for rare, degenerate circumstances. It does satisfy the Jacobi identity

$[x,[y,z]]+[y,[z,x]]+[z,[x,y]]=0$

Non-associative products with this property arise very naturally, often as commutators $[x,y]=xy-yx$ of some other associative, non-commutative operation.

$\endgroup$
4
  • $\begingroup$ While I don't doubt the importance of Lie Algebras, I wouldn't consider them more important than subtraction, division, or exponentiation! $\endgroup$ Commented Aug 28, 2018 at 8:49
  • 3
    $\begingroup$ The difference is that none of these operations is the primary defining operation of any algebraic structure. The Lie bracket certainly is. $\endgroup$
    – Alon Amit
    Commented Aug 28, 2018 at 8:50
  • $\begingroup$ Well, there is Stefan Perko's answer below, but I'd more argue that subtraction/division and exponentiation are inextricable parts of groups, which truly are the most important algebraic structure. It may not be explicitly listed in the axioms, but it's a part of all groups. $\endgroup$ Commented Aug 28, 2018 at 8:55
  • 6
    $\begingroup$ We are past splitting hairs here, but: Subtraction is a fine example of a non-associative operation. Groups are not a good example of a non-associative algebraic structure. $\endgroup$
    – Alon Amit
    Commented Aug 28, 2018 at 15:45
18
$\begingroup$

Similar to the case of set differences and exponentiation, implication is not associative:

$$A\Rightarrow (B \Rightarrow C) \not\equiv (A\Rightarrow B) \Rightarrow C$$

In fact

$$A\Rightarrow (B\Rightarrow C) \equiv A\wedge B \Rightarrow C$$

The "usual" way of looking at implication is not in vitro, but in relation to $\wedge$ (although alternatively there is something called an "implication algebra"). So it is a non-associative operation intimately related to an associative operation (this can be made precise).

$\endgroup$
17
$\begingroup$

The Cartesian product is actually not associative, since if $A, B, C$ are sets, then

$$(A \times B) \times C = \{ ((a, b), c) : a \in A, b \in B, c \in C \} \\ A \times (B \times C) = \{ (a, (b, c)) : a \in A, b \in B, c \in C \}$$

so $(A \times B) \times C \neq A \times (B \times C)$.

$\endgroup$
4
  • 23
    $\begingroup$ There is however an obvious bijection between $(A \times B) \times C$ and $A \times (B \times C)$. Therefore they are practically identical and are also normally treated as such. $\endgroup$
    – md2perpe
    Commented Aug 23, 2018 at 20:18
  • 14
    $\begingroup$ While this might be technically true, no one cares and putting it forth as an example is bad mathematics. You might as well argue that $5\in\mathbb R$ and $5+ 0i\in\mathbb C$ are different numbers. $\endgroup$ Commented Aug 24, 2018 at 12:17
  • 14
    $\begingroup$ While the comments above have merit, it's still important to notice the technical differences between $=$ (equality) and $\cong$ (isomorphism), especially for learners of algebra. $\endgroup$
    – Frenzy Li
    Commented Aug 24, 2018 at 18:35
  • 16
    $\begingroup$ @StellaBiderman "no one cares" - the entire field of algebraic topology begs to differ. The techniques of working with structures which "should" be associative but actually aren't have been a central point of study for the last 30 years, and the non-associativity of cartesian product is a prototypical example of such operations: the notion of $E_\infty$-algebras is defined to mirror it (or rather the set coproduct - which seems even more obviously associative). Suffices to say that this structure is the raison d'etre for homotopy groups of spheres and Steenrod algebras. $\endgroup$ Commented Aug 25, 2018 at 1:17
15
$\begingroup$

This one may be a stretch, but hey: what about the English language!

Consider the constituent "The guardian of the king's throne".

That could mean "the throne of the guardian of the king" if we associate the words of the original -repeated genitive?- constituent as "(The guardian of the king)'s throne". (I've put the words involving "genitive operation" in bold)

But it could also mean "the guardian of the throne of the king" if we associate the words of the original constituent as "The guardian of (the king's throne)".

This illustrates that in English the genitive operation may not always be nicely associative. I'm sure there are many other good (funnier) examples and better accounts/overviews of (non)associativity in language may be out there!

$\endgroup$
2
  • 2
    $\begingroup$ +1 for the creativity, but I am not so sure that this can be strictly considered an operation $\endgroup$ Commented Aug 26, 2018 at 8:05
  • 1
    $\begingroup$ @EnderWiggins I think it can be viewed as an operation, though the answer could perhaps benefit from a more formal/mathematical definition. The genitive operation takes two noun phrases and results in another noun phrase. The set of noun phrases is closed under this operation. (Here, a noun phrase couldn't be defined just as a string of words, since the difference wouldn't be expressed, but a syntax tree of some sort would work.) $\endgroup$ Commented Nov 10, 2018 at 2:35
14
$\begingroup$

Take any abelian group $G$ and define $x * y := x - y$. Now,

$$ (x*y)*z = (x-y) - z = x - y - z $$

and

$$ x * (y * z) = x - (y - z) = x - y + z $$

So $*$ will be associative if and only if $2z = 0$ for all $z \in G$. Thus, any abelian group with no $2$-torsion will give rise to such an example.

$\endgroup$
2
  • 17
    $\begingroup$ How does writing the operator as $*$ rather than $-$ make any difference? In other words, this is the same answer as the one saying "subtraction". Which admittedly seems to be more recent than this answer. Nice to spot the $2$-torsion though, even if you could have said "any group that is not an elementary $2$-group". $\endgroup$ Commented Aug 24, 2018 at 13:02
  • 2
    $\begingroup$ I agree that the extra notation does not add much, it just felt clearer to me. As for the latter, I didn't know the definition for elementary $p$-groups, but I see how it conveys precisely what fails here (I don't know much abstract algebra). This is essentially subtraction, yes, but that answer was posterior and I figured I could point out this generalization since it is virtually effortless. $\endgroup$
    – qualcuno
    Commented Aug 24, 2018 at 18:03
12
$\begingroup$

Take the space $M_{n\times n}(K)$ of all $n\times n$ matrices over a field $K$ and consider the operation $[M,N]=M.N-N.M$. That operation is non-associative. That's a very natural example. But since an operation on a set $A$ is simply any map from $A\times A$ into $A$, you can easily built lots of examples. For instance, in $\mathbb R$, you define, say, $x\odot y=x+e^y$. It is not associative, of course.

$\endgroup$
2
12
$\begingroup$

Here's the simple example:

In $\Bbb{R}$, define $$a*b=2a+b$$ where the $+$ in the RHS is the usual addition in $\Bbb{R}$

Then $*$ is not associative

$2*(0*1)=2*(2(0)+1)=2*1=2(2)+1=5$

whereas

$(2*0)*1=(2(2)+0)*1=4*1=2(4)+1=9$

$\endgroup$
2
  • 1
    $\begingroup$ Thanks for that. But may be there some reason why this operation didn't gain much attention? Might it have to do with its non-associativity? $\endgroup$ Commented Aug 23, 2018 at 17:23
  • 2
    $\begingroup$ @HansStricker no, it's because it's pretty much useless - in general, we only study mathematical objects (particularly algebraic ones, I think) just because they're there - they have to have some kind of external motivation or a lot of internal elegance. And this operation has neither. $\endgroup$ Commented Aug 24, 2018 at 14:59
12
$\begingroup$

Quite similar to the "cartesian product" example : composition of paths !

Let $X$ be a topological space, $\alpha, \beta : [0,1]\to X$ continuous maps with $\alpha(1)=\beta(0)$, then we may define $\alpha\star\beta : [0,1]\to X$ by concatenating in the obvious way.

However, $\star$ is not associative (on the nose). This is very interesting because while $\alpha\star(\beta\star\gamma)\neq (\alpha\star\beta)\star\gamma$ in general, this equation holds up to path homotopy.

It's very similar to the cartesian product example, because though $A\times (B\times C)\neq (A\times B)\times C$ in general, this equality holds up to natural isomorphism.

As mentioned in the comments below the answer about cartesian products, studying structures that "should" be associative, but aren't associative "on the nose" is a big part of algebraic topology

$\endgroup$
11
$\begingroup$

The multiplication of octonions is not associative, and they have many applications in mathematics and physics.

$\endgroup$
4
  • 2
    $\begingroup$ I think you mean to say that multiplication of octonions is not associative. The octonions themselves are not an operation, so it doesn’t make sense to talk about their associativity or non-associativity. $\endgroup$
    – wgrenard
    Commented Aug 25, 2018 at 15:05
  • 2
    $\begingroup$ Thanks for the comment, fixed. $\endgroup$
    – mo-user
    Commented Aug 25, 2018 at 15:10
  • 2
    $\begingroup$ More in general, this property is true for any algebra obtained via the Cayley-Dickson process after the octonions. $\endgroup$ Commented Aug 26, 2018 at 9:54
  • $\begingroup$ Hm, are the elements of C/H/O not operators? I seem to remember hearing that but not really grasping it. $\endgroup$
    – John P
    Commented Jan 13, 2022 at 8:43
10
$\begingroup$

Take a Steiner Triple System STS(n). It is a set $S$ of n elements with a set of subsets (called blocks) of $3$ elements from $S$ such that every pair of elements in $S$ is in exactly one of the blocks.

For example, the unique (up to isomorphism) STS(7) is $\{a,b,c\} \{a,d,e\} \{a,f,g\} \{b,d,f\} \{b,e,g\} \{c,d,g\} \{c,e,f\}$

Now, given an STS define an operation $*$ on S: $x*x:=x$ for all $x$ in $S$, and $x*y:=z$ where $\{x,y,z\}$ is a block. This operation is not associative.

https://en.wikipedia.org/wiki/Steiner_system

$\endgroup$
10
$\begingroup$

Given an associative (but possibly non-commutative) algebra (over a field with characteristic other than $2$, e.g. $\mathbb R$) we can make it into a so called Jordan algebra by equipping it with the symmetrized product

$$x\circ y := \frac 1 2(xy + yx).$$

Being a Jordan algebra means that $\circ$ is commutative and satisfies the Jordan identity

$$(x\circ y)\circ(x\circ x) = x\circ (y\circ (x\circ x))$$

They have applications to quantum mechanics as (c.f. Jordan operator algebras) but are also studied for their one sake.

$\endgroup$
9
$\begingroup$

Tensor product of (bi)modules over a quasi-bialgebra.

Let $\Bbbk$ be a field and let $(A,m,u,\Delta,\varepsilon,\Phi)$ be a quasi-bialgebra over $\Bbbk$. The category ${_A\mathfrak{M}}$ of left $A$-modules is a monoidal category with tensor product $\otimes:=\otimes_{\Bbbk}$ and unit $\Bbbk$ (the action on $M\otimes N$ is the diagonal one given by $\Delta$). In ${_A\mathfrak{M}}$, $(M\otimes N)\otimes P$ and $M\otimes (N\otimes P)$ are different $A$-modules (this is due to the non-coassociativity of $\Delta$) and you just have an isomorphism $$\alpha_{M,N,P}:(M\otimes N)\otimes P \to M\otimes (N\otimes P),(m\otimes n)\otimes p\mapsto \Phi\cdot(m\otimes (n\otimes p))$$ (the associativity constraint, in fact).

$\endgroup$
5
  • 3
    $\begingroup$ Quasi bi-algebras must be terrible. $\endgroup$
    – Allawonder
    Commented Aug 25, 2018 at 20:35
  • $\begingroup$ Only if you perform computations with elements, otherwise (categorically speaking) they behave even better than bialgebras $\endgroup$ Commented Aug 26, 2018 at 8:07
  • $\begingroup$ What would be the point of developing a theory one could not feel? How could one ever do without computation, no matter how minimal? $\endgroup$
    – Allawonder
    Commented Aug 26, 2018 at 18:58
  • 3
    $\begingroup$ @Allawonder I am not saying that you have to do without computations, I am just saying that they behave nicely from a categorical point of view. You can do computations, in fact. And with some practice in Sweedler Notation, they are not more difficult than ordinary bialgebra's ones. Simply, they are longer. But mathematics is not simply computing, in my opinion: which computations do you find in Category Theory or Logic? Quasi-bialgebras are nice eg because they are exactly those algebras whose category of modules is monoidal with tensor product the one over $\Bbbk$ and unit object $\Bbbk$ $\endgroup$ Commented Aug 27, 2018 at 5:03
  • $\begingroup$ If one has to perform some computation, then they must be terrible, as I first said. Note that this says nothing about their niceness from other perspectives; neither does it mean I'm reducing math to computation. I only make the remark that these bi-algebras must be terrible, at least computationally. This, we both agree, is true. This does not make them any less interesting or worthy as an answer to the question in OP, to be even clearer. $\endgroup$
    – Allawonder
    Commented Aug 27, 2018 at 6:00
5
$\begingroup$

Malcev algebras

Malcev algebras are also an example. A Malcev algebra $A$ over a filed $\Bbbk$ is a vector space with an internal composition law $\cdot$ such that $$x^2=0,\\ x\cdot y=-y\cdot x,\\ J(x,y,z)\cdot x = J(x,y,x\cdot z),$$ where $J(x,y,z)=(x\cdot y)\cdot z+(y\cdot z)\cdot x+(z\cdot x)\cdot y$ (see Sagle, Malcev Algebras, §2).

$\endgroup$
3
$\begingroup$

Subtraction / Division have been mentoined of course, but let me explain why they are as important or even more important than Addition / Multiplication and arguably only less talked about since we are more comfortable working with associativity.

You can explain what a group is (almost) solely by its division (subtraction in the Abelian case).

A (division) group is thus a set $G$ with a binary operation $/ : G\times G\to G$ s.t.

  • $a/a = b/b$,
  • $\frac{a/a}{(a/a)/a} = a$,
  • $\frac{a}{b/c} = \frac{a}{(c/c)/c)}/b$.

(I used "big fractions" for increased readibility).

A group morphism $f : G\to H$ is then just a function $G\to H$ s.t. $f(a/b) = f(a)/f(b)$.

There is a small "caveat". The "division groups" almost coincide with ordinary groups; just pick $g\in G$ and let $e_G := g/g$, $a\cdot b := a/(e_G/b)$ and $a^{-1} = e_G/a$. This leaves open the possibility of $G$ being empty. So in this theory, there is an "empty group".

If you don't want an "empty group", then we can simply insist on the existence of an identity $e_G$ s.t. $a/a = e_G$ for all $a\in G$.

$\endgroup$
2
$\begingroup$

Neither the Sheffer Stroke (NAND), nor the Pierce arrow (NOR) associate. Both have an important status in logic, as does implication. Reverse implication also does not associate.

I asked somewhat of a related question a few years ago: Is the Ratio of Associative Binary Operations to All Binary Operations on a Set of $n$ Elements Generally Small? Associative binary operations on a finite set are rare in comparison to the class of most binary operations on a finite set (statistically speaking). Additionally, there exist all of the counterxamples in these answers. So, we can't build in the concept of associativity to a general concept of an operation. Doing so would lead to many contradictions.

Given that a goal of the study of abstract algebra lies in studying all concrete algebras by abstract means, the study of non-associative algebras is more important than associative algebras, since non-associative algebras are vastly more common than associative algebras.

$\endgroup$
2
$\begingroup$

Sorry I'm late to the party, but reading through these posts I noticed that many demonstrations of a non-associative operation here have the exact same algebraic structure.

Operation

Let $\langle R, \cdot,+\rangle$ be a ring with identity without zero divisors, $\langle H, +\rangle$ be a nontrivial abelian group, and $\phi:R\times H\to H$, denoted $\phi(r,h)=rh$ be a function always obeying

  • $1_Rh=h,$
  • $(r_1r_2)h=r_1(r_2h),$
  • $r(h_1+h_2)=rh_1+rh_2,$
  • $r0_H=0_H,$
  • $(r_1+r_2)h=r_1h+r_2h,$

Given $r\in R$ with $r\neq1_R,0_R$ and so that there exists some $h$ with $r(1_R-r)h\neq0_H$. Define $*$ on $H\times H$ by $x*y=x+ry$. We can directly compute $$\begin{aligned} ((x*y)*z)-(x*(y*z))&=((x+ry)*z)-(x*(y+rz))\\ &=((x+ry)+rz)-(x+r(y+rz))\\ &=(x+ry+rz)-(x+ry+rrz)\\ &=rz-rrz\\ &=rz+r(-rz)\\ &=r(z-rz)\\ &=r(1_Rz-rz)\\ &=r(1_R-r)z\\ &=((r(1_R-r))z\\ \end{aligned}$$

By design this product is nonzero, so the difference between $*$ evaluations with the two different associations is nonzero. In a group, that means they are not equal, hence $*$ is non-associative.

Examples

  • Subtraction in $\mathbb{R}$. Let $R$ and $H$ both be $\mathbb{R}$ with addition, multiplication, and the ring action defined the obvious ways. Choose $r=-1$.
  • Subtraction in an arbitrary nontrivial abelian group without 2-torsion. Let $R=\mathbb{N}$, $H$ be that group, $r$ be $-1$, and the ring action be successive addition of an element or its inverse in the obvious way.
  • As in the $2a+b$ answer, take $R$ and $H$ to both be $\mathbb{R}$ with all operations defined the obvious ways. Choose $r=2$. Over the reals, we can actually just choose $r$ to be anything other than $1$ or $0$.
  • Extending that, let $R$ and $H$ both be the same ring with identity without zero divisors of cardinality at least $3$. Define addition to be the ring addition, multiplication to be the ring multiplication, and the ring action $\phi$ to be the ring's multiplication. Choose $r$ to be anything other than $0$ or $1$.
  • We actually get the implication answer out of this formulation as well, viewing $R$ and $H$ both as the set $\{0,1\}$, treating $H$ them both as a boolean algebra to obtain addition and multiplication, defining the ring action to be XOR, and choosing $r=1$.
$\endgroup$
2
$\begingroup$

IEEE-754 floating point, due to the rounding inherent in operations.

a + b involves a rounding step.

It's one of the reasons fused multiply-adds exist.

0.7 + 0.1 + 0.2 from here: https://stackoverflow.com/questions/10371857/is-floating-point-addition-and-multiplication-associative

$\endgroup$
1
$\begingroup$

Here, we have a colorful bunch of examples but mine tastes differently. Take $S=[0,4]\subset\mathbb{R}$ and let $*(a,b)=|b-a|$. Obviously $*$ is a binary operation on $S$ which violets associativity:

$$ 2=(1*2)*3\neq 1*(2*3)=0 $$

$\endgroup$
1
$\begingroup$

An important example of non-associative operation structure is a medial magma.

The Wikipedia article states:

In abstract algebra, a medial magma or medial groupoid is a magma or groupoid (that is, a set with a binary operation) which satisfies the identity $$ (x \cdot y) \cdot (u \cdot v) = (x \cdot u) \cdot (y \cdot v), \text{ or more simply } xy\cdot uv = xu\cdot yv$$ for all $x,y,u$ and $v$, using the convention that juxtaposition denotes the same operation but has higher precedence.

A few sentences later on it states:

Medial magmas need not be associative: for any nontrivial abelian group with operation + and integers m ≠ n, the new binary operation defined by $x \cdot y = m x + n y\,$ yields a medial magma which in general is neither associative nor commutative.

A few sentences later on it states:

A particularly natural example of a nonassociative medial magma is given by collinear points on Elliptic curves. The operation $x \cdot y = −(x+y)$ for points on the curve, corresponding to drawing a line between $x$ and $y$ and defining $x\cdot y$ as the third intersection point of the line with the elliptic curve, is a (commutative) medial magma which is isotopic to the operation of elliptic curve addition.

$\endgroup$
1
  • $\begingroup$ Good and leading points! I did it below with different way. $\endgroup$
    – Mikasa
    Commented May 26, 2023 at 10:58
0
$\begingroup$

Buying or selling short futures requires margin. The capital is limited. As a result, the number of traded contracts on a position, positive on long and negative on short, is limited too. With 10,000 dollars of trading capital, and 1,550 dollars margin per contract, one can at maximum buy integer(10,000 / 1,550) = 6 or sell -6 contracts.

Example: trading positions in three sequential time points could be W = (1, 1, 0) = (take long position of one contract, keep it untouched, return to zero contracts by selling one). A corresponding strategy, a chain of actions, is U = (1, 0, -1) = (buy one, do nothing, sell one). We assume that before the first action a position was zero - out of the market. The strategy is obtained from a position by taking adjacent differences: W = (1, 1, 0) -> (1-0, 1-1, 0-1) = (1, 0, -1) = U.

Assume that one set of trading rules suggested positions W1 = (-2, 2, 0) but another two W2 = (3, 0, 0) and W3 = (4, 6, 0). We see that (W1 + W2) + W3 = (1, 2, 0) + W3 = (5, 6, 0) and W1 + (W2 + W3) = W1 + (6, 6, 0) = (4, 6, 0). But

(5, 6, 0) != (4, 6, 0)

We get a not-associative operation of summation with a limit. It is easy to see that it is commutative.

Such commutative but not-associative "market" operations are considered in "Trading Strategies with Position Limits" https://arxiv.org/abs/1712.07649 on pp. 31 - 34 using Cayley tables. It has references on Cayley, Etherigton, Bourbaki, Malcev, Belousov, Sabinin, Schafer on algebraic structures and non-associative algebras.

$\endgroup$
-1
$\begingroup$

Example in a previous answer using trading positions of futures contracts, where summation due to a dollar margin limit can become not associative, relates to integer numbers. But not associativity can be illustrated with "non-numerical" examples.

In a well known game https://en.wikipedia.org/wiki/Rock_paper_scissors Rock (R) - Paper (P) - Scissors (S), the winning rules are

R * P = P * R = P "paper covers rock and beats it",

R * S = S * R = R "rock damages scissors and beats it",

P * S = S * P = S "scissors cuts paper and beats it".

We see that the binary operation is commutative. Consider, R * P * S. We get

(R * P) * S = P * S = S

R * (P * S) = R * S = R

Again, associativity is violated. (After adding this answer, I noticed that R-P-S was used by the user Adam too)

$\endgroup$
2
  • $\begingroup$ I don't think you have said anything new, compared with Adam's existing answer. Either you should make your answer into something distinct, or delete it, I think. $\endgroup$
    – 311411
    Commented Sep 26, 2021 at 17:34
  • $\begingroup$ I have written another answer related to futures contracts. Then, I thought that Rock-Paper-Scissors is a good "non-numerical" example and sent it "in pursuit". Only after that I found the Adam's message and quickly added the text in rounding brackets indicating his priority. Mine on R-P-S can be deleted. It only has a common link in Wikipedia for a full description of the game. $\endgroup$ Commented Sep 27, 2021 at 19:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .