Some easy examples of operations that don't work like you'd expect them to, i.e. not being commutative or associative etc.

478 Views Asked by At

I'm currently teaching some undergrads in their first / second semester about fields, groups, rings and vector spaces. I often see them argue that something is definitely a field, since addition / multiplication is commutative, associative and distributive in general.

This argument obviously doesn't hold for arbitrary addition / multiplication but it's kinda hard to get them to see this if they only know these operations from the real numbers. There are obviously many counterexamples but I'm trying to find some that aren't just constructed as counterexamples but actually used in everyday mathematics.

I've gotten so far matrix multiplication and the composition of functions as non-commutative operations.

Do you know any basic examples of operations that aren't associative or distributive?

10

There are 10 best solutions below

1
On

The cross product of vectors is neither commutative nor associative.

1
On

The binary operation of average of two real numbers ($a\oplus b=\frac{a+b}{2}$) is commutative but not associative.

1
On

The Lie bracket $[A,B]=AB-BA$ on the space of matrices $M_n(K)$ is neither commutative, nor associative in general. In the special case, for the Lie algebra $\mathfrak{so}_3(K)$, the cross product is an example.

2
On

A rock-paper-scissors tournament is not associative (but is commutative and idempotent).

Let $x\vee y$ be the winner of hand $x$ versus hand $y$. Then

$$\begin{align} (r\vee p)\vee s&=p\vee s\\ &=s\\ &\neq r \\ &=r\vee s \\ &=r\vee (p\vee s), \end{align}$$

where the hands are:

  • $r$ for rock.
  • $p$ for paper.
  • $s$ for scissors.
0
On

Composition of functions is distributive (over addition) on the right, but not on the left.

2
On

The octonions (aka Cayley numbers) $\mathbb O$ are a noncommutative and nonassociative $\mathbb R$-algebra. This means that the multiplication on $\mathbb O$ is neither commutative nor associative.

2
On

In a first course in algebra, I think that the best examples of binary operations and algebraic structures to start off with are ones that are already familiar to students, such as matrix multiplication. However, once the familiar examples have been given, I think it is worth transitioning to the more abstract ones. In this post, the examples have a common theme: building new algebraic structures out of old.

Given an abelian group $G$, there are two natural operations that we can define on the set $G^G$ of maps from $G$ to $G$:

  • Function addition: if $f,g\in G^G,$ then $f+g\in G^G$ is defined "pointwise" as the map $x\mapsto f(x)+g(x).$ (It is worth mentioning that the $+$ in $f+g$ is a binary operation on $G^G,$ whereas the $+$ in $f(x)+g(x)$ is the binary operation of the group $G.$)
  • Function composition: if $f,g\in G^G,$ then $f\circ g$ is defined as the map $x\mapsto f(g(x)).$

The set $G^G$, together with function addition, is itself an abelian group. We might expect that composition distributes over addition, i.e. if $f,g,h\in G^G,$ then $(f+g)\circ h=(f\circ h)+(g\circ h)$ and $f\circ (g+h)=(f\circ g)+(f\circ h).$ However, only the first equation holds in general. Thus, $G^G$, together with function addition and composition, does not form a ring.

On the other hand, the abelian group $G^G$ has a subgroup which does admit a natural ring structure. Consider the set $\operatorname{End}(G)$ of homomorphisms from $G$ to itself – such homomorphisms are known as endomorphisms of $G$. Since endomorphisms preserve the addition of $G$, it can be shown that composition of endomorphisms distributes over addition of endomorphisms. Thus, $\operatorname{End}(G)$ forms a ring, known as the endomorphism ring of $G$.

A perhaps more familiar version of the above example is given by the set $\mathcal L(V)$ of linear maps $V\to V$, where $V$ is some vector space over a field $k$. Again, due to the defining properties of linear maps, composition distributes over addition nicely.

0
On

The title asks for operations that we expect to be associative (or commutative, distributive, etc.). The other answers have operations where non-associativity comes without any surprise. Here is an example where non-associativity might be a surprise (if you have never seen it before, of course), and is certainly wanted.

