2.1.7

For the law of composition defined by $$ab = a$$ to be associative we need $$a(bc) = (ab)c$$.

Let $$a, b, c \in S$$ be arbitrary, using our composition law we see $$a(bc) = ab = a$$ and $$(ab)c = ac = a$$. Since the two expressions are equal, the law of composition is associative.