What is an Operad? Part 2

Last week we introduced the definition of an operad: it's a sequence $\mathcal{O}(1),\mathcal{O}(2), \mathcal{O}(3),\ldots$ of sets or vector spaces or topological spaces or most anything you like (whose elements we think of as abstract operations), together with composition maps $\circ_i\colon \mathcal{O}(n)\times\mathcal{O}(m)\to\mathcal{O}(n+m-1)$ and a way to permute the inputs using symmetric groups. We also defined an algebra over an operad, which a way to realize each abstract operation as an actual operation. Now it's time for some examples!

The Associative and Commutative Operads

Suppose $V$ is a vector space over a field $\mathbb{k}$. For each $n\geq 1$, define Assoc$(n)$ to be the 1-dimensional vector space generated by the tree with $n$ leaves. And let's not worry about permuting the leaves---there's no action of the symemtric group $S_n$ here. (Such operads are called non-symmetric operads.)
The $\circ_i$ composition is tree grafting, as introduced last time For example, to describe the compositions $$\circ_i\colon \text{Assoc}(2)\times \text{Assoc}(2)\to \text{Assoc}(3), \qquad i=1,2$$ it's enough to say where 𝖸$\circ_1$𝖸 and 𝖸$\circ_2$𝖸 land. Here, I'm using 𝖸 to depict the 2-to-1 operation that generates $\text{Assoc}(2)$. But there's only one option! Up to a scalar multiple, there's only one 3-to-1 tree in $\text{Assoc}(3)$! In other words, the following trees must be equal
Now, what's an algebra over this operad? As we saw last time, it's a collection of maps $\varphi\colon \text{Assoc}(n)\to\text{End}_V(n)$ for each $n=1,2,\ldots$ that's compatible with the $\circ_i$. Let's define $m:=\varphi(𝖸)\colon V\times V\to V$ to be the image of the 2-to-1 operation 𝖸. Compatibility tells us that the first and third equalities hold: $$\varphi(𝖸)\circ_1\varphi(𝖸)=\varphi(𝖸\circ_1 𝖸)=\varphi(𝖸\circ_2 𝖸)=\varphi(𝖸)\circ_2\varphi(𝖸)$$ while the second equality holds from the picture above. This amounts to the statement that $$m(m(v_1,v_2),v_3)=m(v_1,m(v_2,v_3))$$ for all $(v_1,v_2,v_3)\in V^3$, or writing $v_1\cdot v_2$ instead of $m(v_1,v_2)$, $$(v_1\cdot v_2)\cdot v_3= v_1\cdot(v_2\cdot v_3).$$ This shows that $m$ is an associative product on $V$! In other words, an algebra over the operad Assoc is an associative algebra.
We didn't consider a symmetric group action, but if we do, and if we define it to be trivial (i.e. $\sigma f=f$ for all $\sigma\in S_n$ and all $n$-ary operations $f$) then $v_1\cdot v_2= v_2\cdot v_1$ for all $v_1,v_2\in V$ since the two trees on the left must be equal. This operad is called the Comm operad, and an algebra over it is a commutative algebra.

The Associahedra Operad

The associahedra are a sequence of polytopes that encode operations that are associative up to homotopy. Let's look at an example. Suppose $X$ is a topological space and let $a,b\colon I\to X$ be loops based at point in $X$. (That is, $a$ and $b$ are continuous functions, both of which send $0,1\in I$ to the same point in $X$.) The product $a\cdot b$ gives us a new loop by "going around $a$ and $b$ each at twice the original speed." We can think of traversing $a$ in the first half-second, then traversing $b$ in the second half. This gives us a 2-to-1 operation $\Omega X\times \Omega X\to \Omega X$ where $\Omega X$ denotes the space of all based loops of $X$.
Is this operation associative? Well, if we have three loops $a,b$ and $c$, there are two options:
two loops.jpg
Here, $(a\cdot b)\cdot c$ means "do $a$ on the first quarter of the interval, and do $c$ on the second half," while $a\cdot(b\cdot c)$ means "do $a$ on the first half of the interval and do $c$ on the last quarter." These two loops are not equal, so this "multiplication" is not associative. But we can get from one loop to the other simply by adjusting the speed at which we traverse $a$ (and $c$)! In other words, we can go from $(a\cdot b)\cdot c$ to $a\cdot(b\cdot c)$ continuously by traveling around $a$ a little slower and traveling around $c$ a little faster. This defines a homotopy between the two loops, which we can represent as a line segment, called $K_3$, joining two points.
The vertices represent the two loops $(a\cdot b)\cdot c$ and $a \cdot(b\cdot c)$, and every point in between represents an intermediate loop. For example, the midpoint represents the loop $a\cdot b\cdot c$ in which $a, b$ and $c$ are all traversed in equal time.