We can concatenate paths (with values in any space) with each other. In the first half of the time, go the first path, in the second half, go the second path. The concatenation of paths is not associative. In fact, if we have three paths $f,g,h$ and look at $f * (g * h)$, then $f$ covers half of the time, $g$ the next quarter and $h$ the final quarter. But in $(f * g) * h$ the path $f$ only covers a quarter of the time, $g$ the next quarter, and $h$ the full second half. Therefore, the paths $f * (g * h)$ and $(f * g) * h$ only agree up to a reparametrization, and therefore also up to homotopy. When we look at paths up to homotopy, we get an associative operation, namely the fundamental groupoid of the space.

homotopy between f * (g * h) and (f * g) * h

Here is an example of an operation (actually, a functor) that it is not commutative (up to isomorphism), and it really was surprising to me when I first encountered it: If $M,N$ are bimodules over a ring $R$, then the natural homomorphism $M \otimes_R N \to N \otimes_R M$, $m \otimes n \mapsto n \otimes m$ is ... well does not exist at all! The map $(m,n) \mapsto n \otimes m$ is not bilinear (notice that $mr \neq rm$ in general). Probably not very beginner-friendly, but I wanted to mention it in any case.

0
On

Here is an important example in mainstream mathematics.

On a smooth cubic curve (pick a concrete example, say $y^2 = x^3 + 17$), observe that the line through two points $P$ and $Q$ cuts the curve in a third point $R$, where we use the tangent line at $P$ when $Q = P$ (this is why we want the curve to be smooth). In case $P \not= Q$ and the line through them is tangent to the curve at $P$ or $Q$ (meeting the curve at that point "twice"), the line through $P$ and $Q$ has no third separate intersection point with the curve, but we reasonably declare the third intersection point to be the $P$ or $Q$ at which the line is tangent.

Now define a binary operation $\oplus$ where $P \oplus Q$ is the third point $R$ on the curve that's also on the line through $P$ and $Q$. This operation $\oplus$ is clearly commutative, but it is not associative.

Example. On the curve $y^2 = x^3 + 17$, let $A = (-1,4)$, $B = (2,5)$, and $C = (-2,3)$. Show $A \oplus B = A$ because the line through $A$ and $B$ is tangent to the curve at $A$, so the third intersection point is $A$ by our convention above. Then $(A \oplus B) \oplus C = A \oplus C = (4,9)$: the line through $A$ and $C$ meets the curve in $(4,9)$. And $A \oplus (B \oplus C) = A \oplus (1/4,33/8) = (19/25,522/125)$, which is not $(4,9)$. So $(A \oplus B) \oplus C \not= A \oplus (B \oplus C)$.

Letting $+$ denote actual addition on these elliptic curves, $P \oplus Q = -(P+Q)$, so having associativity not hold is comparable on real numbers to saying $x \oplus y = -(x+y) = -x-y$ being commutative and not associative, but that operation on real numbers seems silly, while on cubic curves $\oplus$ seems like a natural operation initially.

Remark. I ignored the issue where a line through $P$ and $Q$ is vertical, requiring throwing in an "ideal" extra point that would be the identity in an elliptic curve group law, but I suggest not mentioning this aspect unless a student in the class notices $\oplus$ as I described it does not make sense when the line through $P$ and $Q$ is vertical.

0
On

Here is an example that is not accessible to beginning students, but it's a natural setting where something is not associative when things are not done carefully.

Differential geometers like to define the $k$-th symmetric and exterior power of a real vector space as subspaces of the $k$-th tensor power of the vector space, and their definition of multiplication on the symmetric and exterior algebras (direct sum of all symmetric or exterior powers) has strange factorials, whose only purpose is to make that multiplication operation associative. Without the factorials associativity is lost. See the last paragraph here.

By defining symmetric and exterior powers instead as quotient spaces of tensor powers, no ugly factorials are needed in the definition of multiplication on the symmetric and exterior powers, and that's how things are set up in that document I linked to above.