16

A friend of mine is using a lot of algebra that is not associative for an advanced Chemistry project. We were discussing it recently and I found it rather amusing how often she said things like "brackets actually exist" and "associativity is really underrated".

She's right, of course. I'm surprised by what's out there. Have a look at this other question on associativity in magma for instance. I'm curious.

So just how strong is associativity? What striking (counter)examples are there of the strength of the assumption that a binary operation is associative?

Thoughts.

This isn't particularly unique to associativity but (who cares? and) a little rewording & emphasis can go a long way.

Let $(S, \cdot)$ be a semigoup. Then by associativity we know that for every single triple $a, b, c\in S$, we have some $d, e\in S$ with $\color{red}{a\cdot b=d}$ and $\color{blue}{b\cdot c=e}$ (by the fact that $\cdot$ is a binary operation) and $$\color{red}{\underbrace{(a\cdot b)}_{d}}\cdot c=\color{red}{d}\cdot c=a\cdot \color{blue}{e}=a\cdot\color{blue}{\overbrace{(b\cdot c)}^{e}}.$$

Moreover, if $\lvert S\rvert=5$, to verify that $S$ is indeed a semigroup, we must consider $\underline{5^3=125}$ triples.

To quote MJD in this answer:

If nothing else, the existence of Light's algorithm seems to rule out the possibility that anyone knows an easy way to [see if a magma is a semigroup] just by looking at the original Cayley table.

Proving associativity of word reduction in the standard construction of the free group over a set is notoriously labour-intensive/tedious.

Shaun
  • 44,997
  • What kind of nonassociative algebra is relevant to a chemistry project? – Qiaochu Yuan Nov 15 '14 at 20:43
  • She's doing something with matrices. I don't know what exactly. I presume she means in the sense of magmas, so associativity is not necessarily assumed. – Shaun Nov 15 '14 at 20:45
  • My knowledge of Chemistry is rather poor too, I'm afraid. I won't be able to explain the project. – Shaun Nov 15 '14 at 20:46
  • If she's working with Lie algebras, which is my best guess, I would really hesitate to call that "nonassociative algebra." – Qiaochu Yuan Nov 15 '14 at 20:47
  • Oh, they're definitely not Lie algebras. I'd spot them a mile off :) – Shaun Nov 15 '14 at 20:48
  • 7
    The rock-paper-scissors example of a commutative, non-associative magma is cute enough to mention here :) – Shaun Nov 19 '14 at 18:23
  • 2
    @QiaochuYuan, it has something to do with hereditary traits, so there's a lot of Biology in there too. It's something to the effect that if $A, B, C$ are members of a species, then $(A\heartsuit B)\heartsuit C\neq A\heartsuit(B\heartsuit C)$, where $(X\heartsuit Y)$ is the offspring of $X$ and $Y$, except that she's working with genes or something - I don't know. – Shaun Jan 07 '15 at 09:13
  • I'm thinking about what effect associativity might have on a "tournament" (for lack of a better word) like rock-paper-scissors, seeing if I can highlight anything interesting about the outcome. – Shaun Jan 07 '15 at 09:16
  • What do you mean by "strong?" – Thomas Andrews Jan 10 '15 at 22:16
  • @ThomasAndrews I'm not entirely sure to be honest. I'm sorry. I guess a measure of "strength" of an assumption is the amount of consequences it has. Another would be, not necessarily the amount of consequences, but their constructive/descructive nature; things that surprise you. An example of a weak assumption might be "there exists a distinguished element $x$ in the set $X$". Is that clearer now? :) – Shaun Jan 11 '15 at 08:45
  • What I have in mind are things that make one say "wow, you got all of this just from assuming the binary operation is associative!?" or "hey, that's really unexpected in this context! It's just from associativity, you say? Gosh!" or "when you put it like that, associativity is kind of powerful here!" – Shaun Jan 11 '15 at 08:55
  • *destructive. Sorry: I did that on my new phone. It's really fiddly. – Shaun Jan 11 '15 at 09:49
  • 2
    Oh cute: all answers got a downvote for some reason. – rschwieb Jan 12 '15 at 21:54
  • I'll have to take my time with the bounty, I'm afraid. I'm spoilt for choice and I have a busy day today. Sorry. – Shaun Jan 14 '15 at 09:52
  • This may be of interest to you: If you have a single-operation $n$-ary associative algebra, then it embeds (injective homomorphism) into a binary-derived associative algebra. So if you are in the further-than-binary world, and you assume associativity, you end up restricting yourself to basically-binary structures. http://mathoverflow.net/questions/218964/is-every-n-ary-semigroup-a-subalgebra-of-an-algebra-derived-from-a-binary-semi – JustAskin Oct 27 '15 at 21:09

6 Answers6

16

A particularly notorious example of non-associative binary operations are addition and multiplication of numbers - when done in a computer using floating point arithmetic. That is, the results of x = a+(b+c); and x=(a+b)+c; may be very different. One needs to be careful in programming additions to avoid excessive rounding errors in such situations.

Travis Willse
  • 99,363
11

Associativity of a binary operation allows us to represent it with mappings

