The main reason _mathematicians_ like category theory is that there are tons of categories where the objects are 'mathematical gadgets' and the morphisms are maps between these. Thus, category theory helps organize the study of math. Some examples include:

* \\(\mathbf{Set}\\), the category with sets as objects and functions as morphisms.

* \\(\mathbf{Preord}\\), the category with preorders as objects and monotone functions as morphisms.

* \\(\mathbf{Poset}\\), the category with posets as objects and monotone functions as morphisms.

* \\(\mathbf{Cat}\\), the category with categories as objects and functors as morphisms.

* \\(\mathbf{Mon}\\), the category with monoids as objects and monoid homomorphisms as morphisms.

* \\(\mathbf{Grp}\\), the category with groups as objects and group homomorphisms as morphisms.

I could go on a lot longer, but I'm mainly sticking to examples we've already discussed. And since this is a class on category theory, all these examples can be seen as various kinds of categories!

For example, we can think of a set as a category with only identity morphisms - the set gives the objects. A preorder is a category where there's at most one morphism between any pair of objects, and a poset is a preorder where isomorphic objects are equal. We can think of a monoid as category with one object: the elements of the monoid give the morphisms. From this point of view, a group is a category with one object whose morphisms are all isomorphisms!

One thing mathematicians like is functors between categories of mathematical gadgets. Often these functors come in pairs: a left adjoint and a right adjoint! The right adjoint usually 'forgets' structure, so we call it a 'forgetful functor'. The left adjoint usually puts this structure back in, and we call it a 'free functor'. I should warn you right now that 'forgetful' and 'free' don't have precise definitions: rather, they convey a certain way of thinking about right and left adjoints.

To pick up this way of thinking, you need to think about examples. So, let's look at some!

There's a functor

\[ \text{Ob}: \mathbf{Cat} \to \mathbf{Set} \]

that forgets everything about a category except its objects. In other words, it sends any category \\(\mathcal{C}\\) to its set of objects \\(\mathrm{Ob}(\mathcal{C})\\), and sends any functor \\(F: \mathcal{C} \to \mathcal{D}\\) to the function it defines on objects, which I've been calling just \\(F : \mathrm{Ob}(\mathcal{C}) \to \mathrm{Ob}(\mathcal{D})\\). A more systematic name for it is \\(\mathrm{Ob}: \mathrm{Ob}(\mathcal{C}) \to \mathrm{Ob}(\mathcal{D})\\).

It's easy to check that \\(\mathrm{Ob}\\) is a functor. More interestingly, it has a left adjoint

\[ \mathrm{Disc}: \mathbf{Set} \to \mathbf{Cat} \]

which turns a set into a category! It does this in a pretty dull way, though - I already hinted at how: it takes any set \\(S\\) and produces a category whose set of objects is \\(S\\), with only identity morphisms. This is usually called the **discrete category on the set \\(S\\)**, but we could also call it the **free category on the set \\(S\\)**.

Since \\(\mathrm{Disc}\\) is a functor, it must also send any function \\(f : S \to T\\) between sets to a functor

\[ \mathrm{Disc}(f) : \mathrm{Disc}(S) \to \mathrm{Disc}(T) \]

between the corresponding discrete categories. It works in a simple way: on objects this functor is just the function \\(f\\), and it does what it has to on morphisms, which are all identity morphisms: identities have to be sent to identities.

It's easy to check that \\( \mathrm{Disc}: \mathbf{Set} \to \mathbf{Cat} \\) is a functor. More interestingly, it's the left adjoint of \\( \mathrm{Ob}: \mathbf{Cat} \to \mathbf{Set}\\). Let's think about this!

Saying that \\(\mathrm{Disc}\\) is the left adjoint of \\(\mathrm{Ob}\\) means there's a natural one-to-one correspondence

\[ \alpha_{S,\mathcal{C}} : \mathbf{Cat}( \mathrm{Disc}(S), \mathcal{C} ) \to \mathbf{Set}( S, \mathrm{Ob}(\mathcal{C}) ) .\]

