Heres my notes on functors also:
Functors
The previous two post have really been on the foundations on mathematics and specifically the foundation of Algebraic Geometry. There is one more detail that we need which is a precise definition of a functor. Fix two categories X and Y. Let F be a function from the objects of X, Ob_X, to the objects of Y, Ob_Y, and a function from the morphisms of X, Mor_X, to the morphisms of Y, Mor_Y. We call F a funtor if
1. F([A,B]_X) is a subset of [F(A),F(B)]_Y ,
2. F(e_A) = e_F(B) for every object in Ob_X, and
3. for a:A-->B and b:B-->C, we have F(ba) = F(b)F(a).
Stricly speaking F is called a covariant functor as X and Y are fixed categories (more on this later in the post). In addition we have a contravariant functor given by
1*. F([A,B]_X) is a subset of [F(B),F(A)]_Y
2*. Same as 2
3*. for a:A-->B and b:B-->C,F(ba)=F(a)F(b)
We have already alluded to one example of a contravariant functor in the post Categories which we will make clearer in the next post. We offer two other examples:
Example 1. First note that Vector spaces of finite dimension over a field k (which you can think of as real or complex numbers) form a category, denoted Vec, where the objects are vector spaces, the morphism are linear transformations (or matrices), and the multiplication is given, again, by composition of functions (or multiplication of the matrices representing the linear transformations). Let A and B be vector spaces and T:A-->B a linear transformation between them. Then we can form what is known as the transpose of the linear transformation T, denoted T^t. We do this as follows:
(1) Hom(A,B)=[A,B]_Vec is the set of all linear transformations from A to B.
(2) Hom(A,k) where k is our field (substitute the real numbers for k if you wish) is the set of all linear functionals on A--i.e., an element f in Hom(A,k) is a linear transformation from A to k.
(3) Hom(A,k) forms a vector space of finite dimension (in fact dim(Hom(A,k))=dim(A)) an so is an object in Ob_Vec. In fact, the set of all linear functions (here they are all assumed to be bounded as dimension is finite) will form a category as they form a commutative ring with unity (c.f., More on Cats). What we want is a function from the category finite dimensional vector spaeces to the category of linear functions on finite dimensional vector spaces over k which is a functor.
Now, the transpose of a linear transformation will satisfy such a definition as is shown in 1-3 if we can define it correctly. So, letting the category of linear functions on finite dimensional vector spaces over k be denoted by X, we have a function from one category to another, t: Vec --> X, defined by sending T to T^t. We now must define T^t.
T^t needs to be a morphism (i.e. a linear transformation since we have (by 3) that X consists of finite dimensional vector spaces) either from Hom(A,k) to Hom(B,k) or from Hom(B,k) to Hom(A,k). It is in fact a function T^t: Hom(B,k)-->Hom(A,k) given by if f is in Hom(B,k)--i.e., a linear functional on B, then T^t(f)(x) = f(T(x)) for all x in A. We have just defined a contravariant functor from Vec to X (or we can also view this as a contravariant functor from Vec to Vec). As you will notice, the way T^t is defined is the same way f^* was defined in the post Categories. Again, we will speak about the contravariant functor * in an upcomming post.
Example 2. This example will be much more trivial than example 1. Perhaps it is best to read this example first an then go back to 1. The identity function on a Category C sending an object A in Ob_C to A and a morphism a in [A,B]_C to a also defines a functor which is obviously a covariant functor.
Now let's see if we can recharacterize the notion of contravariant functor from a category X to a category Y in terms of the dual of a category and use Example 1 as a guide. A contravariant functor F is given by F(ba)=F(a)F(b). The claim is that this is equivalent to saying F is a covariant functor from X to Y^* (the dual category of Y). Let's check this:
(1) F([A,B]_X) is a subset of [F(B),F(A)]_Y= [F(A),F(B)]_Y^* which is part 1 of the definition of a covariant functor from the category X to the category Y^* (c.f., More on Cats for the definition of the dual of a category).
(2) there is nothing to check if we switch from considering F as a function from X to Y to F as a function form X to Y^* (the objects of Y and Y^* are the same so F(A) can be considered as an element of Ob_Y or Ob_Y^*).
(3) F(ba) = F(a)F(b) is exactly what the element (F(b),F(a)) goes to under the multiplicative map of the dual of Y induced by the multiplicative map of Y. More explicity, if a is in [A,B] and b is in [B,C]. Then F(a) is in [F(B),F(A)]_Y and F(b) is in [F(C),F(B)]_Y and multiplying we have F(ba)= F(a)F(b) in [F(C),F(A)]_Y.
Therefore, F is a covariant funtor from X to Y^*, and so from now on when we speak generally about functors, without aid of specific examples, we will be thinking in terms of either all functors being covariant or contravariant (lets just say covariant). The application of this to Example 1 is therefore obvious if one can say what is the dual of linear functions on finite dimensional vector spaces to k. It is all just notation and should be checked as an mental exercise, but as a hint the morphism should be Hom(k,A)--i.e. linear transformations from k to A.
Now, as another example of a Category, the class of all Categories, denoted Cat, is also a category, where its objects are categories, its morphisms being covariant functors, and multiplication is contained a priori in the definition of a covariant functor. Further, as an example of the dual of a Category, the dual of Cat, Cat^*, is just again the category whose objects are categories, but this time whose morphisms are contravariant functors, and again where multiplication is given a priori. We now can give a final example of a functor:
Definition Let F and G be functors from a Category A to a Category B. A natural transformation T from F to G is a function taking objects of A to morphisms of B such that
(i) T(X): F(X) --> G(X) for all objects X of A.
(ii) if a:X-->Y, then we have G(a)T(X) = T(Y)F(a).
(i) says that each object X of A yields a morphism T(X) from the objects F(X) to G(X) which are contained in B.
(ii) gives a commutative diagram between the functors and our function of categories T.
Example 3. As already noted, the class of categories is itself a category denoted Cat. Also, the class of functors is also a category whose morphisms are given by evaluating a functor at categories. The natural transformation gives a map from category of categories to the category of functors.