Studying the transformations of a set $X$ into itself (we can write $\mathrm{Hom}(X,X)$) is a very natural thing to do: how can $X$ be rearranged? Its binary operation (function composition) is associative by nature.

In group theory, this leads to Cayley's theorem that every group $G$ is a subgroup of $\mathrm{Sym}(G)\subset \mathrm{Hom}(G,G)$.

But after thinking briefly, you can see that pretty much the same line of thought applies to any semigroup $S$ acting on itself via a binary operation. The only caveat is that you need a condition to ensure $as=bs$ for all $s\in S$ implies that $a=b$ so that the map is injective.

If $S$ is a monoid, or if $S$ is cancellative, then we would get this condition for free, and $S$ can be injected into $\mathrm{Hom}(S,S)$ using the same scheme as Cayley's theorem.


(This block added later:) As pointed out in the comments, it now seems painfully obvious you can adjoin an identity to make any semigroup into a monoid, and then represent the semigroup as a set of endomorphisms of the monoid, so all semigroups are covered as well. So, associativity turns out to characterize which binary operations that can be represented this way and those that can't.


The same could not be said for an operation on a set $X$ which isn't associative. There is no way to find an isomorphic copy of it in $\mathrm{Hom}(Y,Y)$ for any set $Y$ at all.

Nonassociativity means the operation is going to be too pathological for this nice type of representation.

I have the suspicion that one might be able to frame this in terms of representable functors, but after thinking a while (being the armchair category theorist that I am) I couldn't decide if the connection was real.

rschwieb
  • 153,510
  • I really like this answer. Thanks :) – Shaun Jan 10 '15 at 08:23
  • 2
    Technically, though, you can represent all semigroups as a sub-semigroup of some $\mathrm{Hom}(Y,Y)$, just not necessarily with $Y$ the same set as $S$, but $Y$ can be made to be either $S$ or $S\sqcup{\cdot}$. – Thomas Andrews Jan 11 '15 at 00:46
  • 2
    And this is all related to the adjunction: $\mathrm{Hom}(X\times Y,Z)\cong \mathrm{Hom}(X,\mathrm{Hom}(Y,Z))$. – Thomas Andrews Jan 11 '15 at 00:49
  • @ThomasAndrews interesting: how is such a $Y$ related to $S$? – rschwieb Jan 11 '15 at 01:29
  • 2
    Basically, you just add an identity to $S$ if it doesn't have one (or even if it does, if you desire to.) Basically, there is a trivial and functorial way to make a semigroup into a monoid - it is the adjoint of the forgetful functor from monoids to semigroups. @rschwieb – Thomas Andrews Jan 11 '15 at 01:32
  • 1
    @ThomasAndrews Ah, of course. – rschwieb Jan 11 '15 at 01:50
10

For all associative binary operations on a set, there is a faithful representation as a sub-semigroup of the semigroup $(X^X,\circ)$ for some set $X$.

That is the nature of associativity, on some level - it is function composition.

This puts us into the area of category theory, too. It would be probably not very useful to do category theory without associativity of composition.

The most basic place I've seen non-associativity is in $\lambda$-calculus and/or combinatory logic, where $ab$ represents application of $a$ to $b$.

If you look at lambda calculus, you can think of it as $a\star b=\phi_a(b)$. That's actually true for all binary operations, of course - we can define $\phi_a(b)=a\star b$. For associative operators, however, we have the lovely feature $\phi_a\circ \phi_b = \phi_{a\star b}$.

Thomas Andrews
  • 177,126
9

One of the most important places where non-associativity plays an important role is in computations. A lot of useful algorithms rely on the fact the computational complexity of evaluations is non-associative. For instance, consider a rank $1$ matrix-vector product. Let the matrix $A = uv^T$ and the vector be $x$. Let $u,v,x \in \mathbb{R}^{n\times 1}$. To evaluate $b=Ax$, there are two ways.

  1. Evaluate $A=uv^T$. Computational cost is $\mathcal{O}(n^2)$. Now evaluate $b=Ax$ and the computational cost is $\mathcal{O}(n^2)$.
  2. Evaluate $a=v^Tx$. Computational cost is $\mathcal{O}(n)$. Now evaluate $b=u \cdot a$ and the associated computational cost is $\mathcal{O}(n^2)$.
Adhvaitha
  • 5,441
4

If a binary operation is not associative, we lose commutativity of powers of $a$. That is we can't say for instance that $a^2 a=a a^2$. Which means for instance that we don't know the meaning of something like $a^3$, without some additional convention.

paw88789
  • 40,402
1

Associative and non-associative algebra usual refers to algebras over rings, that is $R$-modules with an additional multiplicative composition.

But I guess you are asking for an arbitrary algebraic systems with one composition, and of course there is no reason at all to suppose that $f(f(x,y),z)=f(x,f(y,z))$ for an arbitrary function $f:X\times X \to X$.

The associativity in algebra often comes from Euclidean geometry and from composition of functions. Any group is a subgroup of a group of automorphisms $A\to A$ for some set $A$. And I guess that important classes of semigroups are sets of functions.

Lehs
  • 13,791
  • 4
  • 25
  • 77