Now what happens if you want to take the product of four loops $a,b,c,d$?! There are five ways to parenthesize four letters, so we have five different vertices. Some of these can be connected by edges using a homotopy, which gives us the boundary of a pentagon. Now it turns out that you can get from $((ab)c)d$ to $a(b(cd))$ via one of two homotopies, depicted as the red and blue paths below. What's more, you can get from any point on the blue path to a point on the red path in a continuum of ways. In short, we get a continuum of paths between the red and blue paths, which sweeps out the face of the pentagon! So the gray region is really a homotopy between homotopies. All the ways you can multiply four loops is captured by this 2-dimensional polytope, which we call $K_4$.

Now the next polytope $K_5$ has one vertex for each of the 14 ways way you can parenthesize five letters. There are 21 edges (corresponding to homotopies) and 9 faces (homotopies between homotopies) and 1 solid interior (a homotopy between the homotopies between the homotopies)!
And the list goes on. The polytopes $K_2,K_3,K_4,\ldots$ form an non-symmetric operad (where $K_1=\varnothing$) with composition being the inclusion of faces. Each $K_n$ is $n-2$-dimensional and the vertices represent the ways of putting parentheses around $n$ letters.
An algebra over this operad is called an $A_\infty$ space, first introduced by Jim Stasheff in the early sixties. (Take note of the word "space!" unlike our previous examples, the $n$-ary operations form a topological space* rather than a vector space!) The "A" stands for "associative" and the infinity reminds us of the infinite string of homotopies between homotopies between homotopies between homotopies between.... And the associahedra are of algebraic, geometric, and combinatorial interest, too! For instance, take a look at this survey by J. L. Loday.

The Little k-Cubes Operad

Closely related to the associahedra is the little $k$-cubes operad, where $k>0$ is a fixed integer. In this example, the set $\mathcal{O}(n)$ of $n$-ary operations forms a topological space---it's the space of all labeled configurations of $n$ $k$-dimensional rectangles within the unit $k$-cube. For example, when $k$=2, here's a picture of a point in $\mathcal{O}(5)$.
So $\mathcal{O}(5)$ is the topological space of all such configurations. That is, if we move the rectangle #4 just a little bit, the new picture we get is a new point in the space $\mathcal{O}(5)$. The $\circ_i$ composition is given by insertion of one picture into the $i$th rectangle of the other, then relabeling. For example
This operad---and, in fact, the original definition of an operad---appears in a seminal paper by topologist Peter May called The Geometry of Iterated Loop Spaces. In short, May answered the question, "Does a topological space have a particular structure if and only if it is (weakly homotopy equivalent to) a $k$-fold loop space?" The answer is
  • Yes! When $k=1$, the structure is that of an algebra over the associahedra oeprad.**
  • Yes! When $k>1$, the structure is that of an algebra over the little $k$-cubes operad.
In other words, an algebra over the little $k$-cubes operad and a $k$-fold loop space are the same in the eyes of a homotopy theorist. So if you're interested in homotopy theory,*** you'll want to get acquainted with the little cubes operad!

The Simplex Operad

