Categories and Natural Transormations Ethan Jerzak 17 August 2007 1 Introduction The motivation or studying Category Theory is to ormalise the underlying similarities between a broad range o mathematical ideas and use these generalities to gain insights into these more speciic structures. Because o its ormalised generality, we can use categories to understand traditionally vague concepts like natural and canonical more precisely. This paper will provide the basic concept o categories, introduce the language needed to study categories, and study some examples o amiliar mathematical objects which can be categorized. Particular emphasis will go to the concept o natural transormations, an important concept or relating dierent categories. 2 Categories 2.1 Deinition A category C is a collection o objects, denoted Ob(C ), together with a set o morphisms, denoted C (X, Y ), or each pair o objects X, Y Ob(C ). These morphisms must satisy the ollowing axioms: 1. For each X, Y, Z Ob(C ), there is a composition unction : C (Y, Z) C (X, Y ) C (X, Z) We can denote this morphism as simply g 2. For each X Ob(C ), there exists a distinguished element 1 X C (X, X) such that or any Y, Z Ob(C ) and C (Y, X), g C (X, Z) we have 1 X = and g 1 X = g 3. Composition is associative: h (g ) = (h g) Remark: We oten write X C instead o X Ob(C ) Remark: We say a category C is small i the collection Ob(C ) orms a set. 1
2.2 Examples We discover categories in many areas o mathematics. The most obvious examples ollow: 1. Sets: The objects are simply sets, and the morphisms are unctions between sets. 2. Groups: The objects are groups, and the morphisms are homomorphisms. 3. Abelian Groups: The objects are abelian groups, and the morphisms are homomorphisms. 4. Topological Spaces: In this non-algebraic example, the objects are topological spaces, and the morphisms are continuous maps. 5. Monoid: This example is less intuitive. Consider a category with one object, Ob(C ) =. The set o morphisms C (, ) orm a structure which has an identity morphism along with an associative composition unction. Such a category, then, is exactly a monoid in which the elements are the morphisms o the object in this category. 6. Group: We again consider a category with one object. I we require, in addition to the normal categorical axioms, that each morphism have an inverse morphism, we obtain a single group, the elements o which are the morphisms rom this one object to itsel. And so on. Most algebraic structures with the obvious designations given to objects and morphisms orm categories, although it is not always entirely obvious how to write the extra structure they exhibit in categorical terms. Note that only examples ive and six are small categories; examples one through our are large (since, or example, there is no set o all sets). 2.3 Commutative Diagrams Sometimes it is more useul to state the axioms o categories in terms o commutative diagrams instead o equivalent unctions. The axioms, stated thus, ollow: 1. Identity Axiom: For each X Ob(C ), there exists a distinguished element 1 X C (X, X) such that or any Y, Z Ob(C ) and C (Y, X), g C (X, Z) the ollowing diagram commutes: Y X 1 X g X g Z 2
2. Associativity Axiom: For all X, Y, W, Z C, and : X Y, g : Y W, and h : W Z, the ollowing diagram commutes: X Y h g g g W h Z 2.4 Isomorphisms A morphism : X Y is an isomorphism i there exists a morphism g : Y X such that g = Id Y and g = Id X. 3 Functors As we would expect, in order to make this study a ruitul one, some extra structure and sorting are required. In this section we will deine and describe maps between categories, which give us grounds on which to inally deine naturality and ormalise the notion o sameness. 3.1 Deinition Let C and D be categories. A (covariant) unctor F : C D is a morphism that makes the ollowing associations: to each C Ob(C ), it associates an object F (C) D, and to each morphism C (C, C ) it associates a morphism F () D(F (C), F (C )) such that: 1. F (1 C ) = 1 F (C) or all C Ob(C) 2. F (g ) = F (g) F () or all : C C, g : C C 3.2 Examples 1. Constant Functor This unctor maps every object C Ob(C ) to one object D Ob(D), and every morphism in C to the identity morphism on D. 2. Forgetul Functor Generally, the orgetul unctor is one which goes rom a category with more structure to one with less, orgetting that extra structure. For example, the orgetul unctor which takes groups to sets takes the elements o groups to their underlying sets, and the homomorphisms between the groups to generic unctions, stripping away the group structure and leaving only the set underneath. This unctor is deined or almost all o the examples we mentioned: We could take abelian groups to groups, or groups to monoids. 3
3. Free Functor This is the opposite notion o a orgetul unctor. Free unctors impose extra structure on categories with less. For example, a ree unctor could take the category o sets to the category o groups by taking each set to the ree group generated by that set, and the unctions to homomorphisms between these ree groups. 3.3 Contra-variant unctors The dierence between a contra-variant unctor and a (covariant) unctor is the morphism that F associates C (C, C ). The same axioms hold, except that each C (C, C ) gets sent to a morphism, F () D(F (C ), F (C)). That is, a covariant unctor preserves the direction o our arrows, while a contravariant unctor reverses them. 3.4 Example Let X Sets. Consider the unctor F (, X) : Sets Sets, where denotes any set, deined on objects by F : Y {unctions : Y X}. Now or morphisms, suppose we have F (Y, X) and F (Z, X). The question is how to deine this relationship, given a unction : Y Z. We want to know, given this unction, is it more natural to deine F (Y, X) F (Z, X) or F (Y, X) F (Z, X)? Looking at the ollowing diagram which states this relationship more explicitly, the answer becomes clear: Y Z g X g {unctions:z X} That is, given a map : Y Z, and a map g : Z X, we can induce a map g : Y X. The correct way to deine the relationship between F (Y, X) and F (Z, X), then, is F (Y, X) F (Z, X) g g, orming a perectly acceptable contra-variant unctor. 3.5 Elementary Properties We can derive some properties immediately rom the axioms. For example: 1. F transorms each commutative diagram in C to a commutative diagram in D. That all o the objects in the diagram in C get sent to objects in an equivalent diagram in D is obvious rom the deinition o a unctor. Similarly, or every arrow C C in a commutative diagram in C, the unctor F will associate a morphism 4
F () D(F (C), F (C )). Any property requiring the identity morphism in C will be associated with the identity morphism in D, and any composition in C goes to an equivilant composition in D. Thus every combination o maps between objects in C is preserved in the equivalent diagram in D, making that diagram in D commute. 4 Natural Transormations A morphism between categories is a unctor; a map between unctors (both o which must have the same input and output categories) is a natural transormation. 4.1 Deinition Let F and G be unctors rom C to D. A natural transormation η : F G is a collection o maps η C : F (C) G(C), one or each C C, such that or any C, C C and any C (C, C ), the ollowing diagram commutes: F (C) F () F (C ) η C η C G(C) G() G(C ) That is, whether we irst take the unctor F on an object C and then take η into G(C ), or whether we irst take η into G and then use the unctor G to go into G(C ), is irrelevant; we will obtain the same morphism rom F (C). Remark: Unsurprisingly, a natural transormation is a natural isomorphism when each η C is an isomorphism. 4.2 Example Consider the statement every group is naturally isomorphic to its opposite group. (The opposite group G op o G has the same underlying set, and the operations reversed: a b G b op a G op ) This can clearly be deined in terms o a unctor rom groups to groups, such that op = or any group homomorphism : G H. In order or this to deine a unctor, we need op : G op H op to be a homomorphism. To see that this is in act the case, we observe that, or all a, b G and : G H: op (a op b) = (b a) = op (a) op op (b) This statement also shows us clearly what we need to do to veriy naturality: we must show that the identity unctor between groups is naturally isomorphic to the opposite unctor, 5
deined above. Thus we must give an isomorphism η G : G G op such that the relevant diagram deining naturality commutes. Proo: Let η G (a) = a 1 or all a G. We have (ab) 1 = b 1 a 1 and (a 1 ) 1 = a, showing that our η G is its own inverse. Now set : G H, a group homomorphism. We can write the ollowing diagram, keeping in mind that op = and (a) 1 = (a 1 ) or group homomorphisms. G H η G η H G op op H op Showing naturality. Now, to show that this is not only a natural transormation but an isomorphism, we must show that each η G actually has an inverse. Consider the morphism η G op. This must be deined on group elements as η G op(b) = b 1. But by our deinition o G op, b 1 G. Thus, η 1 G = η Gop or all G, showing that this transormation is an isomorphism. 5 Products o Categories Suppose we have two categories, C and D. The product, C D, gives us another category, deined as ollows: The objects Ob(C D) are Ob(C ) Ob(D) For all pairs o objects (C 1, D 1 ), (C 2, D 2 ), the set (C D)[(C 1, D 1 ), (C 2, D 2 )] = C (C 1, C 2 ) D(D 1, D 2 ) The identity morphism Id(C, D) we deine as (Id C, Id D ) Composition is deined componentwise as expected. 6 Arbitrary Categories, Applications We can deine categories indiscriminately, by representing objects as graph vertices and morphisms as edges. Recall that in our deinition o a monoid as a category, we had a category with one object and morphisms rom that object to itsel. We can represent this graphically as one vertex, with many arrows pointing rom that vertex to itsel (necessarily including the identity arrow), plus an additional composition deinition. Now consider the ollowing arrangement: 6
Id 0 0 α 1 Id 1 This certainly deines a category E : we have two objects, each with an identity morphism, and a set o morphisms C (0, 1) = {α}, and the set C (1, 0) = { }. This graph also imposes all o the compositions o morphisms: or example, Id 1 α is orced to be α. Proposition: Let C, D be categories. The ollowing are equivalent: 1. Two unctors, C F G D, and a natural transormation η : F G 2. C E H D, or H a unctor, and E the category with two objects deined above. Proo: Let H(C, 0) = F (C) and H(C, 1) = G(C) or all C C. This is all we need to deine operations o objects; as we can see, all the inormation contained in those two unctors F, G : C D is represented by this deinition; or F, look at what H does with any C together with 0 object, and or G, look at C with 1. Now, make the ollowing equalities, or : C C : 1. H(C, 0) = F (C) 2. H(C, 0) = F (C ) 3. H(, Id 0 ) = F () 4. H(C, 1) = G(C) 5. H(C, 1) = G(C ) 6. H(, Id 1 ) = G() 7. H(Id C, α) = η C With these deinitions in hand, we shall irst show that (2) implies (1), and then that (1) implies (2). Based on the deinition o a unctor, the ollowing diagram commutes in (2): H(Id C,α) H(C, 0) H(,Id 0 ) H(C, 0) H(C, 1) H(,Id 1) H(C, 1) H(Id C,α) 7
But observe that, simply by deinition, those diagram is exactly: F (C) F () F (C ) η C η C G(C) G() G(C ) Which is what we wanted. To see that (1) implies (2), simply start with the bottom diagram, look at our deinitions table, and see that it is exactly the top diagram. 7 Another Natural Isomorphism Proposition: Every inite dimensional vector space is naturally isomorphic to its double dual. (The dual o a vector space is the set o linear transormations rom the vector space to its ground ield. This actually orms a vector space, the dual o which is the double dual or the original space.) In categorical terms, this states that there is a natural isomorphism between the identity unctor Id : V ect k V ect k and the unctor DD : V ect k V eck k, where k is the ground ield o V and DD denotes the unction sending V to its double dual, DDV (which is also a vector space over k). Let us deine a unction η V : Id(V ) DD(V ), i.e. η V : V DDV. Given a λ DV (a linear transormation rom V to its ground ield k) and v V, deine η V (v)(λ) = λ(v) For convenience, denote η V (v) = eval v. First, we will show that this is an isomorphism, and then we will show that it is natural. To get a better grasp o the types o unctors we are looking at, suppose we have a D : V DV. The natural way to deine the composition is: V V T k T DV Thus D((T )) = T. This shows that unctors D : V DV are contra-variant. Taking that same unctor twice, into DDV, yields a covariant unctor. Let e 1...e k be a basis o V, and deine T ei by T ei (e j ) = { 1 i = j 0 i j. 8
The set o T ei orms a basis or DV, which shows that V and DV have the same dimension. Suppose v 0. We can write v in terms o a chosen basis: v = a 1 e 1 +... + a n e n. At least one o these coeicients must be nonzero, since v 0. So i a i 0, let T = T ei. Then T ei (v) = T (a 1 e 1 +... + a n e n ) = a i 0. Thus eval v is nonzero. This also shows that η V : V DDV is injective since every nonzero vector gets sent to something nonzero. We have shown that V and DDV are inite dimensional with the same dimension, so η V must be an isomorphism. To show that η is natural, suppose we have : V V. Now the consider the diagram V V η V η V DDV DD DDV We must show that this commutes. Suppose, then, that we have a v V. We must show that whichever way we go round the diagram, we get the same element o DDV. Going clockwise, we obtain (v) V and then eval (v). Going counterclockwise, we obtain irst eval v, and then DD(eval v ). But DD(eval v ) = eval v D. For any T DV, (eval v D)(T ) = eval v (D(T )) = eval v (T ) = T v = T (v). Note that or any T DV, eval (v) (T ) = T (v). Thereore we obtain the same element o DDV going either way around the diagram; the diagram commutes. Amen. 8 Further Possibilities This paper has given the merest o introductions to category theory, with a ew examples and statements. We can accomplish much more, relating more sophisticated concepts in mathematics, using this branch; or that, however, you shall have to consult the textbooks, as I have none o the required background. Reerences [1] Berrick and Keating, Categories and Modules, 2000, 2-34. [2] Guillou and Skiadas, WOMP 2004: Category Theory, 2004. [3] Peter May s lectures, class notes. 9