<<

NOTES ON THEORY

RENRENTHEHAMSTER

This set of notes presents an introduction to mainly in the context of undergraduate abstract algebra. The reader is assumed to have had prior exposure to the theory of groups, rings and modules, but no prior exposure to category theory is assumed. This set of notes will cover basic concepts such as , natural transformations, and universal properties. I would like to acknowledge Aluffi’s ”Algebra: Chapter 0” for many of the dia- grams and examples found in this set of notes.

Date: April 2017. 1 1. The Basics of Category Theory

One can imagine that the ultimate mathematician is one who can see analogies between analogies. – Stefan Banach

Often in the study of mathematics, we come across a class of sets with additional mathematical structure imposed on them; for example groups are sets which obey certain axioms, and topological spaces are sets of points obeying certain axioms. We also care alot about how these objects “talk” to each other via maps that respect the structure of these objects (e.g. for the case of groups, and continuous functions for the case of topological spaces). In a superficial sense, Category Theory is a common language that further abstracts our study of special mathematical objects. Just as cyclic groups and symmetry groups are special examples of groups, the collection of groups and the collection of rings are two examples of categories1. By de-emphasizing the specific stuctures that the objects possess, we can study, for example, what is generally meant by “” between two objects, or the “” of two objects, without caring whether they are groups, or rings, or something else. The reader will come to appreciate that many propositions that he/she has learnt or will learn are actually variations on the same theme, which could have been done in one shot using the framework of categry theory. In addition, many constructions could have been more cleanly described, and registered in the reader’s mind as “the same” if understood in category-theoretic terms. All in all, category theory can be seen as moving further up one level of abstrac- tion, where we study classes of mathematical objects (i.e. the categories, e.g. the , the , the ), and relationships between these classes (i.e. functors between categories, e.g. how the category of groups relate to the category of sets). 1.1. Key Definition and Many Examples. We begin with the most important definition of this text. Definition 1.1.1. A category C consists of: • A class ob(C) whose elements are called objects • A class Hom(C) of between objects. For every two objects A, B ∈ ob(C),we write HomC(A, B) to denote the hom-class of all mor- phisms from A to B • A binary operation called composition of morphisms, such that for any three objects A, B, C we have a map HomC(A, B) × HomC(B,C) → HomC(A, C). Composition is governed by two axioms:

1Technically the category also includes the respective homomorphisms, but this is just a mo- tivational exposition. NOTES ON CATEGORY THEORY 3

– Associativity: If f : A → B, g : B → C, h : C → D, then h(gf) = (hg)f – Identity: For every object A, there exists a 1A ∈ HomC(A, A) called the identity morphism, such that for every morphism f : A → B, we have 1Bf = f1A = f A common way of thinking about categories is to draw a schematic where arrows are used to represent morphisms of interest, such as in figure 1.1.

Figure 1.1.

When an arrow points from an object to itself, it has a special name: Definition 1.1.2. A morphism from an object to itself is called an endomor- phism. For an object A, we write EndC(A) for HomC(A, A). Here comes a series of examples. While the examples may appear increasingly abstract and random, rest assured that these examples will show up often in the remainder of the text. As such, study them carefully. Example 1.1.3. Here are some examples which should be familiar from previous study of abstract algebra. • Sets, as objects, and set-functions, as morphisms, form a category, called ‘Set’. • The category ‘Grp’ has groups as objects and group homomorphisms as morphisms. The category ‘Ab’ has abelian groups as objects and group homomorphisms as morphisms. • The category ‘Ring’ has rings as objects and ring homomorphisms as mor- phisms. The category ‘CRing’ has instead commutative rings as objects. • For a given ring R, the category ‘R-Mod’ consists of left R-modules and the category ‘Mod-R’ consists of right R-modules. The morphisms are module homomorphisms. Of course, if R is commutative, then the two categories are the same. • Topological spaces, as objects, and continuous functions, as morphisms, form a category, often called ‘Top’. Example 1.1.4. Given a set S, a preordering ≤ is a relation on S that is reflexive and transitive. Any preordered set (S, ≤) forms a category, where the objects are the members of S, the morphisms are arrows pointing from x to y whenever x ≤ y. This results in a thin category, i.e. a category with at most one morphism from an object to another. This makes it obvious how to define composition of morphisms. 4 RENRENTHEHAMSTER

As specific examples of example 1.1.4, one may consider Z with the relation ≤, or a power set with the inclusion relation ⊆, or Z+ with the divisibility relation. Here are two ways of building new categories from old ones. Example 1.1.5. Given a category C, the category is the category Cop formed by reversing all the arrows. Example 1.1.6. Given two categories C and D, the C × D is defined as follows: • The objects are pairs (A, B) where A is an object of C and B is an object of D. • The morphisms from (A, B) to (A0,B0) are pairs (f, g) where f : A → A0 is a morphism in C and g : B → B0 is a morphism in D. • Composition of morphisms is done component-wise: (f, g) ◦ (f 0, g0) = (f ◦ f 0, g ◦ g0) Here are two slightly abstract examples, but these are actually recurring exam- ples throughout this set of notes. Example 1.1.7. Given a category C and an object A of C, define the category (C ↓ A) called the slice category w.r.t. A or category of objects over A as follows:

• The objects are pairs (Z, f) where Z ∈ Ob(C) and f ∈ HomC(Z,A). Pic- torially, an object of (C ↓ A) is an arrow in figure 1.2.

Figure 1.2.

• If (Z1, f1) and (Z2, f2) are objects in (C ↓ A), then a morphism σ : (Z1, f1) → (Z2, f2) is defined to be a morphism σ : Z1 → Z2 (slight here) which makes the following diagram (figure 1.3) commute in C:

Figure 1.3. NOTES ON CATEGORY THEORY 5

• The composition of σ :(Z1, f1) → (Z2, f2) and τ :(Z2, f2) → (Z3, f3) is de- fined as follows: The commutativity of figure 1.4 implies that τσ (obtained from composition in C) makes the following diagram (figure 1.5) commute. This means τσ :(Z1, f1) → (Z3, f3) can be taken as the composition.

Figure 1.4. Figure 1.5.

Example 1.1.8. Given a category C and an object A ∈ C, define the category (A ↓ C) called the coslice category w.r.t. A or category of objects under A where the objects are pairs (f, Z) where f ∈ HomC(A, Z) and a morphism from (f1,Z1) to (f2,Z2) is a map σ : Z1 → Z2 that makes the following diagram (figure 1.6) commute:

Figure 1.6.

Example 1.1.9. (Pointed Sets) In the context of example 1.1.8, take C to be Set and A to be a set with one element, say A = {∗}. Then an object is equivalent to picking (S, s) where S is a set and s ∈ S, and a morphism (S, s) → (T, t) corresponds to a set function σ : S → T such that σ(s) = t. Hopefully the reader has gotten quite comfortable with the notion of a category. This final example is the most abstract in this section, but its importance will be unveiled shortly when we study products and . Example 1.1.10. Given a category C and two objects A, B ∈ C, define the category 2 (C ⇒ A, B) which we shall call the double slice category w.r.t. A, B as follows: • Objects are diagrams of the form shown in figure 1.7 • Morphisms between the objects shown in figure 1.8 are commutative dia- grams of the form shown in figure 1.9 Similarly, we can define the category (A, B ⇒ C) which we shall call the double coslice category w.r.t. A, B by flipping all the arrows.

2unlike all other names in this section, the author is unaware of how this category is often referred to in the literature. As such, the author made up this name. 6 RENRENTHEHAMSTER

Figure 1.7.

Figure 1.8.

Figure 1.9.

1.2. More on Morphisms. In the context of , certain set-functions are special, e.g. they might be injective, surjective, or bijective. These properties are typically defined with reference to elements of the sets involved. For example, surjectivity means every element in the codomain set is the of some element in the domain. The purpose of this section is to generalize these ideas to morphisms in category theory. In category theory, the objects are not necessarily sets, and it does not make sense to refer to “elements” belonging to an object. Instead, we have to work directly with morphisms. First, let us study more about . In set-theory, bijectivity is used synonymously with isomorphism. Although we can define bijectivity in set-theory using an element-based definition, we can also do it by talking about the existence of an inverse. In the context of category theory, where we only have morphisms on our hands, the latter approach is what generalizes.

Definition 1.2.1. Let C be a category. A morphism f ∈ HomC(A, B) is an iso- moprhism if it has a two-sided inverse under composition, i.e. ∃g ∈ HomC(B,A) such that gf = 1A and fg = 1B. NOTES ON CATEGORY THEORY 7

Several familiar properties still hold in a general category.

Proposition 1.2.2. If the morphism f : A → B has a left-inverse g1 and a right- inverse g2, then g1 = g2. In particular, inverses are unique, which we may henceforth denote by f −1.

Proof. g1 = g11B = g1(fg2) = (g1f)g2 = 1Ag2 = g2  Problem 1.2.3. Let A, B, C be objects of a category. Prove the following:

• The identity morphism 1A is an isomoprhism and is its own inverse • If f is an isomorphism, then so is f −1 with f as its inverse • If f : A → B and g : B → C are isomorphisms, then so is gf with (gf)−1 = f −1g−1 • Conclude that isomorphism is an equivalence relation Here is the definition of a familiar term. Definition 1.2.4. An automorphism is an isomorphism from A to itself. The set of automorphisms of A is denoted AutC(A) and it is a subset of EndC(A).

Corollary 1.2.5. For any object A of a category, AutC(A) is a group. Proof. Check through the axioms of a group, using some parts of problem 1.2.3 to help.  Now, let us attempt to generalize the notions of injectivity and surjectivity from set-theory to category-theory. Unfortunately, the process is not as straightforward as bijectivity. Definition 1.2.6. Let C be a category. A morphism f : A → B is a monomor- phism if it is left-cancellable, i.e. for all objects Z and morphisms α, β : Z → A which satisfy f ◦ α = f ◦ β, we have α = β. Definition 1.2.7. Let C be a category. A morphism f : A → B is a epimorphism if it is right-cancellable, i.e. for all objects Z and morphisms α, β : B → Z which satisfy α ◦ f = β ◦ f, we have α = β. How do theses definitions relate to “familiar” properties such as injectivity, sur- jectivity, having left-inverse, having right-inverse? Firstly, let us note that injectiv- ity and surjectivity does not always make sense in a general category. Definition 1.2.8. We say a category C is set-based if each object is actually also a set with elements and each morphism is actually also a set-function, with the composition of morphisms giving the same results as composition of set-functions. Further, we require the identity morphism be the identity set-function. For example, Grp and Top are set-based categories, and it makes sense to say that a group is injective or that a continuous map is surjective. Now we are ready to pit the various notions against each other. In set-theory, the following three notions are equivalent. However, that is not generally the case for an arbitrary category. Nonetheless, we have some relations between them. Theorem 1.2.9. Consider the following properties of a morphism f : A → B: (1) Has left-inverse (i.e. f is a section) (2) Injective (this makes sense if C is set-based) 8 RENRENTHEHAMSTER