Did you know that topological simplices form an operad?
The standard $n$-simplex is defined as $$\Delta^{n-1}=\{(p_1,\ldots,p_n)\in \mathbb{R}^{n}:\sum_{i=1}^np_i=1 \text{ and } 0\leq p_i\leq 1\}.$$ And we can think of each point $p=(p_1\ldots,p_n)$ in $\Delta_n:=\Delta^{n-1}$ as a probability distribution on a discrete set $X=\{1,2,\ldots,n\}$. For example, the point $p=(\frac{1}{2},\frac{1}{2})$ in $\Delta_2$ can represent the distribution of a fair coin toss, while $q=(\frac{1}{6},\ldots,\frac{1}{6})$ in $\Delta_6$ might represent the distribution of rolling a six-sided die.
What's the composition $\circ_i\colon \Delta_n\times\Delta_m\to\Delta_{n+m-1}$? As an example, suppose $m=6$ and $n=2$ with $p$ and $q$ given as above. To compute $p\circ_2 q$, first multiply each of the entries of $q$ by $\frac{1}{2}$, then stick the result in the second entry of $p$.
Notice, the sum of the entries on the right-hand side add up to 1! So we get a bona fide point in $\Delta_{7}$. More generally, I like to think of $p$ as a $n$-ary tree whose leaves are labeled by the $p_i$. Then $p\circ_i q$ is obtained by "painting" the leaves of $q$ with "$p_i$" and then grafting the result onto the $i$th leaf of $p$. For example, the above composition can be pictured as
Convex subsets of $\mathbb{R}^n$ are one example of an algebra over this operad, and this plays a very cool role in information theory. In a wonderful 2011 paper, John Baez, Tobias Fritz, and Tom Leinster used the simplex operad to provide a categorical/topological characterization of Shannon entropy. Baez has a nice summary of their work in this blog post, and Leinster outlined their use of the simplex operad in a recent talk at CIRM.

Other Examples

We've only looked a few examples of operads, but there are tons more! There are cyclic operads (think: Frobenius algebras), modular operads (think: moduli spaces), cacti operads (think: string topology), a phylogenetic operad (think: biology), and even a swiss cheese operad. And hey, why stop at operations with only one output? If we consider $n$-to-$m$ operations, we get something called a properad. For example, Riemann surfaces of genus $g$ with $n$ holes for inputs and $m$ holes for outputs form a properad. And an algebra over this properad is a conformal field theory. And we might even consider the disjoint union of such $n$-to-$m$ operations--called a PROP. And algebra over that gadget is a topological quantum field theory. The list goes on!

Interested in reading more? Here are a few places to start:


*But there is an algebraic analogue! We can view each $K_n$ as a CW complex and consider the cellular chain complex of each. These chain complexes assemble into a new operad which is algebraic in nature---each collection of $n$-ary operations forms a differential graded algebra. This operad is called the $A_\infty$ operad and an algebra over it is an $A_\infty$-algebra. For more on $A_\infty$-algebras, check out Homotopy + Algebra = Operad by Bruno Vallette and Introduction to $A$-infinity Algebras and Modules by Bernhard Keller.

**There's a sense in which the associahedra operad and the little $1$-cubes operad (a.k.a the little intervals operad) are the same.

***Already doing homotopy-things? Be sure to say hi to the folks over at MathOverflow's homotopy chat room!


What is an Operad? Part 1

If you browse through the research of your local algebraist, homotopy theorist, algebraic topologist or―well, anyone whose research involves an operation of some type, you might come across the word "operad." But what are operads? And what are they good for? Loosely speaking, operads―which come in a wide variety of types―keep track of various "flavors" of operations. Historically, they arose from a quest to understand $k$-fold loop spaces in homotopy theory. I'll say a little more about this next time, when we'll look at some examples and applications. In today's post, I simply want to present the definition of an operad. To start, what do I mean by "flavors" of operations?

