### Lecture 3: Functors

*See exercises below for clarification of some of the discussions during the video lecture, especially the discussions at the end of the lecture.*

**3.1. An Abstract Notion of a Dynamical System**

We begin this lecture with an abstract notion of a dynamical system. After recalling this notion, we will try to express it using the language of categories. This process will lead us to a general notion of a mapping between categories: the notion of a functor.

A *dynamical system* is a mathematical structure that consists of a set "X" of *states* (of a real-life system being modeled), and for each time laps represented by a (non-negative) real number "t", a mapping of members of "X" to members of "X", i.e., a function from the set "X" to the set "X", which we will write as "f" with a subscript "t".

represents the state to which the given system will transition from state "x", after "t" time elapses. For the data just described to constitute a dynamical system, the following two axioms need to be satisfied:In the first axiom, the subscript at "f" is the number 0. This axiom says that if if the system is at state "x", then after 0 time lapse, the the system will still be at state "x" - a very natural requirement, of course! The second axiom is written in the language of composition of functions. It can be illustrated by the following diagram:

*time category*and the

*category of sets*. The first category is similar to one of the examples of categories we discussed in the first lecture. The second category is similar to the category of natural numbers we discussed in the second lecture. In the time category, there is only one object. All arrows in this category are thus looping arrows. The arrows are given by non-negative real numbers. Composition of arrows is given by addition of numbers. The number 0 is the special arrow of the unique object. The two axioms of the category are then fulfilled because addition of numbers is associative and the number 0 has the property that its sum with any other number gives back that number (irrespective of the order of addition). In the following illustration of the time category,

*Side remark:*As it was shown more than a hundred years ago, set theory can be used as a foundation for all of mathematics. This means, in some very precise sense (elaboration of which is beyond the scope of these lectures), that the category of sets holds within it all of the mathematically describable universe! In short: the category of sets is a VERY IMPORTANT category.

**3.2. The Notion of a Functor**

*functor*. We will now give a general definition of a functor and then illustrate this definition by showing that a dynamical system is nothing other than a functor from the time category to the category of sets.

**3.3. Some Forgetful Functors**

*forgetful functors*. These are functors between two categories of two different types of mathematical structures, where one of the two structures is richer structure (has more data) than another, and the functor "forgets" that richer structure. An excellent of example of such functor is given by the forgetful functor from the

*category of vector spaces*to the

*category of groups.*Before describing this functor, let us first say a few words about these two categories.

*Note: in what follows, we assume that the reader is well familiar with the notions of a vector space and of a group. If, however, you are not too familiar with these notions, it should nevertheless be possible to gain some insight about forgetful functors. Let us know in the comments if you need any help unpacking what you will read below.*

*linear maps*(aka

*linear transformations*) between vector spaces. Composition of arrows is given by the usual composition of linear maps, which is defined basically the same way as composition of functions. In fact, a linear map between two vector spaces is nothing other than a function mapping points of one vector space to points of the other vector space -- but not an arbitrary function: the function must preserve linear combinations. To ensure that composition is well defined in the category of vector spaces we just need to check that the composite of two linear maps itself ends up being a linear map. This is of course true: it is in fact one of the fundamental (but simple) facts about linear maps. The special arrows in this category are given by the identity functions: the functions that map a point in a vector space to itself. Such functions indeed preserve linear combinations, so they are linear maps (hence, they are indeed arrows in our category of vector spaces). Thus, the category of vector spaces is given by vector spaces as objects, linear maps as arrows and the usual composition of linear maps as the composition of the category.

**3.4. Conclusion**

*Side remark:*The product of two vector spaces (seen as objects in the category of vector spaces) is given by the cartesian product of vector spaces. In fact, in the category of vector spaces, product of two vector spaces gives remarkably the same object as their coproduct (can you imagine arithmetic where addition and multiplication are the same thing?). This phenomenon is somewhat manifested in the well known fact that when we take cartesian product of vector spaces, the dimensions add: the dimension of the cartesian product of two vector spaces is equal to the sum of the dimensions of those vector spaces.

**3.5. Exercises**

*Exercise 1*. Come up with a notion of a structure-preserving map between dynamical systems, in a way to enable formation of the

*category of dynamical systems*and of a forgetful functor from this category to the category of sets.

*Note: the rest of the exercises require familiarity with the mathematical notion of a vector space.*

*Exercise 2*. In the video lecture, it was claimed (41:18 to 42:00) that scalar multiplication turns a vector space into a dynamical system. This is actually, not quite true. There are two problems. Firstly, scalar multiplication makes use of all real numbers and not only the non-negative ones. Secondly, both axioms of a dynamical system fail! However, it is possible to "fix" this erroneous claim, by considering only the non-negative real numbers and defining F(t) to map a vector "v" not to the scalar product "tv", but to the scalar product "exp(t)v". Check that we then indeed get a dynamical system.

*Note that there is also a more general notion of a dynamical system where instead of the time category we could have any category having a single object. With this more general notion, the claim made in the lecture is no longer invalid.*

*Exercise 3.*Consider a vector space as a category where objects are points in the space and arrows are "vectors" connecting the points. So there will be exactly one arrow between any two objects (composition will then be forced to be defined in a unique way). Map each point to a vector space with the same underlying set as the original vector space, but where the zero vector is the selected point. Show that this gives a functor from the given vector space seen as a category, to the category of vector spaces, by describing to which linear maps are the arrows mapped and checking that the functor axioms hold.

*This exercise is inspired by the discussion from 54:55 to 1:04:40 of the video lecture -- the example of a functor partially described in this discussion actually works, even though we were not quite able to make it work during the discussion. See the video below for a sketch of the solution of this exercise.*

*Exercise 4*. The category of matrices is defined as follows. Objects are natural numbers. Arrows from a natural number "n" to a natural number "m" are m by n matrices. Composition of arrows is given by multiplication of matrices. Verify that this is indeed a category and then construct a functor from this category to the category of vector spaces, by mapping natural number "n" to the n-dimensional vector space

*This exercise is based on the discussion from 1:05:40 to 1:07:45 of the lecture.*

*Exercise 5.*Construct a functor from the category of natural numbers to the category of vector spaces, which acts on objects in a similar way as the functor described in Exercise 4. Generalize this idea to get a functor from the category of sets to the category of vector spaces.

*This would answer the question asked at 51:14 in the video lecture.*

## Comments

## Post a Comment