# Commutative Algebra/Functors, natural transformations, universal arrows

## Functors

### Definitions

There are two types of functors, covariant functors and contravariant functors. Often, a covariant functor is simply called a functor.

Definition 2.1:

Let ${\displaystyle {\mathcal {C}},{\mathcal {D}}}$ be two categories. A covariant functor ${\displaystyle F:{\mathcal {C}}\to {\mathcal {D}}}$ associates

• to each object ${\displaystyle A}$ of ${\displaystyle {\mathcal {C}}}$ an object ${\displaystyle F(A)}$ of ${\displaystyle {\mathcal {D}}}$, and
• to each morphism ${\displaystyle f:A\to B}$ in ${\displaystyle {\mathcal {C}}}$ a morphism ${\displaystyle F(f):F(A)\to F(B)}$,

such that the following rules are satisfied:

1. For all objects ${\displaystyle A}$ of ${\displaystyle {\mathcal {C}}}$ we have ${\displaystyle F(1_{A})=1_{F(A)}}$, and
2. for all morphisms ${\displaystyle f:A\to B}$ and ${\displaystyle g:B\to C}$ of ${\displaystyle {\mathcal {C}}}$ we have ${\displaystyle F(g\circ f)=F(g)\circ F(f)}$.

Definition 2.2:

Let ${\displaystyle {\mathcal {C}},{\mathcal {D}}}$ be two categories. A contravariant functor ${\displaystyle F:{\mathcal {C}}\to {\mathcal {D}}}$ associates

• to each object ${\displaystyle A}$ of ${\displaystyle {\mathcal {C}}}$ an object ${\displaystyle F(A)}$ of ${\displaystyle {\mathcal {D}}}$, and
• to each morphism ${\displaystyle f:A\to B}$ in ${\displaystyle {\mathcal {C}}}$ a morphism ${\displaystyle F(f):F(B)\to F(A)}$,

such that the following rules are satisfied:

1. For all objects ${\displaystyle A}$ of ${\displaystyle {\mathcal {C}}}$ we have ${\displaystyle F(1_{A})=1_{F(A)}}$, and
2. for all morphisms ${\displaystyle f:A\to B}$ and ${\displaystyle g:B\to C}$ of ${\displaystyle {\mathcal {C}}}$ we have ${\displaystyle F(g\circ f)=F(f)\circ F(g)}$.

### Forgetful functors

I'm not sure if there is a precise definition of a forgetful functor, but in fact, believe it or not, the notion is easily explained in terms of a few examples.

Example 2.3:

Consider the category of groups with homomorphisms as morphisms. We may define a functor sending each group to it's underlying set and each homomorphism to itself as a function. This is a functor from the category of groups to the category of sets. Since the target objects of that functor lack the group structure, the group structure has been forgotten, and hence we are dealing with a forgetful functor here.

Example 2.4:

Consider the category of rings. Remember that each ring is an Abelian group with respect to addition. Hence, we may define a functor from the category of rings to the category of groups, sending each ring to the underlying group. This is also a forgetful functor; one which forgets the multiplication of the ring.

## Natural transformations

Definition 2.5:

Let ${\displaystyle {\mathcal {C}},{\mathcal {D}}}$ be categories, and let ${\displaystyle F,G:{\mathcal {C}}\to {\mathcal {D}}}$ be two functors. A natural transformation is a family of morphisms in ${\displaystyle {\mathcal {D}}}$ ${\displaystyle \eta _{X}:F(X)\to G(X)}$, where ${\displaystyle X}$ ranges over all objects of ${\displaystyle {\mathcal {C}}}$, that are compatible with the images of morphisms ${\displaystyle f:X\to Y}$ of ${\displaystyle {\mathcal {C}}}$ by the functors ${\displaystyle F}$ and ${\displaystyle G}$; that is, the following diagram commutes:

Example 2.6:

Let ${\displaystyle {\mathcal {C}}}$ be the category of all fields and ${\displaystyle {\mathcal {D}}}$ the category of all rings. We define a functor

