## Multiplication:composition::monoid:category

The last example in the previous post was the monoid consisting of all functions from a set to itself under composition. We could multiply the elements (i.e. compose them) in any order because the source and the target were the same, the set .

For arbitrary sets, we still know how to compose, but we have some restrictions on what functions are composable: the target of the first has to match the source of the second. Given and , we can compose them:

So where multiplication had to start and end at the same place, composition can wander around.

**Just as the essence of a monoid is multiplication, the essence of a category is composition.**

A category consists of

- a collection of
*objects*and - for each pair of objects a set of
*morphisms*or*arrows*from to (if we write )

such that

- for every object there is a morphism ,
- for every triple of objects and pair of morphisms there is a
*composite morphism*and

- composition is associative
- and obeys the left- and right-unit laws

One simple structure on which something can wander is a directed graph. It has vertices and directed edges between them. We can’t compose two edges and get a new edge, but we can compose two paths and get a new path. Every directed graph gives rise to a category whose objects are the vertices of the graph and whose morphisms are paths in the graph, including “identity paths” that start and end at the same point without going anywhere in between.

Whereas a graph is discrete, a manifold (like a circle or Euclidean space) is continuous. Any manifold gives rise to a category whose objects are the points of the space and whose morphisms are paths between them.

Here are more examples of categories:

1. The empty category:

- no objects
- no morphisms

- one object
- one trivial morphism

3. The category “2”:

- two objects
- the trivial morphisms and one nontrivial morphism

4. The category **Set** of all sets:

- objects are sets
- morphisms are functions
- For example, {1,2} and {purple, green, yellow} are two objects in
**Set**, and the function , where and is a morphism in

5. Any monoid “is” a one-object category:

- one object
- the set of morphisms from to itself is equipped with extra structure that makes it a monoid. We define the category in terms of the monoid as follows:

For example, the real numbers under multiplication form a monoid, so we get a category where

- there’s one object and
- .
- Given we compose them by multiplying them:

Note: could be anything, as long as it makes sense to multiply it by a real number.

For example, could be the set of scalings of a picture of a dog. Then a morphism from to itself would be a function, since functions are the things that go between sets, and the function would be parameterized by a real number We define

the picture scaled by a factor and

The identity morphism in this case is

Or, could be the lone dot in a one-dot graph with infinitely many self-loops, each labelled with a real number. We then say the weight of a path on the graph is the product of the loop labels. The identity morphism is the self-loop labelled with the number 1.

6. Any collection of algebraic gadgets and the structure-preserving maps between them. For example, a *ring* is an algebraic gadget with two monoids that work together:

- there’s a set
- two different special points, or identities: the multiplicative identity and the additive identity
- two different associative binary operations
- multiplication:
- addition, which is also commutative:

- multiplication distributes over addition:

There is a category **Ring** consisting of all rings and maps between them that preserve the ring structure.

- objects: rings
- morphisms: ring homomorphisms
- A
*ring homomorphism*is a map between rings that preserves the ring structure: identities, multiplication and addition. That is, it doesn’t matter which way you go around the squares below; the answer will be the same either way:

- For example, the ring of integers is an object in
**Ring**, as is the ring (where denotes integers modulo The set where 0 is the ring homomorphism that takes all integers to zero and is the map that takes each integer to its remainder modulo 2.

- A

leave a comment