Let's think about multiplication on an algebra. An algebra is a vector space $V$ equipped with a bilinear map \begin{align*} m\colon V\times V&\longrightarrow V\\ (a,b)&\longmapsto m(a,b) \end{align*} which we can think of as multiplication, so let's write $a\cdot b$ instead of $m(a,b)$. (And if we want a unital algebra, we may ask for an element $1\in V$ so that $1\cdot a=a=a\cdot 1$ for all $a\in V$.) Now, depending on what relations we ask $m$ to satisfy, our algebra $V$ is given different names. For example, if we ask that $$(a \cdot b)\cdot c = a \cdot (b\cdot c)$$ then $V$ is called an associative algebra. If we also ask that $$a\cdot b = b\cdot a$$ then $V$ is a commutative algebra. The real line $\mathbb{R}$ with the usual multiplication is an example of a commutative algebra. On the other hand, if―and let's now think of $m(a,b)$ as a bracket $[a,b]$―we ask that $$[a,b]=-[b,a] \qquad\text{and}\qquad [a,[b,c]]=[[a,b],c]+[b,[a,c]]$$ then $V$ is called a Lie algebra. An example of a Lie algebra is all vectors in $\mathbb{R}^3$ together with the cross product. Behind each of these algebras is a particular operad that encodes the "flavor" of the operation $m\colon V\times V\to V$. How so? Let's think of the 2-to-1 map $m$ as a binary tree:
More abstractly, let’s call anything with $n$ inputs and 1 output an "$n$-to-1 operation" or an "$n$-ary operation."
There's a way to compose operations. For instance, if $f$ is a 3-ary operation and $g$ is a 4-ary operation, we can combine them to get a 6-ary operation: just use the output of $g$ as one of the inputs of $f$:
Notice I've grafted $g$ on the second leaf of the tree depicting $f$, so I'm calling that composition "$\circ_2$." Also notice how the leaves are relabeled after the composition. And there are two other possibilities, $f\circ_1g$ and $f\circ_3 g.$
In general, there are $n$ ways to compose an $m$-ary operation with an $n$-ary operation and the result is always an $m+n-1$-ary operation. An operad is the collection of all such operations, together with the compositions. These compositions should satisfy three very sensible axioms that are easy to understand pictorially, but a mess to write down. So let's look at some pictures! To start, suppose we're given operations $f,g$ and $h$.

Axiom 1:
Composition behaves nicely.

Let's say we want to stick $h$ onto $f\circ_2 g$. How many ways can we do this? There are three options: (case 1) we can stick $h$ somewhere to the left of $g$, or (case 2) we can stick $h$ on $g$ itself, or (case 3) we can stick $h$ somewhere to the right of $g$. The picture below is an example of case 1. Grafting $h$ onto the first leaf of $f\circ_2 g$ gives us the first equals sign. But we could have obtained the tree in the middle (the one with 7 leaves) in a different way: first graft $h$ to the first leaf of $f$, then graft $g$ onto the third leaf of the new composition, $f\circ_1 h$. And that gives us the second equals sign. Conclusion? $(f\circ_2 g)\circ_1h=(f\circ_1 h)\circ_3g$.
Now, what about case 2? Grafting $h$ on $g$ (while $g$ is already attached to $f$) should be the same as first grafting $h$ on $g$ (before $g$ is attached to $f$), and then inserting the new operation $h\circ g$ into $f$. For example, $(f\circ_2 g)\circ_3h = f\circ_2(g\circ_2h).$
Finally, in case 3, Inserting $h$ to the right of $g$ (while $g$ is already attached to $f$) should be the same as first inserting $h$ on $f$, and then attaching $g$. For example, $(f\circ_2)g\circ_6 h= (f\circ_3h)\circ_2 g.$

Axiom 2:
Permutations behave nicely.

If we like, we can permute the inputs of any $n$-ary operation using elements in the symmetric group $S_n$. For example, if $f$ is a 3-ary operation and $\sigma=(123)\in S_3$, then $\sigma f$ is a new 3-ary operation given by
And what if we want to compose this with a 2-ary operation , $g$ whose inputs have also been permuted? This axiom requires that first twisting $f$ and $g$ (individually) and then composing is the same as first composing and then twisting the new tree in an appropriate way. For example if $\tau=(12)\in S_2$ then we must have $\sigma f \circ_2 \tau g=(\sigma\circ_2 \tau)(f\circ_{\sigma(1)}g)$.
where $\sigma\circ_2\tau$ is the permutation, "do $\sigma$, but replace 2 by $\tau$."

Axiom 3: There's a unit
(which behaves nicely).

Lastly, we require the existence of a 1-ary operation, which I'll call 1, that serves as an identity. For instance, $f\circ_3 1=f=1\circ_1 f$.

The Definition

And there you have it! An operad is a collection of 1,2,3,$\ldots$-ary operations that can be composed and permuted à la the sensible axioms above. Writing this down is a horrible mess, but let's do it for fun. To start, let's think of all $n$-ary operations as forming a set denoted by $\mathcal{O}(n)$. The definition is as follows