${\displaystyle F:{\mathcal {C}}\to {\mathcal {D}}}$

as follows: Each object ${\displaystyle \mathbb {F} }$ of ${\displaystyle {\mathcal {C}}}$ shall be sent to the ring ${\displaystyle R_{\mathbb {F} }}$ consisting of addition and multiplication inherited from the field, and whose underlying set are the elements

${\displaystyle S_{\mathbb {F} }\{\overbrace {1_{\mathbb {F} }+1_{\mathbb {F} }+\cdots +1_{\mathbb {F} }} ^{n{\text{ times}}}|n\in \mathbb {N} _{0}\}\cup \{\overbrace {-1_{\mathbb {F} }-1_{\mathbb {F} }-\cdots -1_{\mathbb {F} }} ^{n{\text{ times}}}|n\in \mathbb {N} \}}$,

where ${\displaystyle 1_{\mathbb {F} }}$ is the unit of the field ${\displaystyle \mathbb {F} }$. Any morphism ${\displaystyle f:\mathbb {F} \to \mathbb {G} }$ of fields shall be mapped to the restriction ${\displaystyle f\upharpoonright _{S_{\mathbb {F} }}}$; note that this is well-defined (that is, maps to the object associated to ${\displaystyle \mathbb {G} }$ under the functor ${\displaystyle F}$), since both

${\displaystyle f(1_{\mathbb {F} }+1_{\mathbb {F} }+\cdots +1_{\mathbb {F} })=f(1_{\mathbb {F} })+f(1_{\mathbb {F} })+\cdots +f(1_{\mathbb {F} })=1_{\mathbb {G} }+1_{\mathbb {G} }+\cdots +1_{\mathbb {G} }}$

and

${\displaystyle f(-1_{\mathbb {F} }-1_{\mathbb {F} }-\cdots -1_{\mathbb {F} })=-f(1_{\mathbb {F} })-f(1_{\mathbb {F} })-\cdots -f(1_{\mathbb {F} })=-1_{\mathbb {G} }-1_{\mathbb {G} }-\cdots -1_{\mathbb {G} }}$,

where ${\displaystyle 1_{\mathbb {G} }}$ is the unit of the field ${\displaystyle \mathbb {G} }$.

We further define a functor

${\displaystyle G:{\mathcal {C}}\to {\mathcal {D}}}$,

sending each field ${\displaystyle \mathbb {F} }$ to its associated prime field ${\displaystyle \mathbb {F} _{\text{prime}}}$, seen as a ring, and again restricting morphisms, that is sending each morphism ${\displaystyle f:\mathbb {F} \to \mathbb {G} }$ to ${\displaystyle f\upharpoonright _{\mathbb {F} _{\text{prime}}}}$ (this is well-defined by the same computations as above and noting that ${\displaystyle f}$, being a field morphism, maps inverses to inverses).

In this setting, the maps

${\displaystyle \eta _{\mathbb {F} }:R_{\mathbb {F} }\to \mathbb {F} _{\text{prime}}}$,

given by inclusion, form a natural transformation from ${\displaystyle F}$ to ${\displaystyle G}$; this follows from checking the commutative diagram directly.

## Universal arrows

Definition 2.7 (universal arrows):

Let ${\displaystyle {\mathcal {C}},{\mathcal {D}}}$ be categories, let ${\displaystyle F:{\mathcal {C}}\to {\mathcal {D}}}$ be a functor, let ${\displaystyle Y}$ be an object of ${\displaystyle {\mathcal {D}}}$. A universal arrow is a morphism ${\displaystyle g:Y\to F(X)}$, where ${\displaystyle X}$ is a fixed object of ${\displaystyle {\mathcal {C}}}$, such that for any other object ${\displaystyle Z}$ of ${\displaystyle {\mathcal {C}}}$ and morphism ${\displaystyle h:Y\to F(Z)}$ there exists a unique morphism ${\displaystyle f:X\to Z}$ such that the diagram

commutes.