# Commutative Algebra/Objects and morphisms

## Basics

Definition 1.1 (categories):

A category ${\displaystyle {\mathcal {C}}}$ is a collection of objects together with morphisms, which go from an object ${\displaystyle a\in {\mathcal {C}}}$ to an object ${\displaystyle b\in {\mathcal {C}}}$ each (where ${\displaystyle a}$ is called the domain and ${\displaystyle b}$ the codomain), such that

1. Any morphism ${\displaystyle f:a\to b}$ can be composed with a morphism ${\displaystyle g:b\to c}$ such that the composition of the two is a morphism ${\displaystyle g\circ f:a\to c}$.
2. For each ${\displaystyle a\in {\mathcal {C}}}$, there exists a morphism ${\displaystyle 1_{a}:a\to a}$ such that for any morphism ${\displaystyle f:a\to b}$ we have ${\displaystyle f\circ 1_{a}=f}$ and for any morphism ${\displaystyle g:b\to a}$ we have ${\displaystyle 1_{a}\circ g=g}$.

Examples 1.2:

1. The collection of all groups together with group homomorphisms as morphisms is a category.
2. The collection of all rings together with ring homomorphisms is a category.
3. Sets together with ordinary functions form the category of sets.

To every category we may associate an opposite category:

Definition 1.3 (opposite categories):

Let ${\displaystyle {\mathcal {C}}}$ be a category. The opposite category of ${\displaystyle {\mathcal {C}}}$ is the category consisting of the objects of ${\displaystyle {\mathcal {C}}}$, but all morphisms are considered to be inverted, which is done by simply define codomains to be the domain of the former morphism and domains to be codomains of former morphisms.

For instance, within the opposite category of sets, a function ${\displaystyle f:S\to T}$ (where ${\displaystyle S}$, ${\displaystyle T}$ are sets) is a morphism ${\displaystyle T\to S}$.

## Algebraic objects within category theory

A category is such a general object that some important algebraic structures arise as special cases. For instance, consider a category with one object. Then this category is a monoid with composition as its operation. On the other hand, if we are given an arbitrary monoid, we can define the elements of that monoid to be the morphisms from a single object to itself, and thus have found a representation of that monoid as a category with one object.

If we are given a category with one object, and the morphisms all happen to be invertible, then we have in fact a group structure. And further, just as described for monoids, we can turn every group into a category.

## Special types of morphisms

The following notions in category may have been inspired by stuff that happens within the category of sets and similar categories.

In the category of sets, we have surjective functions and injective functions. We may characterise those as follows:

Theorem 1.4:

Let ${\displaystyle X,Y}$ be sets and ${\displaystyle f:X\to Y}$ be a function. Then:

• ${\displaystyle f}$ is surjective if and only if for all sets ${\displaystyle Z}$ and functions ${\displaystyle g,h:Y\to Z}$ ${\displaystyle g\circ f=h\circ f}$ implies ${\displaystyle g=h}$.
• ${\displaystyle f}$ is injective iff for all sets ${\displaystyle W}$ and functions ${\displaystyle g,h:W\to X}$ ${\displaystyle f\circ g=f\circ h}$ implies ${\displaystyle g=h}$.

Proof:

We begin with the characterisation of surjectivity.

${\displaystyle \Rightarrow }$: Let ${\displaystyle f}$ be surjective, and let ${\displaystyle g\circ f=h\circ f}$. Let ${\displaystyle y\in Y}$ be arbitrary. Since ${\displaystyle f}$ is surjective, we may choose ${\displaystyle x\in X}$ such that ${\displaystyle f(x)=y}$. Then we have ${\displaystyle g(y)=g(f(x))=h(f(x))=h(y)}$. Since ${\displaystyle y\in Y}$ was arbitrary, ${\displaystyle g=h}$.

${\displaystyle \Leftarrow }$: Assume that for all sets ${\displaystyle Z}$ and functions ${\displaystyle g,h:Y\to Z}$ ${\displaystyle g\circ f=h\circ f}$ implies ${\displaystyle g=h}$. Assume for contradiction that ${\displaystyle f}$ isn't surjective. Then there exists ${\displaystyle y_{0}\in Y}$ outside the image of ${\displaystyle f}$. Let ${\displaystyle Z=\{1,2\}}$. We define ${\displaystyle g,h:Y\to Z}$ as follows:

${\displaystyle g(y)=1\forall y\in Y}$, ${\displaystyle h(y)={\begin{cases}1&y\neq y_{0}\\2&y=y_{0}\end{cases}}}$.

Then ${\displaystyle g\circ f=h\circ f=1}$ (since ${\displaystyle y_{0}}$, the only place where the second function might be ${\displaystyle 2}$, is never hit by ${\displaystyle f}$), but ${\displaystyle g\neq h}$.

Now we prove the characterisation of injectivity.

${\displaystyle \Rightarrow }$: Let ${\displaystyle f}$ be injective, let ${\displaystyle W}$ be another set and let ${\displaystyle g,h:W\to X}$ be two functions such that ${\displaystyle f\circ g=f\circ h}$. Assume that ${\displaystyle g(w)\neq h(w)}$ for a certain ${\displaystyle w\in W}$. Then ${\displaystyle f(g(w))\neq f(h(w))}$ due to the injectivity of ${\displaystyle f}$, contradiction.

${\displaystyle \Leftarrow }$: Assume that for all sets ${\displaystyle W}$ and functions ${\displaystyle g,h:W\to X}$ ${\displaystyle f\circ g=f\circ h}$ implies ${\displaystyle g=h}$. Let ${\displaystyle x,y\in X}$ be arbitrary such that ${\displaystyle f(x)=f(y)}$. Take ${\displaystyle W=\{1\}}$ and ${\displaystyle g(1)=x,h(1)=y}$. Then ${\displaystyle x=y}$ and hence surjectivity.${\displaystyle \Box }$

It is interesting that the change from injectivity and surjectivity swapped the use of indirect proof from the ${\displaystyle \Leftarrow }$-direction to the ${\displaystyle \Rightarrow }$-direction.

Since in the characterisation of injectivity and surjectivity given by the last theorem there is no mention of elements of sets any more, we may generalise those concepts to category theory.

Definition 1.5:

Let ${\displaystyle {\mathcal {C}}}$ be a category, and let ${\displaystyle f}$ be a morphism of ${\displaystyle {\mathcal {C}}}$. We say that

• ${\displaystyle f:X\to Y}$ is an epimorphism if and only if for all objects ${\displaystyle Z}$ of ${\displaystyle {\mathcal {C}}}$ and all morphisms ${\displaystyle g,h:Y\to Z}$ ${\displaystyle g\circ f=h\circ f\Rightarrow g=h}$, and
• ${\displaystyle f:X\to Y}$ is a monomorphism if and only if for all objects ${\displaystyle W}$ of ${\displaystyle {\mathcal {C}}}$ and all morphisms ${\displaystyle g,h:W\to X}$ ${\displaystyle f\circ g=f\circ h\Rightarrow g=h}$.

### Exercises

• Exercise 1.3.1: Come up with a category ${\displaystyle {\mathcal {C}}}$, where the objects are some finitely many sets, such that there exists an epimorphism that is not surjective, and a monomorphism that is not injective (Hint: Include few morphisms).

## Terminal, initial and zero objects and zero morphisms

Within many categories, such as groups, rings, modules,... (but not fields), there exist some sort of "trivial" objects which are the simplest possible; for instance, in the category of groups, there is the trivial group, consisting only of the identity. Indeed, within the category of groups, the trivial group has the following property:

Theorem 1.6:

Let ${\displaystyle |G|=1}$ and let ${\displaystyle H}$ be another group. Then there exists exactly one homomorphism ${\displaystyle f:H\to G}$ and exactly onee homomorphism ${\displaystyle g:G\to H}$.

Futhermore, if ${\displaystyle {\tilde {G}}}$ is any other group with the property that for every other group ${\displaystyle H}$, there exists exactly one homomorphism ${\displaystyle {\tilde {G}}\to H}$ and exactly one homomorphism ${\displaystyle H\to {\tilde {G}}}$, then ${\displaystyle |{\tilde {G}}|=1}$.

Proof: We begin with the first part. Let ${\displaystyle f:H\to G}$ be a homomorphism, where ${\displaystyle |G|=1}$. Then ${\displaystyle f}$ must take the value of the one element of ${\displaystyle G}$ everywhere and is thus uniquely determined. If furthermore ${\displaystyle g:G\to H}$ is a homomorphism, by the homomorphism property we must have ${\displaystyle g(\iota )=1_{H}}$ (otherwise obtain a contradiction by taking a power of ${\displaystyle \iota }$).