Definition: An operad is a sequence of sets $\mathcal{O}=\{\mathcal{O}(1),\mathcal{O}(2),\mathcal{O}(3)\ldots\}$ together with composition functions $$\circ_i\colon \mathcal{O}(n)\times \mathcal{O}(m)\to\mathcal{O}(m+n-1)$$ satisfying the following:

  1. For all $f\in\mathcal{O}(n)$, $g\in\mathcal{O}(m)$, and $h\in\mathcal{O}(p)$, $$ (f\circ _j g)\circ_i h= \begin{cases} (f\circ_i h)\circ_{j+p-1}g &\text{if $1-\leq i \leq j-1$} \\[5pt] f\circ_j(g\circ_{i-j+1}h) &\text{if $j\leq i\leq n+j-1$}\\[5pt] (f\circ_{i-m+1}h)\circ_jg &\text{if $i\geq n+j$} \end{cases} $$

  2. Each $\mathcal{O}(n)$ has an action of the symmetric group $S_n$, \begin{align*} S_n\times \mathcal{O}(n)&\longrightarrow \mathcal{O}(n)\\ (\sigma,f) &\longmapsto \sigma f \end{align*} such that for all $f\in\mathcal{O}(n)$ and $g\in \mathcal{O}(m)$, and for all $\sigma\in S_n$ and $\tau\in S_m,$ $$\sigma f\circ_i\tau g=(\sigma\circ_i\tau )(f\circ_{\sigma(i)} g) \qquad 1\leq i \leq n$$ where $\sigma\circ_i\tau$ is the block permutation, "replace the $i$th entry of $\sigma$ with $\tau$."

  3. There exists $1\in\mathcal{O}(1)$ (think of it as the "identity operation") so that for every $n$ and for every $f\in\mathcal{O}(n)$, $$1\circ_1 f=f \circ_i 1=f \qquad 1\leq i \leq n.$$
In fact, the $\mathcal{O}(n)$ need not be sets. They can be vector spaces, or topological spaces, or chain complexes, or any kind of object where "$\mathcal{O}(n)\times\mathcal{O}(m)$" makes sense. (In general, an operad can be defined in any symmetric monoidal category.) In those cases, we ask that the $\circ_i$ and $S_n$ action be the appropriate type of map: linear transformations, or continuous functions, or chain maps, for instance.


Here's the flagship example of an operad. Fix a vector space $V$ and for each $n=1,2,\ldots$, define $$\text{End}_V(n):=\text{hom}(V^n,V)$$ to be the vector space of all multilinear maps $V^{n}\to V$. Then $\text{End}=\{\text{End}_V(1), \text{End}_V(2),\ldots \}$ forms an operad called the endomorphism operad. The composition \begin{align*} \circ_i\colon \text{End}_V(n)\times \text{End}_V(m)&\longrightarrow \text{End}_V(n+m-1)\\ (f,g)&\longmapsto f\circ_i g \end{align*} is the map $f\circ_i g\colon V^{n+m-1}\to V$ given by "use the output of $g$ as the $i$th input of $f$." For example, if $n=3$ and $m=2$, then $$(f\circ_2g)(a,b,c,d)=f(a,g(b,c),d).$$ And the action of the symmetric group simply permutes the inputs. Example? If $\sigma=(123)\in S_3$, then $$\sigma f (a,b,c)=f(c,a,b).$$

But wait, there's more!

The reason that End$_V$ is so important is because it helps us regard abstract operations as actual operations. You see, operads aren't very interesting on their own---just like groups aren't very interesting until you look at a representation of the group (or let them act on something). Operads become useful when each abstract operation is realized as a concrete operation, and we do this by assigning each $n$-ary operation $f\in \mathcal{O}(n)$ a map $V^n\to V$. Such an assignment assembles into a collection of maps $$\{\varphi_n\colon \mathcal{O}(n)\to\text{End}_V(n)\},$$ and we ask that each $\varphi_n$ be compatible with the $\circ_i$ and $S_n$ action. This assembly is called an algebra over $\mathcal{O}$ or an $\mathcal{O}$-algebra. Next time, for example, we'll chat about an operad called Assoc. An algebra over that operad is precisely an associative algebra! We'll look at other examples, too: topological simplices, the associahedra, little $k$-cubes, and some Riemann surfaces all form operads. And the resulting algebras over them are quite interesting.

