# How to determine if certain operation is associative based on Cayley table [duplicate]

I have the following table and I don't know how to determine if an operation is associative based on the table. Is there an easy way to do it? Or it's just brute force

\begin{array}{|c|c|c|c|c|c|} \hline *& a & b & c &d &e \\ \hline a& a&b &c&b&d\\ \hline b& b&c &a&e&c\\ \hline c& c &a &b&b&a\\ \hline d&b&e&b&e&d\\ \hline e&d&b&a&d&c\\ \hline \end{array}

We can see that it's not commutative because $b*e \neq e*b$, but how do we check if it's associative?

## marked as duplicate by YuiTo Cheng, ThorWittich, Paul Frost, Leucippus, vonbrandAug 11 at 17:57

In general, it is not possible to check for associativity simply by glancing at the Cayley table. This is, in part, because associativity is determined from a three termed equation $a(bc) = (ab)c$ whilst the Cayley table shows two-term products only.

However, you don't quite need brute force. You can use Light's associativity test.

Light's associativity test is based on the following Lemma. Let $*$ be a binary operation on the set $S$ (called product).

Definition: A subset $G$ of $S$ generates $S$ if every element of $S$ can be generated as product of elements of $G$.

Lemma: If G generates S then * is associative on S if and only if $$\forall (x \in S) \forall (g \in G) \forall (z \in S): x*(g*z)=(x*g)*z$$

In your example $\{e\}$ generates $\{a,b,c,d,e\}$, because

$$e=e$$ $$c=e^2$$ $$a=e*c=e*(e^2)$$ $$d=a*e=(e*(e^2))*e$$ $$b=a*d=(e*(e^2))*((e*(e^2))*e)$$

so you have to check

$$\forall (x \in S) \forall (z \in S): x*(e*z)=(x*e)*z$$

But we have $$c*(e*e)=c*c=b$$ $$(c*e)*e=a*e=a$$ and so $$c*(e*e) \ne (c*e)*e$$ So $*$ is not associative.

Do two "outer products" using the multiplication table (but the dimensions in different orders). Then you compare the resulting outer products element-wise.