# Associativity is About Composition

Complex multiplication can be visualized as rotating and scaling the complex plane. So, besides thinking of a complex number $z$ as a point, we can think of it as encoding a transformation composed of a rotation and scaling.

Recall associativity:

$$ z \cdot (q \cdot c) = (z \cdot q) \cdot c $$If we think of $z$ and $q$ as transformations, and $c$ as a point being transformed, then this reads:

$$ z(q(c)) = (z \cdot q)(c) $$That is, starting at a point $c$ and applying the transformation $q$ and then the transformation $z$ is the *same thing* as applying the transformation "$z \cdot q$" to $c$. Thus $z \cdot q$ is the transformation "do $q$ and then do $z$", which is to say, the composition of $z$ and $q$.

So what associativity tells us is really that $z\cdot q = z \circ q$

## Adding Rigor

Technically speaking, we've been a little loose here. A complex number $z$ does not *quite* encode a transformation;

- $z\cdot = x \mapsto z\cdot x$
- $(z\cdot)(x) = z\cdot x$
- $z\cdot$ is a function $f$ defined by $f(x) = z\cdot x$.

Under this interpretation, associativity looks like the following:

$$ \begin{align*} z \cdot (q \cdot c) &= (z \cdot q) \cdot c \\ {z\cdot}({q\cdot}(c)) &= ((z \cdot q)\cdot)(c) \\ ({z\cdot} \circ {q\cdot})(c) &= ((z \cdot q)\cdot)(c) \\ \phantom{\hspace{30pt} \text{since $c$ is arbitrary}} {z\cdot} \circ {q\cdot} &= { (z\cdot q)\cdot } \hspace{30pt} \text{since $c$ is arbitrary} \end{align*} $$Which reads similarly, but not quite the same, as our previous (not-quite correct) conclusion that multiplication is composition. Instead, this says that multiplication gives a result whose associated transformation is the composition of the associated transformations of the factors.

While this interpretation is more correct, it is ugly. And if you really stare at it long enough, it *basically*

Point being, this is the correct version, but don't remember it. Remember the other one.

And now we can generalize! If we tried to generalize with the not-quite-correct interpretation, we would say that $\star$ is associative iff $a\star b = a\circ b$. But what is $a\circ b$? It's something loose and

In fact, if we *tried* to get a formal deinition, we would just end up with $z \circ q = {z\cdot} \circ {q\cdot}$. This is because if we would want $z \circ q$ to represent "apply $q$ then $z$". Thus, we would define