I recently found my intuition around functors and certain types of functors was lacking, so I thought I'd write a more example-driven post to see if we can generate some intuition. The hope by the end is to have a gallery of examples we can reference every so often, and where each example illustrates some important property of a functor. Here's the table of contents:

What's A Functor?

Often times, we're exposed to the definition of a mathematical object that's been compressed and distilled many times over, which certainly makes it easier to work with... once you already know what it's getting at. A functor is no different. There are only two laws a functor must satisfy, but as we'll soon see, it takes some unpacking to understand the implications of these laws. Let's begin by inlining the definition of a functor.

A functor $F$ is a mapping between categories $\mathscr{A}$ and $\mathscr{B}$, consisting of a function on objects $\text{Obj}(\mathscr{A}) \to \text{Obj}(\mathscr{B})$ and, for each $A, A' \in \mathscr{A}$, a function on morphisms $\mathscr{A}(A, A') \to \mathscr{B}(F A, F A')$ satisfying the following laws:

We often use $F$ to denote both the mapping on objects and the mapping on morphisms, as it's usually clear from context.

One subtlety to note here is that we have a family of functions on morphisms—we don't have a single function from all morphisms in $\mathscr{A}$ to morphisms in $\mathscr{B}$. This can lead to some nonintuitive behavior when we begin to consider properties like fullness and faithfulness (stay tuned for a future post).

Functor Or Not Functor?

To build some intuition, in this section we'll play a game of Functor or Not Functor.

<aside> ⚙ In each example below, the functor $\color{blue}F$ will be defined by the blue arrows from $\mathscr{A}$ to $\mathscr{B}$. If we'd like a name to describe objects, we'll use letters to denote them, but when we don't care to address them, we'll use dots.

</aside>

Example #1: Vacuity

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/f642536e-08ce-41cd-adf5-b2831034380d/IMG_121CDFD4397A-1.jpeg

Above, we have the functor between two empty categories. All of the functor laws quantify over objects in $\mathscr{A}$, so we have this mapping is vacuously a functor.

Functor? $\color{green}\checkmark$

Example #2: Just Identities

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/1e341495-6cf6-42d4-a185-a0eccc3005b2/IMG_F181205E69C4-1.jpeg

We have that $F(1_A) = 1_B = 1_{F A}$, so we preserve identity morphisms, and the only composite we have to check is $F(1_A ; 1_A) = F(1_A) = 1_B = 1_B ; 1_B = F(1_A) ; F(1_A)$, so we again have a functor.

Functor? $\color{green}\checkmark$