for every set \\(S\\) and every category \\(\mathcal{C}\\). Unraveling this a bit, it means there's a natural bijection between

\[ \text{ functors } G : \mathrm{Disc}(S) \to \mathcal{C} \]

and

\[ \text{ functions } g : S \to \mathrm{Ob}(\mathcal{C}) \]

It's easy to see how this bijection should work. If you give me a functor \\(G : \mathrm{Disc}(S) \to \mathcal{C} \\), I look at what it does to objects, and that's the function \\(g\\). Conversely, if you give me a function \\(g : S \to \mathrm{Ob}(\mathcal{C}) \\), I give you the only functor \\(G : \mathrm{Disc}(S) \to \mathcal{C}\\) that equals \\(g\\) on objects: there will be no choice about what \\(G\\) does to morphisms, since \\(\mathrm{Disc}(S)\\) has only identity morphisms.

**Puzzle 162.** Show that this bijection is natural.

But this is just one of many examples!

**Puzzle 163.** Show the forgetful functor

\[ \text{Ob}: \mathbf{Cat} \to \mathbf{Set} \]

sending each category to its set of objects has a left adjoint

\[ \mathrm{Disc} : \mathbf{Set} \to \mathbf{Cat} \]

sending each set to the category with that set of objects and only identity morphisms. Show that \\(\text{Ob}\\) also has a right adjoint.

**Puzzle 164.** A poset is a special sort of preorder, and a preorder is a special sort of category. Thus, we get functors from \\(\mathbf{Poset}\\) to \\(\mathbf{Preord}\\) and from \\(\mathbf{Preord}\\) to \\(\mathbf{Cat}\\). Does the functor from \\(\mathbf{Poset}\\) to \\(\mathbf{Preord}\\) have a left adjoint, a right adjoint or both? How about the functor from \\(\mathbf{Preord}\\) to \\(\mathbf{Cat}\\)?

**Puzzle 165.** Does the forgetful functor from \\(\mathbf{Grp}\\) to \\(\mathbf{Mon}\\) have a right adjoint, a left adjoint or both?