Assume now that ${\displaystyle |{\tilde {G}}|>1}$, and let ${\displaystyle \tau }$ be an element within ${\displaystyle {\tilde {G}}}$ that does not equal the identity. Let ${\displaystyle n:={\text{ord}}\tau }$. We define a homomorphism ${\displaystyle f:Z_{n}\to {\tilde {G}}}$ by ${\displaystyle f(k):=\tau ^{k}}$. In addition to that homomorphism, we also have the trivial homomorphism ${\displaystyle Z_{n}\to {\tilde {G}}}$. Hence, we don't have uniqueness.${\displaystyle \Box }$

Using the characterisation given by theorem 1.6, we may generalise this concept into the language of category theory.

Definition 1.7:

Let ${\displaystyle {\mathcal {C}}}$ be a category. A zero object of ${\displaystyle {\mathcal {C}}}$ is an object ${\displaystyle Z}$ of ${\displaystyle {\mathcal {C}}}$ such that for all other objects ${\displaystyle X,Y}$ of ${\displaystyle {\mathcal {C}}}$ there exist unique morphisms ${\displaystyle f:X\to Z}$ and ${\displaystyle g:Z\to Y}$.

Within many usual categories, such as groups (as shown above), but also rings and modules, there exist zero objects. However, not so within the category of sets. Indeed, let ${\displaystyle S}$ be an arbitrary set. If ${\displaystyle |S|\geq 2}$, then from any nonempty set there exist at least 2 morphisms with codomain ${\displaystyle S}$, namely the two constant functions. If ${\displaystyle |S|=1}$, we may pick a set ${\displaystyle T}$ with ${\displaystyle |t|>2}$ and obtain two morphisms from ${\displaystyle S}$ mapping to ${\displaystyle T}$. If ${\displaystyle S=\emptyset }$, then there does not exist a function ${\displaystyle T\to S}$.

But, if we split the definition 1.6 in half, each half can be found within the category of sets.

Definition 1.8:

Let ${\displaystyle {\mathcal {C}}}$ be a category. An object ${\displaystyle X}$ of ${\displaystyle {\mathcal {C}}}$ is called

• terminal iff for every other object ${\displaystyle Y}$ of ${\displaystyle {\mathcal {C}}}$ there exists exactly one morphism ${\displaystyle Y\to X}$;
• initial iff for every other object ${\displaystyle Y}$ of ${\displaystyle {\mathcal {C}}}$ there exists exactly one morphism ${\displaystyle X\to Y}$.

In the category of sets, there exists one initial object and millions (actually infinitely many, to be precise) terminal objects. The initial object is the empty set; the argument above definition 1.7 shows that this is the only remaining option, and it is a valid one because any morphism from the empty set to any other set is the empty function. Furthermore, every set with exactly one element is a terminal object, since every morphism mapping to that set is the constant function with value the single element of that set. Hence, by generalizing the concept of a zero object in two different directions, we have obtained a fine description for the symmetry breaking at the level of sets.

Now returning to the category of groups, between any two groups there also exist a particularly trivial homomorphism, that is the zero homomorphism. We shall also elevate this concept to the level of categories. The following theorem is immediate:

Theorem 1.9:

Let ${\displaystyle T}$ be the trivial group, and let ${\displaystyle H}$ and ${\displaystyle G}$ be any two groups. If ${\displaystyle f:H\to T}$ and ${\displaystyle g:T\to G}$ are homomorphisms, then ${\displaystyle g\circ f}$ is the trivial homomorphism.

Now we may proceed to the categorical definition of a zero morphism. It is only defined for categories that have a zero object. (There exists a more general definition, but it shall be of no use to us during the course of this book.)

Definition 1.10:

Let ${\displaystyle {\mathcal {C}}}$ be a category with a zero object ${\displaystyle Z}$, and let ${\displaystyle X,Y}$ be objects of that category. Then the zero morphism from ${\displaystyle X}$ to ${\displaystyle Y}$ is defined as the composition of the two unique morphisms ${\displaystyle X\to Z}$ and ${\displaystyle Z\to Y}$.