(3) f is a monomorphism Then in general, (1) ⇒ (3). If C is set-based and it makes sense to talk about (2), then (1) ⇒ (2) ⇒ (3). Proof. If f has a left-inverse g, then whenever f ◦ α = f ◦ β, we g to the front of both sides of the equation to obtain α = β. Thus (1) ⇒ (3). Now let C be set-based. Suppose f has a left-inverse g. Then f(a) = f(b) implies gf(a) = gf(b) which implies3 a = b, whence f is injective. To prove (2) ⇒ (3), we prove the contrapositive. So suppose there exists an instance of f ◦ α = f ◦ β where α 6= β. Concretely, suppose z ∈ Z is such that α(z) 6= β(z). But f(α(z)) = f(β(z)) which means f is not injective.  A similar statement can be made for the following three notions. Theorem 1.2.10. Consider the following properties of a morphism f : A → B: (4) Has right-inverse (i.e. f is a retraction) (5) Surjective (this makes sense if C is set-based) (6) f is an epimorphism Then in general, (4) ⇒ (6). If C is set-based and it makes sense to talk about (5), then (4) ⇒ (5) ⇒ (6). Proof. If f has a right-inverse g, then whenever α ◦ f = β ◦ f, we apply g to the of both sides of the equation to obtain α = β. Thus (4) ⇒ (6). Now let C be set-based. Suppose f has a right-inverse g. If b is in the codomain B, then4 b = f(g(b)) whence b is in the image. Thus f is surjective. To prove (5) ⇒ (6), we prove by contradiction. Assume on the contrary that there exists an instance of α ◦ f = β ◦ f where α 6= β. Concretely, suppose b ∈ B is such that α(b) 6= β(b). By surjectivity of f, there exists a such that f(a) = b. Then α(f(a)) 6= β(f(a)), a contradiction.  Remarks. As noted, in the category Set, (1), (2), (3) are equivalent, and (4), (5), (6) are equivalent. This equivalence is not true in general. • Consider the thin category formed on the preordered set (Z, ≤). Every morphism is a monomorphism and epimorphism (because the category is thin!). However, if a < b, then Hom(b, a) is empty, so the morphism f : a → b has no left-inverse and right-inverse. This shows (1) is strictly stronger than (3), and (4) is strictly stronger than (6). • Consider the same category as above, but treat each object a as a single- ton set {a}, so that the category becomes set-based. Every morphism is injective and surjective. Thus (1) is strictly stronger than (2), and (4) is strictly stronger than (5). • Let S be a set with at least two elements, and let T = 2S − {φ} be the collection of non-empty subsets of S. Consider the thin category formed on the preordered set (T, ⊆), where the morphism is the inclusion map. Then whenever A ( B, the morphism f : A → B is not surjective but an epimorphism (because the category is thin). Thus (5) is strictly stronger than (6).

3Note that this uses the assumption that the identity morphism is the identity set-function. 4Note that this uses the assumption that the identity morphism is the identity set-function. NOTES ON CATEGORY THEORY 9

+ • In a similar spirit, let T = 2Z −{φ} be the collection of non-empty subsets of Z+, and consider the thin category formed on the preordered set (T, ⊆). 5 Whenever A ( B, we define the morphism f : A → B to be the set- function that maps all elements of A to the smallest element of B. Then such a morphism is not injective if |A| > 1 but it is a monomorphism. Thus (2) is strictly stronger than (3). Finally, we can ask how the notions of monomorphism, epimorphism, and iso- morphism relate to each other. We know that an isomorphism has left and right inverses, so an isomorphism is necessarily a monomorphism and an epimorphism. However, consider the thin category formed on the preordered set (Z, ≤). Every morphism is a monomorphism and epimorphism but the only isomorphisms are the identities. This shows that monomorphism and epimorphism is not sufficient to guarantee isomorphism. Nonetheless, we have the following theorem. Theorem 1.2.11. The following are equivalent: • f is a monomorphism and a retraction • f is an epimorphism and a section • f is an isomorphism Proof. Clearly, if f is an isomorphism, then f has both a left-inverse and right- inverse, so combining with theorems 1.2.9 and 1.2.10, we obtain that the third statement implies the other two. Now suppose f : A → B is a monomorphism and has a right-inverse g. Then f = 1Bf = (fg)f = f(gf). Since f is a monomorphism, the equation f1A = f(gf) implies 1A = gf so g is also a left-inverse to f. This proves the f is an isomorphism. Similarly, if f : A → B is an epimorphism and has a left-inverse g, then f = f1A = f(gf) = (fg)f so fg = 1B and g is also a right-inverse to f.  1.3. A First Look at Functors. A is a type of mapping between cate- gories. Functors can be thought of as homomorphisms between categories - it is how categories “talk” to each other. Definition 1.3.1. Let C, D be categories. A (covariant) functor F : C → D is a mapping that • associates each object X of C to an object F(X) of D • associates each morphism f : X → Y in C to a morphism F(f): F(X) → F(Y ) such that the identity and composition axioms for morphisms are preserved: – F(idX ) = idF(X) for all objects X of C – F(g ◦ f) = F(g) ◦ F(f) for all morphisms f : X → Y and g : Y → Z of C Definition 1.3.2. A contravariant functor F : C → D does the same except for the fact that they “turn morphisms around” and “reverse composition”. Specifically, it is a mapping that

5If A = B, the sole morphism is forced to be the identity set-function. 10 RENRENTHEHAMSTER

• associates each object X of C to an object F(X) of D • associates each morphism f : X → Y in C to a morphism F(f): F(Y ) → F(X) such that the identity and composition axioms for morphisms are preserved: – F(idX ) = idF(X) for all objects X of C – F(g ◦ f) = F(f) ◦ F(g) for all morphisms f : X → Y and g : Y → Z of C In other words, a contravariant functor C → D is a covariant functor Cop → D from the . Here is a pictorial illustration of the above concepts. A covariant functor F : C → D ‘preserves’ arrows, in the sense that every diagram in C, say figure 1.10,

Figure 1.10. is mapped to a diagram with arrows in the same directions, as in figure 1.11:

Figure 1.11. whereas a contravariant functor would ‘reverse’ the arrows, as in figure 1.12:

Figure 1.12. In both cases, the commutativity of the diagrams is preserved. An important consequence of the functor axioms is the following. NOTES ON CATEGORY THEORY 11

Proposition 1.3.3. Let F : C → D be a covariant or contravariant functor. If f is an isomorphism in C, then F(f) is an isomorphism in D.

Proof. Exercise.  Example 1.3.4. Readers familiar with basic algebraic topology can verify that the construction of fundamental groups provide a covariant functor from the category of topological spaces with base point to the category of groups. As such, if there is a homeomorphism (X, x0) → (Y, y0), then the corresponding fundamental groups π1(X, x0) and π1(Y, y0) are isomorphic groups. Before proceding with examples of functors, the reader should check that functors can be composed. Problem 1.3.5. If F : C → D and G : D → E are functors, define the candidate for the composed functor G ◦ F : C → E and check that it satisfies the axioms for a functor. Here are some examples of functors. Example 1.3.6. The functor Grp → Set which maps a group to its underlying set and a group homomorphism to its underlying function of sets is a functor. Functors like these, which “forget” some structure, are termed forgetful functors. Another example is the functor Ring → Ab which maps a ring to its underlying additive abelian group. Morphisms in Ring (ring homomorphisms) become morphisms in Ab (abelian group homomorphisms). Remark 1.3.7. Our definition of a set-based category C has a F : C → Set as follows: • Each object A is mapped to F(A), the underlying set of A • Each morphism f : A → B is actually a map of sets, which we take to be F(f) Example 1.3.8. If R is a ring, let R∗ denote the group of units of R. Then every ring homomorphism φ : R → S induces a group homomorphism R∗ → S∗, given by φ|R∗ . We leave it to the reader to check that this defines a covariant functor Ring → Grp. Example 1.3.9. Recall that if R is a , the spectrum Spec(R) is the set of prime ideals of R. Moreover, if φ : R → S is a homomorphism of commutative rings, then the inverse image φ−1(p) of a prime ideal p ⊆ S is a prime ideal of R. Thus, φ induces a set-function Spec(S) → Spec(R). We leave it to the reader to check that this defines a contravariant functor CRing → Set. The next few examples deal with the concept of presheaf, which is an important concept in more advanced mathematics. Definition 1.3.10. For categories C and J, a presheaf of J on C is a contravariant functor C → J. Example 1.3.11. If X is a topological space, then the open sets in X form a partially ordered set under inclusion. Thus we can form a category T whose objects are open sets and whose morphisms are inclusions. Contravariant functors on T are (by abuse of name) also called presheaves on X. For example, by assigning to every open set U the ring of real-valued continuous functions CR(U) on U, we 12 RENRENTHEHAMSTER obtain a presheaf of rings on X. Indeed, we can define the inclusion U ⊆ V to be mapped to the ring homomorphism CR(V ) → CR(U): f 7→ f|U . Example 1.3.12. Let C be a category and X be a fixed object of C. Then the assignments A 7→ HomC(X,A),A 7→ HomC(A, X) define, respectively, a covariant and contravariant functor C → Set, called hom functors. For example, the morphism α : A → B can be mapped to the set- functionα ˆ : HomC(B,X) → HomC(A, X) given by pre-composition with α, i.e. αˆ : f 7→ f ◦ α. We leave the reader to check the details of both functors. Here is a hint for the second functor: if

Figure 1.13. is a diagram in C, stare at

Figure 1.14.

Definition 1.3.13. The contravariant functor above associated with X is also called the functor of points of the object X and is often denoted by hX for short. Observe that hX is a presheaf of sets on C. A presheaf of sets F : C → Set is said to be representable if it is in fact hX for some X. Now, we extend the ideas of injectivity, surjectivity and bijectivity to functors. However, the extension is not the obvious one. In particular, we do not care much about matching objects to objects. It turns out that the structure of an object in a category is adequately carried by its isomorphism class, and the notion of equivalence of categories should aim at matching isomorphism classes, rather than individual objects. Instead of focusing on individual objects, we look to morphisms for our definitions below. Definition 1.3.14. Let C and D be categories, and let F : C → D be a covariant functor, which induces for every pair of objects X and Y a function

F(X,Y ) : HomC(X,Y ) → HomD(F(X), F(Y )) The functor F is said to be:

• faithful if F(X,Y ) is injective • full if F(X,Y ) is surjective • fully faithful if F(X,Y ) is bijective NOTES ON CATEGORY THEORY 13 for every pair of objects X and Y . To deal with contravariant functors, we generally use the covariant functor Cop → D. From now on, functors without qualifications are taken to be covariant. Example 1.3.15. The forgetful functor Grp → Set is faithful. This functor is not full as there are set-functions between groups which are not group homomorphisms. Note that in the above example, the faithful functor is not injective on the individual objects. Indeed, an individual set could have been endowed with multiple group structures. However, our definitions of faithful and full do not deal with the individual objects. Example 1.3.16. The inclusion functor Ab → Grp is fully faithful. It is full although there are groups which are not abelian. We now have a partial converse to proposition 1.3.3. Proposition 1.3.17. If F : C → D is a fully faithful functor, then F(X) =∼ F(Y ) implies X =∼ Y . Proof. Let f : F(X) → F(Y ) be an isomorphism and g : F(Y ) → F(X) be the inverse. Since the functor is full, we have f = F(α) for some α : X → Y and g = F(β) for some β : Y → X. Then

F(α ◦ β) = F(α) ◦ F(β) = f ◦ g = id(F(Y ))

Since F(idY ) = id(F(Y )) and the functor is faithful, α ◦ β = idY . Similarly, β ◦ α = ∼ idX . Thus X = Y .  Now we are ready to specify what we mean by equivalent categories. Note that the following definition upholds our earlier claim that we should be “matching isomorphism classes, rather than individual objects”. Definition 1.3.18. A functor F : C → D is said to be an equivalence of cate- gories if it is: • fully faithful, and • essentially surjective, i.e. for every object Y of D, these exists an object X of C such that F(X) =∼ Y One natural question to ask is the following: if F : C → D is an equivalence of categories, is there an “inverse”? It turns out that because an equivalence of categories does not match individual objects, the question of an inverse is quite a subtle one that we will explore at the end of the next section after developing more terminologies. 1.4. Natural Transformations. A provides a way of trans- forming one functor into another while respecting the internal structure of the cat- egories involved. While functors are how categories “talk” to each other, natural transformations are how functors “talk” to each other. Definition 1.4.1. Let F and G be covariant functors C → D.A natural transfor- mation η : F G associates to every object X in C a morphism ηX : F(X) → G(X) in D such that for every morphism f : X → Y in C, the following diagram (figure 1.15) commutes: 14 RENRENTHEHAMSTER

Figure 1.15.

Definition 1.4.2. A natural isomorphism is a natural transformation η : F G such that ηX is an isomorphism for every X. Lemma 1.4.3. The following two are equivalent: (1) η : F G is a natural isomorphism (2) η : F G has an “inverse” natural transformation; that is, there exists ξ : G F a natural transformation such that ξX ◦ ηX = idF(X) and ηX ◦ ξX = idG(X) for every X

Proof. (1 ⇒ 2) Define ξ : G F by letting ξX be the inverse of ηX for every X. It remains to check that ξ fulfills the commutativity requirement to be a natural transformation. Indeed, for every given f : X → Y ,

ξY ◦ G(f) = ξY ◦ (G(f) ◦ ηX ) ◦ ξX = ξY ◦ (ηY ◦ F(f)) ◦ ξX = F(f) ◦ ξX

(2 ⇒ 1) Clearly each ηX is an isomorphism as ξX serves as an inverse.  Here is a mind-bending exercise. Problem 1.4.4. Exercise: Prove the following: It turns out that the functors between two given categories C,D form a category F un(C, D), called a . The objects are functors and the morphisms are the natural transfor- mations between the functors. Note that as a consequence of lemma 1.4.3, natural isomorphisms serve as iso- morphisms in the functor category. Let us now consider some examples of natural transformations. Example 1.4.5. Fix n a positive . Consider the following two functors CRing → Grp:

• The first functor GLn maps a commutative ring R to the group of invertible n × n matrices GLn(R) and a ring homomorphism R → S to the group homomorphism GLn(R) → GLn(S) obtained by applying f to teach matrix entry. • The second functor ∗ is given by example 1.3.8, where R → S induces a group homomorphism R∗ → S∗. Also, for each commutative ring R, the determinant is a group homomorphism ∗ from GLn(R) to R . In fact, one can show that the determinant is a natural transformation from GLn to ∗. NOTES ON CATEGORY THEORY 15

Example 1.4.6. Fix a field K. Consider the following two functors from the category of K-vector spaces to itself. • The first is simply the identity functor • The second is the double dual functor. Namely, V is mapped to V ∗∗ and T : V → W is mapped to T ∗∗ : V ∗∗ → W ∗∗ which acts as follows: let φ ∈ V ∗∗. Then T ∗∗(φ) is the element of W ∗∗ that takes a linear functional f ∈ W ∗ to the real number T ∗∗(φ)(f) = (φ ◦ T ∗)(f) = φ(f ◦ T ) ∗∗ Consider the injective linear map V → V given by v 7→ evv. We shall show this to be a natural transformation. Indeed, let us be given any T : V → W . With reference to the square diagram (figure 1.15), going via down-then-right yields v 7→ evv 7→ evv(− ◦ T ) and going via right-then-down yields v 7→ T (v) 7→ evT (v) . Therefore, the square diagram commutes. This is the reason why the embedding to the evaluation map is frequently said to be “natural” or “canonical”. Now, let us return to the question of “inverses” for equivalence of categories. Hopefully, the following definition now seems natural to the reader. Definition 1.4.7. Let F : C → D be a functor. Then an inverse of F is a functor G : D → C such that there are natural isomorphisms from F ◦ G and G ◦ F to the respective identity functors. Theorem 1.4.8. Let F : C → D be a functor. The following are equivalent: (1) F is an equivalence of categories (i.e. fully faithful and essentially surjective) (2) F has an inverse Note that this shows the inverse of an equivalence of categories is also an equiv- alence of categories. Proof. (1 ⇒ 2) Suppose F is fully faithful and essentially surjective. We need to build a functor G : D → C and natural isomorphisms idD F ◦ G and idC G ◦ F. Since F is essentially surjective, for which object Y in D, we can choose an object X in C for which F(X) =∼ Y . Set G(Y ) = X. By construction, for each Y there is a morphism (in fact isomorphism) ηY : Y → F(X) = (F ◦ G)(Y ). Given a morphism g : Y → Y 0 in D, consider the morphism −1 0 ηY 0 ◦ g ◦ ηY :(F ◦ G)(Y ) → (F ◦ G)(Y ) Recalling that F is fully faithful, we conclude that there is a unique morphism 0 −1 f : G(Y ) → G(Y ) such that F(f) = ηY 0 ◦ g ◦ ηY . Set G(g) = f. Now we have constructed our proposed G. First, check that η : idD F ◦ G given by the ηY defined above is a natural isomorphism. Indeed, the diagram (figure 1.16) commutes by construction. Next, we have to check that G is a functor. −1 • For the special case of g = idY , we have F(G(idY )) = ηY ◦idY ◦ηY = idF(X), whence G(idY ) = idX = idG(Y ) , by the faithfulness of F. 0 0 00 • For the special case of g = g2 ◦ g1 where g1 : Y → Y and g2 : Y → Y , we have −1 −1 −1 F(G(g)) = ηY 00 ◦ g2 ◦ g1 ◦ ηY = ηY 00 ◦ g2 ◦ ηY 0 ◦ ηY 0 ◦ g1 ◦ ηY = F(G(g2)) ◦ F(G(g1))

and thus G(g) = G(g2) ◦ G(g1) by the faithfulness of F. 16 RENRENTHEHAMSTER

Figure 1.16.

Lastly, we have to produce a natural isomorphism ξ : idC G ◦ F. Let X be an object of C. Then recall that ηF(X) : F(X) → F(G(F(X))) is an isomorphism. Since F is fully faithful, there exists a unique morphism ξX : X → G(F(X)) such that F(ξX ) = ηF(X). To prove that ξX is an isomorphism, let us use the fact that −1 ηF(X) is an isomorphism. Indeed, consider the inverse ηF(X) : F(G(F(X))) → F(X) and use the fully faithfulness of F to obtain a unique morphism λ : G(F(X)) → X −1 −1 such that F(λ) = ηF(X). Then F(ξX λ) = F(ξX )F(λ) = ηF(X)ηF(X) and F(λξX ) = −1 F(λ)F(ξX ) = ηF(X)ηF(X) are both identities morphism, and with the faithfulness of F, we conclude that ξX λ and λξX are identity morphisms. That is, ξX is an isomorphism. Finally, for each morphism f : X → X0, we have the diagram

Figure 1.17.

Apply the functor F and we obtain a (since we get the diagram for the morphism F(f): F(X) → F(X0) and natural isomorphism η : idD F◦G). Since F is faithful, the diagram just above (figure 1.17) also commutes. (2 ⇒ 1) Suppose F has an inverse G and there are natural isomorphisms η : idD F ◦ G and ξ : idC G ◦ F. First, we prove that the map f 7→ G ◦ F(f) is a 0 0 bijection from HomC(X,X ) to HomC(G ◦ F(X), G ◦ F(X )). Indeed, if G ◦ F(f) = G ◦ F(f˜), then −1 ˜ −1 ˜ ξX0 ◦ f ◦ ξX = ξX0 ◦ f ◦ ξX ⇒ f = f so the claimed map is injective. To prove surjectivity, let σ : G ◦ F(X) → G ◦ F(X0). −1 −1 −1 −1 Set f = ξX0 ◦ σ ◦ ξX . Then G ◦ F(f) = ξX0 ◦ f ◦ ξX = ξX0 ◦ ξX0 ◦ σ ◦ ξX ◦ ξX = σ. 0 0 Since f 7→ G(F(f)) is a bijection, the map HomC(X,X ) → HomC(F(X), F(X )) given by f 7→ F(f) is injective. 0 0 Similarly, the map HomD(Y,Y ) → HomD(F ◦ G(Y ), F ◦ G(Y )) given by g 7→ 0 0 F◦G(g) is a bijection, so the map HomD(G(Y ), G(Y )) → HomD(F◦G(Y ), F◦G(Y )) given by f 7→ F(f) is surjective. NOTES ON CATEGORY THEORY 17

Therefore, F is fully faithful. To show that F is essentially surjective, let Y be an object in D. Consider X = G(Y ). We need to show that F(X) = F(G(Y )) is isomorphic to Y . Indeed the natural isomorphism η provides the isomorphism ηY : Y → F(G(Y )).  1.5. Universal Properties. In this section, we give a definition of what the oft- quoted phrase ”” means. Before we begin, let us provide some motivation for this somewhat abstract concept. When we study a mathematical object, there are frequently two ways we can understand it. The first is opening the blackbox and examining its concrete construction. For example, we may understand the of two groups G1,G2 through the conventional process of explaining what “words” and “reduced words” mean, how to reduce words, etc. The second way is just treat it as a black box and examine instead the relationships between the object-of-interest and other objects. If there is a certain aspect of the relationship web that is specific to the object-of-interest, then it is as valid a defining feature as the concrete construction. In fact, take a moment to contemplate about the broader philosophy of mathe- matics: when we make constructions, we care more about the utilities and function- alities of the constructions than the exact recipes that go into them. In category theory, things happen only when objects ”talk” to each other. It is for this reason that the second way of understanding the purpose of objects via universal properties outshines the first way of looking at concrete constructions. The word “relationship” suggests that universal properties will involve studying morphisms surrounding the object-of-interest, rather than the object itself. This should not be surprising given our previous discussion surrounding the equiva- lence of categories, where we focused on morphisms because we cared more about matching isomorphism classes rather than individual objects. In fact, when we use universal properties to describe objects-of-interest, we do not care about the vari- ety of possible concrete constructions that lead to the same universal property - all these possibilities will turn out to be isomorphic. Now, we shall begin the formal definitions. Definition 1.5.1. Let C be a category. We say that an object I ∈ Ob(C) is initial in C if for every object A, there exists exactly one morphism I → A. We say that an object F ∈ Ob(C) is final in C if for every object A, there exists exactly one morphism A → F .

Proposition 1.5.2. If I1,I2 are both initial objects in C, then they are isomorphic. If F1,F2 are both final objects in C, then they are isomorphic.

Proof. Let I1,I2 be initial objects. Let f : I1 → I2 be the unique morphism in HomC(I1,I2) and let g : I2 → I1 be the unique morphism in HomC(I2,I1). Then gf ∈ EndC(I1) which contains only one element, namely idI1 . So gf = idI1 and similarly fg = idI2 . The proof for final objects holds similarly.  Definition 1.5.3. We say that a construction satisfies a universal property if it can be viewed as an initial or final object of a category. As our first example, we shall examine how universal properties can be used to define what is meant by products and coproducts in an arbitrary category. The reader may have encountered notions like the , , free prod- uct, etc. and wondered about the greater purpose behind these constructions. For 18 RENRENTHEHAMSTER example, why do we care about direct sum of abelian groups but not so much direct sum of groups in general? It turns out that direct sum is a in the category Ab but for the category Grp, the corresponding coproduct is the free product. Example 1.5.4. (Products) Let C be a category and A, B be objects. The product of A and B is an object A × B together with a pair of morphisms πA : A × B → A, πB : A×B → B such that it is a final object of the double slice category (C ⇒ A, B). In other words, the product is the object

Figure 1.18. such that for every object

Figure 1.19. there exists a unique morphism σ : Z → A×B in C such that the following diagram commutes:

Figure 1.20.

In general, given a family of objects Xi where i ∈ I, we can define their product as the object Πi∈I Xi with canonical projection morphisms πj :Πi∈I Xi → Xj via a universal property similar to above. Here are some examples: • the product in Set is the NOTES ON CATEGORY THEORY 19

• the product in the category induced by the preordered set (Z, ≤) is min • the product in the category induced by the preordering on Z+ via the divisibility relation is the greatest common divisor • the direct product along with the natural projection maps is a product in both Grp and Ab • the direct product along with the natural projection maps is a product in both Ring and CRing • the direct product along with the natural projection maps is a product in both R-Mod and Mod-R Example 1.5.5. (Coproducts) Let C be a category and A, B be objects. The coproduct of A and B is an object A q B together with a pair of morphisms ιA : A → A q B, ιB : B → A q B such that it is an initial object of the double coslice category (A, B ⇒ C). That is, for all objects Z and morphisms fA : A → Z, fB : B → Z, there exists a unique morphism σ : A q B → Z in C such that the following diagram commutes:

Figure 1.21.

In general, given a family of objects Xi where i ∈ I, we can define their coproduct as the object qi∈I Xi with canonical “inclusion” morphisms ιj : Xj → qi∈I Xi via a universal property similar to above. Again, some examples: • the coproduct in Set is the • the coproduct in the category induced by the preordered set (Z, ≤) is max • the coproduct in the category induced by the preordering on Z+ via the divisibility relation is the lowest common multiple • the free product along with the natural inclusion maps is a coproduct in Grp, while the direct sum along with the natural inclusion maps is a co- product in Ab • the direct sum along with the natural inclusion maps is a coproduct in R-Mod and Mod-R Actually, the definition of universal property that we gave earlier (definition 1.5.3) is somewhat of a cheat-version. Before giving the actual definition of uni- versal property, we need to generalize our definitions of slice and coslice categories (definitions 1.1.7 and 1.1.8). Definition 1.5.6. Let C, D, E be categories and F, G be functors as follows: D −→F C ←−G E 20 RENRENTHEHAMSTER

We can form the (F ↓ G) as follows: • The objects are triples (A, B, f) where A is an object in D, B is an object in E and f : F(A) → G(B) is a morphism in C. Pictorially, it is arrows of the form in figure 1.22.

Figure 1.22.

• Morphisms from (A, B, f) to (A0,B0, f 0) are all pairs (g, h) where g : A → A0 and h : B → B0 are morphisms in D and E respectively with the following diagram (figure 1.23) commuting:

Figure 1.23.

• Composition of morphisms is done by taking (g, h)◦(g0, h0) to be (g◦g0, h◦h0) We observe that the slice categories and coslice categories are special cases of comma categories. For example, using the notation in the definition of comma categories, take D = C with F the identity functor, and take E to be the category with a single object B and denote X := G(B) which is an object in C. Then we obtain the slice category (C ↓ X). A similar consideration produces the coslice category. The definition of universal property deals with a comma category of generality in between definition 1.5.6 and slice/coslice categories. Definition 1.5.7. Suppose F : C → D is a functor, and let X be an object of D. • An initial morphism from X to F is an initial object in the comma category (X ↓ F). In other words, it is a pair (A, f) where A is an object of C and f : X → F(A) is a morphism in D, such that whenever A0 is an object of C and f 0 : X → F(A0) is a morphism in D, there exists a unique morphism φ : A → A0 that makes the below diagram (fig 1.24) commute. • An terminal morphism from F to X is a terminal object in the comma category (F ↓ X). In other words, it is a pair (A, f) where A is an object of C and f : F(A) → X is a morphism in D, such that whenever A0 is an NOTES ON CATEGORY THEORY 21

Figure 1.24.

Figure 1.25.

object of C and f 0 : F(A0) → X is a morphism in D, there exists a unique morphism φ : A → A0 that makes the above diagram (fig 1.25) commute. We say that a construction satisfies a universal property if it can be viewed as an initial or final morphism. Given enough patience and skills, the right functor can be found so that a univer- sal property presented in the sense of definition 1.5.3 can be turned into an initial or final morphism. However, for most practical purposes, definition 1.5.3 is a good working definition. Example 1.5.8. Let us take the universal property of product that we gave in example 1.5.4 and turned it into a terminal morphism. Let C be a category and A, B be objects. We let X := (A, B), which is an object of the product category C × C. The relevant functor F : C → C × C here is the x 7→ (x, x). The reader can check that the universal property of product given earlier is equivalent to saying that (A × B, (πA, πB)) is a terminal object in the comma category (F ↓ X). Example 1.5.9. What is the universal property of quotient constructions, such as the quotient group? Let N be a normal subgroup of G. Consider the of the coslice category (G ↓ Grp) where the objects are pairs (f, H) with H a group and f satisfies N ⊆ kerf. Then the quotient group G/N together with the projection map is initial in this category. Here is how one might turn this into a statement about initial morphism: Consider the category D whose objects are pairs (K,H) where K is a normal subgroup of H, and morphisms from (K,H) to (K0,H0) are group homomorphisms f : H → H0 satisfying K ⊆ kerf (also include the identity morphisms for the special case of H = H0,K = K0 so that the identity axiom is satisfied). Consider the functor F : Grp → D given by H 7→ ({e},H) (and φ 7→ φ). Then we claim that (G/N, π) is an initial object in the comma category ((N,G) ↓ F). Indeed, let us be given any group H and f 0 :(N,G) → ({e},H) any morphism of D (i.e. f 0 : G → H is a group homomorphism and N ⊆ kerf 0). Then we know 22 RENRENTHEHAMSTER

Figure 1.26.

(e.g. from the ‘cheating’ version of universal property above) that there exists a unique group homomorphism φ : G/N → H such that f 0 = φ ◦ π. That is precisely what is required. As seen from the above example, pursuing the strict definition of universal prop- erty can be an exhausting yet unenlightening process. As such, we shall be content with using the ‘cheat’ version of universal property from now on.