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

These are My favorite notebooks, along with my favorite pencil. I write in notebook number "zero" during seminars and meetings. And my more carefully written day-to-day notes are kept in notebooks "one," "two" and "three."

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.

My study habits, then, are built on this fact. Of course not everyone learns in this way, so this post is not intended to be a how-to guide. It's just a here's-what-I-do guide.

With that said, below is a step-by-step process I tried to follow during my final years of undergrad and first two years of grad school.**

## Step 1

### Read the appropriate chapter/section in the book before class

I am an "active reader," so my books have tons of scribbles, underlines, questions, and "aha" moments written on the pages. I like to write while I read because it gives me time to pause and think about the material. For me, reading a mathematical text is not like reading a novel. It often takes me a long time just to understand a single paragraph! Or a single sentence. I also like to mark things that I don't understand so I'll know what to look for in the upcoming lecture.

Category Theory in Context by Emily Riehl. Illegible pencil markings by me.

I own several PDF texts too, though I prefer physical books. (It's hard to snuggle up with your computer at night.) But I like to mark up those PDFs as well. I use the notation tools available in Apple's Preview app for this.

Algebra + Homotopy = Operad By Bruno Vallette. Colorful Annotations courtesy of Apple.

## STEP 2

### Attend lecture and take notes

This step is pretty self-explanatory, but I will mention this: I write down much more than what is written on the chalkboard (or whiteboard). In fact, a good portion of my in-class notes consists of what the professor has said but hasn't written. And perhaps now is a good time to tell you...

• I used to take lecture notes with a Lamy fountain pen, then I moved on to this gel pen and also this one. Now I use a mechanical pencil (see next bullet). But I always have one red and one green pen with me. I use green for questions ("What did the prof just say?" "What does this mean?" "How is this even possible?") and red for things I really want to remember. ("Oh that's what she meant." "Here's the key!" "Of course it must be possible!") I use this green/red scheme in my books and PDFs, too.

• While taking notes at home (step 3 below) I use a Rotring 600 drafting pencil. And I love dark, silky-smooth fine lines, so I use 0.5mm 3B grade lead. To date, my favorite is this one.

• For years I took notes on lined paper, but Jeremy Kun convinced me otherwise. Nowadays lined paper makes me cringe. Instead, I use blank white printing paper for my in-class and scratch notes (I always have a clip-board with me) and these spiral-bound, unruled Maruman Mnemosyne notebooks for all other notes*** (pictured above; also see step 3 below).

• I don't use LaTeX for my everyday note-taking. (But I used to type up my homework solutions in LaTeX.) While I do enjoy typesetting math, it can be time-consuming, especially when including pictures and diagrams. Plus, I like the feel of pencil-to-paper and, admittedly, the look of my own handwriting!

My arsenal

## STEP 3

### Rewrite lecture notes at home

My in-class notes are often an incomprehensible mess of frantically-scribbled hieroglyphs. So when I go home, I like to rewrite everything in a more organized fashion. This gives the information time to simmer and marinate in my brain. I'm able to ponder each statement at my own pace, fill in any gaps, and/or work through any exercises the professor might have suggested. I'll also refer back to the textbook as needed.

Sometimes while rewriting these notes, I'll copy things word-for-word (either from the lecture, the textbook, or both), especially if the material is very new or very dense. Although this can be redundant, it helps me slow down and lets me think about what the ideas really mean. Other times I'll just rewrite things in my own words in a way that makes sense to me.

A semester's worth of notes!

As for the content itself, my notes usually follow a "definition then theorem then proof" outline, simply because that's how material is often presented in the lecture. But sometimes it's hard to see the forest for the trees (i.e. it's easy to get lost in the details), so I'll occasionally write "PAUSE!" or "KEY IDEA!" in the middle of the page. I'll then take the time to write a mini exposition that summarizes the main idea of the previous pages. I've found this to be especially helpful when looking back at my notes after several months (or years) have gone by. I may not have time to read all the details/calculations, so it's nice to glance at a summary for a quick refresher.

And every now and then, I'll rewrite my rewritten notes in the form of a blog post! Many of my earlier posts here at Math3ma were "aha" moments that are now engrained in my brain because I took the time to blog about them.

## STEP 4

### Do homework problems

Once upon a time, I used to think the following:

How can I do problems if I haven't spent a bajillion hours learning the theory first?

But now I believe there's something to be said for the converse:

How can I understand the theory if I haven't done a bajillion examples first?

In other words, taking good notes and understanding theory is one thing, but putting that theory into practice is a completely different beast. As a wise person once said, "The only way to learn math is to DO math." So although I've listed "do homework problems" as the last step, I think it's really first in terms of priority.

Typically, then, I'll make a short to-do list (which includes homework assignments along with other study-related duties) each morning. And I'll give myself a time limit for each task. For example, something like "geometry HW, 3 hours" might appear on my list, whereas "do geometry today" will not. Setting a time gives me a goal to reach for which helps me stay focused. And I may be tricking my brain here, but a specific, three-hour assignment sounds much less daunting than an unspecified, all-day task. (Of course, my lists always contain multiple items that take several hours each, but as the old adage goes, "How do you eat an elephant? One bite at a time.")

By the way, in my first two years of grad school I often worked with my classmates on homework problems. I didn't do this in college, but in grad school I've found it tricky to digest all the material alone - there's just too much of it! So typically I'd first attempt exercises on my own, then meet up with a classmate or two to discuss our ideas and solutions and perhaps attend office hours with any questions.

As far as storage goes, I have a huge binder that contains all of my rewritten notes*** from my first and second year classes. (I use sheet protectors to keep them organized according to subject.) On the other hard, I use a paper tray like this one to store my lecture notes while the semester is in progress. Once classes are over, I'll scan and save them to an external hard drive. I've also scanned and saved all my homework assignments.

Well, I think that's about it! As I mentioned earlier, these steps were only my ideal plan. I often couldn't apply them to every class -- there's just not enough time! -- so I'd only do it for my more difficult courses. And even then, there might not be enough time for steps 1 and 3, and I'd have to start working on homework right after a lecture.

But as my advisor recently told me, "It's okay to not know everything." Indeed, I think the main thing is to just do something. Anything. As much as you can. And as time goes on, you realize you really are learning something, even if it doesn't feel like it at the time.

Alright, friends, I think that's all I have to share. I hope it was somewhat informative. If you have any questions, don't hesitate to leave it in a comment below!

*Truly. I've kept a journal since I was seven years old!

**Typically, the first one or two years of grad school are much different than the latter years. (I've just finished my third year.) Once the written qualifying exams are over, less time is spent in the classroom and more time is spent on research. For that reason, my current note-taking strategy doesn't follow this four-step scheme. See next footnote.

***A word of clarification: Up until several months ago, I would rewrite my lecture notes on loose-leaf paper. But these days I don't rewrite my lecture notes because I don't take many classes! (That's just the nature of graduate school.) I do, however, learn things on my own (guided by my advisor) and therefore still take lots of notes. And that is what I use those black, spiral-bound Maruman notebooks are for.

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

# What is a Functor? Definitions and Examples, Part 2

Continuing yesterday's list of examples of functors, here is Example #3 (the chain rule from multivariable calculus), Example #4 (contravariant functors), and Example #5 (representable functors).