**[To read other lectures go here.](http://www.azimuthproject.org/azimuth/show/Applied+Category+Theory#Chapter_3)**

* \\(\mathbf{Set}\\), the category with sets as objects and functions as morphisms.

* \\(\mathbf{Preord}\\), the category with preorders as objects and monotone functions as morphisms.

* \\(\mathbf{Poset}\\), the category with posets as objects and monotone functions as morphisms.

* \\(\mathbf{Cat}\\), the category with categories as objects and functors as morphisms.

* \\(\mathbf{Mon}\\), the category with monoids as objects and monoid homomorphisms as morphisms.

* \\(\mathbf{Grp}\\), the category with groups as objects and group homomorphisms as morphisms.

I could go on a lot longer, but I'm mainly sticking to examples we've already discussed. And since this is a class on category theory, all these examples can be seen as various kinds of categories!

For example, we can think of a set as a category with only identity morphisms - the set gives the objects. A preorder is a category where there's at most one morphism between any pair of objects, and a poset is a preorder where isomorphic objects are equal. We can think of a monoid as category with one object: the elements of the monoid give the morphisms. From this point of view, a group is a category with one object whose morphisms are all isomorphisms!

One thing mathematicians like is functors between categories of mathematical gadgets. Often these functors come in pairs: a left adjoint and a right adjoint! The right adjoint usually 'forgets' structure, so we call it a 'forgetful functor'. The left adjoint usually puts this structure back in, and we call it a 'free functor'. I should warn you right now that 'forgetful' and 'free' don't have precise definitions: rather, they convey a certain way of thinking about right and left adjoints.

To pick up this way of thinking, you need to think about examples. So, let's look at some!

There's a functor

\[ \text{Ob}: \mathbf{Cat} \to \mathbf{Set} \]

that forgets everything about a category except its objects. In other words, it sends any category \\(\mathcal{C}\\) to its set of objects \\(\mathrm{Ob}(\mathcal{C})\\), and sends any functor \\(F: \mathcal{C} \to \mathcal{D}\\) to the function it defines on objects, which I've been calling just \\(F : \mathrm{Ob}(\mathcal{C}) \to \mathrm{Ob}(\mathcal{D})\\). A more systematic name for it is \\(\mathrm{Ob}: \mathrm{Ob}(\mathcal{C}) \to \mathrm{Ob}(\mathcal{D})\\).

It's easy to check that \\(\mathrm{Ob}\\) is a functor. More interestingly, it has a left adjoint

\[ \mathrm{Disc}: \mathbf{Set} \to \mathbf{Cat} \]

which turns a set into a category! It does this in a pretty dull way, though - I already hinted at how: it takes any set \\(S\\) and produces a category whose set of objects is \\(S\\), with only identity morphisms. This is usually called the **discrete category on the set \\(S\\)**, but we could also call it the **free category on the set \\(S\\)**.

Since \\(\mathrm{Disc}\\) is a functor, it must also send any function \\(f : S \to T\\) between sets to a functor

\[ \mathrm{Disc}(f) : \mathrm{Disc}(S) \to \mathrm{Disc}(T) \]

between the corresponding discrete categories. It works in a simple way: on objects this functor is just the function \\(f\\), and it does what it has to on morphisms, which are all identity morphisms: identities have to be sent to identities.

It's easy to check that \\( \mathrm{Disc}: \mathbf{Set} \to \mathbf{Cat} \\) is a functor. More interestingly, it's the left adjoint of \\( \mathrm{Ob}: \mathbf{Cat} \to \mathbf{Set}\\). Let's think about this!

Saying that \\(\mathrm{Disc}\\) is the left adjoint of \\(\mathrm{Ob}\\) means there's a natural one-to-one correspondence

\[ \alpha_{S,\mathcal{C}} : \mathbf{Cat}( \mathrm{Disc}(S), \mathcal{C} ) \to \mathbf{Set}( S, \mathrm{Ob}(\mathcal{C}) ) .\]

for every set \\(S\\) and every category \\(\mathcal{C}\\). Unraveling this a bit, it means there's a natural bijection between

\[ \text{ functors } G : \mathrm{Disc}(S) \to \mathcal{C} \]

and

\[ \text{ functions } g : S \to \mathrm{Ob}(\mathcal{C}) \]

It's easy to see how this bijection should work. If you give me a functor \\(G : \mathrm{Disc}(S) \to \mathcal{C} \\), I look at what it does to objects, and that's the function \\(g\\). Conversely, if you give me a function \\(g : S \to \mathrm{Ob}(\mathcal{C}) \\), I give you the only functor \\(G : \mathrm{Disc}(S) \to \mathcal{C}\\) that equals \\(g\\) on objects: there will be no choice about what \\(G\\) does to morphisms, since \\(\mathrm{Disc}(S)\\) has only identity morphisms.

**Puzzle 162.** Show that this bijection is natural.

But this is just one of many examples!

**Puzzle 163.** Show the forgetful functor

\[ \text{Ob}: \mathbf{Cat} \to \mathbf{Set} \]

sending each category to its set of objects has a left adjoint

\[ \mathrm{Disc} : \mathbf{Set} \to \mathbf{Cat} \]

sending each set to the category with that set of objects and only identity morphisms. Show that \\(\text{Ob}\\) also has a right adjoint.

**Puzzle 164.** A poset is a special sort of preorder, and a preorder is a special sort of category. Thus, we get functors from \\(\mathbf{Poset}\\) to \\(\mathbf{Preord}\\) and from \\(\mathbf{Preord}\\) to \\(\mathbf{Cat}\\). Does the functor from \\(\mathbf{Poset}\\) to \\(\mathbf{Preord}\\) have a left adjoint, a right adjoint or both? How about the functor from \\(\mathbf{Preord}\\) to \\(\mathbf{Cat}\\)?

**Puzzle 165.** Does the forgetful functor from \\(\mathbf{Grp}\\) to \\(\mathbf{Mon}\\) have a right adjoint, a left adjoint or both?

**[To read other lectures go here.](http://www.azimuthproject.org/azimuth/show/Applied+Category+Theory#Chapter_3)**