Stay tuned!

Math Emojis

I love math

It's so cool.

Started a new research project!

Let $\epsilon< 0$?!*

Finally know what a topos is.

OMG category theory.

Zorn's Lemma is equivalent to the Axiom of Choice?

Tychonoff's theorem is equivalent to the Axiom of Choice?

Is everything equivalent to the Axiom of Choice?

Wow. Math is hard.

What language is this?

Seriously, what do these symbols mean?

I literally know nothing.


I know epsilon's not negative.


Gah! Must... focus...

Okay, I have an idea for a proof.

Ugh. Dumb idea.

I have another idea. Please work. Pleeeeeease.

Grrrrr! None of my ideas are working!

Why is math so hard?

Because it's the language of the universe?

Oh. That's kinda... amazing.

Alright, I can do this.

Let me try one more time.

But first, coffee.

And chocolate.

I love chocolate.

OMG my proof worked!


I love math.

It's so cool.

Started a new research project!



* "Let ε < 0" is officially known as The World's Shortest Math Joke.

The Yoneda Embedding

The Yoneda Embedding

Last week we began a discussion about the Yoneda lemma. Though rather than stating the lemma (sans motivation)we took a leisurely stroll through an implication of its corollaries - the Yoneda perspective, as we called it: An object is completely determined by its relationships to other objects, i.e. by what the object "looks like" from the vantage point of each object
in the category.

But this left us wondering, What are the mathematics behind this idea? And what are the actual corollaries? In this post, we'll work to discover the answers.

Read More

The Yoneda Perspective

The Yoneda Perspective

In the words of Dan Piponi, it "is the hardest trivial thing in mathematics." The nLab catalogues it as "elementary but deep and central," while Emily Riehl nominates it as "arguably the most important result in category theory." Yet as Tom Leinster has pointed out, "many people find it quite bewildering."And what are they referring to?

The Yoneda lemma.

"But," you ask, "what is the Yoneda lemma? And if it's just a lemma then - my gosh - what's the theorem?"

Read More

Dear Autocorrect... (Sincerely, Mathematician)

Dear Autocorrect... (Sincerely, Mathematician)

Dear Autocorrect,


"Topos theory" is not the theory of tops. Or coats or shoes or hats or socks or gloves or slacks or scarves or shorts or skorts or--um, actually, what is topos theory?

Zorn’s lemma” is not a result attributed to corn. Neither boiled corn, grilled corn, frozen corn, fresh corn, canned corn, popped corn, nor unicorns. Though I'm sure one of these is equivalent to the Axiom of Choice.

Read More

Commutative Diagrams Explained

Commutative Diagrams Explained

Have you ever come across the words "commutative diagram" before? Perhaps you've read or heard someone utter a sentence that went something like

"For every [bla bla] there exists
a [yadda yadda] such that
the following diagram commutes."

and perhaps it left you wondering what it all meant.

Read More

Some Notes on Taking Notes

Some Notes on Taking Notes

A quick browse through my Instagram account and you might guess that I take notes. Lots of notes. And you'd be spot on! For this reason, I suppose, I am often asked the question, "How do you do it?!" Now while I don't think my note-taking strategy is particularly special, I am happy to share! I'll preface the information by stating what you probably already know: I LOVE to write.* I am a very visual learner and often need to go through the physical act of writing things down in order for information to "stick." So while some people think aloud (or quietly), 

I think on paper.

Read More

"One-Line" Proof: Fundamental Group of the Circle

"One-Line" Proof: Fundamental Group of the Circle

Once upon a time I wrote a six-part blog series on why the fundamental group of the circle is isomorphic to the integers. (You can read it here, though you may want to grab a cup of coffee first.) Last week, I shared a proof* of the same result. In one line. On Twitter. I also included a fewer-than-140-characters explanation. But the ideas are so cool that I'd like to elaborate a little more.

Read More



One of my students recently said to me, "I'm not good at math because I'm really slow." Right then and there, she had voiced what is one of many misconceptions that folks have about math.

But friends, speed has nothing to do with one's ability to do mathematics. In particular, being "slow" does not mean you do not have the ability to think about, understand, or enjoy the ideas of math.

Let me tell you....

Read More