# Naming Functors

Mathematicians are a creative bunch, especially when it comes to naming things. And category theorists are no exception. So here's a little spin on this xkcd comic. It's inspired by a recent conversation I had on Twitter and, well, every category theory book ever.

(They say imitation is the sincerest form of flattery.)

# 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
the following diagram commutes."

and perhaps it left you wondering what it all meant. I was certainly mystified when I first came across a commutative diagram. And it didn't take long to realize that the phrase "the following diagram commutes" was (and is) quite ubiquitous. It appears in theorems, propositions, lemmas and corollaries almost everywhere!

So what's the big deal with diagrams? And what does commute mean anyway?? It turns out the answer is quite simple.

Do you know what a composition of two functions is?

Then you know what a commutative diagram is!

## A commutative diagram is simplythe picture behind function composition.

Truly, it is that simple. To see this, suppose $A$ and $B$ are sets and $f$ is a function from $A$ to $B$. Since $f$ maps (i.e. assigns) elements in $A$ to elements in $B$, it is often helpful to denote that process by an arrow.

And there you go. That's an example of a diagram. But suppose we have another function $g$ from sets $B$ to $C$, and suppose $f$ and $g$ are composable. Let's denote their composition by $h=g\circ f$. Then both $g$ and $h$ can be depicted as arrows, too.

But what is the arrow $A\rightarrow C$ really? I mean, really? Really it's just the arrows $f$ and $g$ lined up side-by-side.
But maybe we think that drawing $h$'s arrow curved upwards like that takes up too much space, so let's bend the diagram a bit and redraw it like this:

This little triangle is the paradigm example of a commutative diagram. It's a diagram because it's a schematic picture of arrows that represent functions. And it commutes because the diagonal function IS EQUAL TO the composition of the vertical and horizontal functions, i.e. $h(a)=g(f(a))$ for every $a\in A$. So a diagram "commutes" if all paths that share a common starting and ending point are the same. In other words, your diagram commutes if it doesn't matter how you commute from one location to another in the diagram.

But be careful.

Not every diagram is a commutative diagram.

The picture on the right is a bona fide diagram of real-valued functions, but it is defintitely not commutative. If we trace the number $1$ around the diagram, it maps to $0$ along the diagonal arrow, but it maps to $1$ itself if we take the horizontal-then-vertical route. And $0\neq 1$. So to indicate if/when a given diagram is commutative, we have to say it explicitly. Or sometimes folks will use the symbols shown below to indicate commutativity:

I think now is a good time to decode another phrase that often accompanies the commutative-diagram parlance. Returning to our $f,g,h$ example, we assumed that $f,g$ and $h=g\circ f$ already existed. But suppose we only knew about the existence of $f:A\to B$ and some other map, say, $z:A\to C$. Then we might like to know, "Does there exist a map $g:B\to C$ such that $z=g\circ f$? Perhaps the answer is no. Or perhaps the answer is yes, but only under certain hypotheses.* Well, if such a $g$ does exists, then we'll say "...there exists a map $g$ such that the following diagram commutes:

but folks might also say

"...there exists a map $g$ such that $z$ factors through $g$"

The word "factors" means just what you think it means. The diagram commutes if and only if $z=g\circ f$, and that notation suggests that we may think of $g$ as a factor of $z$, analogous to how $2$ is a factor of $6$ since $6=2\cdot 3$.

By the way, we've only chatted about sets and functions so far, but diagrams make sense in any context in which you have mathematical objects and arrows. So we can talk about diagrams of groups and group homomorphisms, or vector spaces and linear transformations, or topological spaces and continuous maps, or smooth manifolds and smooth maps, or functors and natural transformations and so on. Diagrams make sense in any category.

And as you can imagine, there are more complicated diagrams than triangular ones. For instance, suppose we have two more maps $i:A\to D$ and $j:D\to C$ such that $h$ is equal to not only $g\circ f$ but also $j\circ i$. Then we can express the equality $g\circ f=h=j\circ i$ by a square:

Again, commutativity simply tells us that the three ways of getting from $A$ to $C$ are all equivalent. And diagrams can get really crazy and involve other shapes too. They can even be three-dimensional! Here are some possibilities where I've used bullets in lieu of letters for the source and target of the arrows.
No matter the shape, the idea is the same: Any map can be thought of as a path or a process from $A$ to $B$, from start to finish. And we use diagrams to capitalize on that by literally writing down "$A$" and "$B$" (or "$\bullet$" and "$\bullet$") and by literally drawing a path---in the form of an arrow---between them.

Next time we'll see that diagrams not only help us keep track of compositions of maps, but are themselves the image of some map.

How's that for a brain teaser? A map of WHAT? you may be wondering. And what in the world are the domain and codomain? It turns out that the answer is fairly simple---and pretty cool!---using the language of category theory.

Until next time!

*Because this is such a great question, many mathematical results take on this form (Though the sets may instead be groups or topological spaces or manifolds or....) and give any necessary and/or sufficient conditions for which such a $g$ will exists. For example, check out the commutative diagram in this intuitive discussion on the first isomorphism theorem in group theory.
1 Comment

# crumbs!

Not too long ago, my college-algebra students and I were chatting about graphing polynomials. At one point during our lesson, I quickly drew a smooth, wavy curve on the board and asked,

"How many roots would a polynomial with this graph have? Five? It crosses the x-axis five times."

Students: Um, it's not six?

Me: What? Oh, yes. Six. I missed one. Listen, on that note, let me give you some advice, okay? This is serious, and you should take this with you for the rest of your life. So please pay attention.

[looks students in their eyes]

There are only two --- NO shoot! It's three.... --- there are only THREE types of people in the world.

[ineffectively pauses for effect]

Those who can count.
Those who cannot.

Students: [stare blankly]

Student #1: What?

Student #2: [leans over to Student #1 and whispers]
I think she's saying she can't count.

Sigh

Apparently I can neither count NOR tell jokes about counting (the comic below might be relevant), but the rest of the lecture was great. And I bought two -- not three, heh -- fancy cupcakes afterwards, so I'd say everything turned out just fine.

;)

Comment

# 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.

# "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.

# crumbs!

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....

# crumbs!

Physicist Freeman Dyson once observed that there are two types of mathematicians: birds -- those who fly high, enjoy the big picture, and look for unifying concepts -- and frogs -- those who dwell on the ground, find beauty in the scenery close by, and enjoy the details.

Of course, both vantage points are essential to mathematical progress, and...

# Group Elements, Categorically

On Monday we concluded our mini-series on basic category theory with a discussion on natural transformations and functors. This led us to make the simple observation that the elements of any set are really just functions from the single-point set {✳︎} to that set. But what if we replace "set" by "group"? Can we view group elements categorically as well?

The answer to that question is the topic for today's post, written by guest-author Arthur Parzygnat.

# What is a Natural Transformation? Definition and Examples, Part 2

Continuing our list of examples of natural transformations, here is: Example #2 (double dual space of a vector space) and Example #3 (representability and Yoneda's lemma).

# What is a Natural Transformation? Definition and Examples

I hope you have enjoyed our little series on basic category theory. (I know I have!) This week we'll close out by chatting about natural transformations which are, in short, a nice way of moving from one functor to another. If you're new to this mini-series, be sure to check out the very first post, What is Category Theory Anyway? as well as What is a Category? and last week's What is a Functor?

# crumbs!

I was at the grocery store earlier today, minding my own business, and while I was intently studying the lentil beans (Why are there so many options?) a man came down the aisle, pushing a cart with him. He then stopped in front of me, turned, looked me directly in the eyes and said...