category theory

# Contents

## Definition

### In a plain category

Composition is the operation that takes morphisms $f:x\to y$ and $g:y\to z$ in a category and produces a morphism $g\circ f:x\to z$, called the composite of $f$ and $g$.

Note that this composition is unique by the axioms of category theory. If we instead work in a weak higher category, composition need not be unique. In this sense we may identify the composite of $f$ and $g$ with the colimit over the diagram $a\stackrel{f}{\to }b\stackrel{g}{\to }c$. This point of view is taken and generalized in transfinite composition.

### In an enriched category

In enriched category theory, for $V$ a monoidal category the composition operation on a $V$-enriched category $C$ is for each triple $\left(x,y,z\right)$ of objects of $C$ a morphism

${\circ }_{x,y,z}:C\left(x,y\right)\otimes C\left(y,z\right)\to C\left(x,z\right)$\circ_{x,y,z} : C(x,y) \otimes C(y,z) \to C(x,z)

in $V$.

This reduces to the above definition in the case that $V=$ Set. The composition morphism ${\circ }_{x,y,z}$ sends any two composable morphisms to their composite.

${\circ }_{x,y,z}:\left(\left(x\stackrel{f}{\to }y\right),\left(y\stackrel{g}{\to }z\right)\right)\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}↦\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\left(x\stackrel{g\circ f}{\to }z\right)\phantom{\rule{thinmathspace}{0ex}}.$\circ_{x,y,z} : ((x \stackrel{f}{\to} y), (y \stackrel{g}{\to} z)) \;\; \mapsto \;\; (x \stackrel{g\circ f}{\to} z) \,.

### For internal homs

Let $\left(𝒞,\otimes \right)$ be a closed monoidal category. Write $\left[-,-\right]:{𝒞}^{\mathrm{op}}×𝒞\to 𝒞$ for the corresponding internal hom.

###### Definition

For $X,Y,Z\in 𝒞$ three objects, the composition morphism

${\circ }_{X,Y,Z}:\left[Y,Z\right]×\left[X,Y\right]\to \left[X,Z\right]$\circ_{X,Y,Z} : [Y, Z] \times [X, Y] \to [X, Z]

is the $\left(\left(-\right)\otimes X⊢\left[X,-\right]\right)$-adjunct of the following composite of two evaluation maps, def. \ref{EvalMap}:

$\left[Y,Z\right]×\left[X,Y\right]×X\stackrel{\left({\mathrm{id}}_{\left[Y,Z\right]},{\mathrm{eval}}_{X,Y}\right)}{\to }\left[Y,Z\right]×Y\stackrel{{\mathrm{eval}}_{Y,Z}}{\to }Z\phantom{\rule{thinmathspace}{0ex}}.$[Y, Z] \times [X , Y] \times X \stackrel{(id_{[Y,Z]}, eval_{X,Y})}{\to} [Y,Z] \times Y \stackrel{eval_{Y,Z}}{\to} Z \,.

## Higher arity

Strictly speaking, composition as defined above is binary composition. One can also define $n$-ary composites for any natural number $n\ge 0$: given $n+1$ objects ${x}_{0},\dots ,{x}_{n}$ and $n$ morphisms ${f}_{i}:{x}_{i-1}\to {x}_{i}$, we get the composite ${f}_{n}\circ \dots \circ {f}_{1}:{x}_{0}\to {x}_{n}$. Since composition in a category is associative, a definition of $n$-ary composition from binary composition via any choice of bracketing will be equal to that resulting from any other choice of bracketing. The unary composite of ${f}_{1}:{x}_{0}\to {x}_{1}$ is simply $f$ itself, and the nullary composite of ${x}_{0}$ is its identity morphism.

Conversely, a category can equivalently be defined as a quiver (a directed graph) equipped with an $n$-ary composition operation for every natural number $n\ge 0$, satisfying suitable associativity axioms. This definition may be called unbiased, as opposed to the usual definition which is “biased” towards $0$ and $2$.

## Notation

Traditionally, the composite of $f$ and $g$ as above is written $g\circ f$, following the notation introduced by the followers of Leibniz for composition of functions. This is often abbreviated as simply $gf$. Of course, this notation preserves the order of symbols in the elementwise definition of function composition: $\left(g\circ f\right)\left(x\right)=g\left(f\left(x\right)\right)$.

On the other hand, reading a diagram

$x\stackrel{f}{\to }y\stackrel{g}{\to }z$x \stackrel{f}\to y \stackrel{g}\to z

the notation $fg$ reads better. One way to make this anti-Leibniz convention clearer is to write $f;g$ (which is based on the interpretation of programming commands as morphisms in theoretical computer science). Since this convention is motivated by the drawing of diagrams, it is also sometimes called diagrammatic order.

Therefore, the notations $gf$ and $fg$ are ambiguous, while $g\circ f$ and $f;g$ are less so. It seems that the notation $gf$ for $g\circ f$ is more common than $fg$ for $f;g$, although the $fg$ notation occurs in some important older papers.

Although diagrammatic order has advantages and partisans, especially among category theorists and computer scientists, the “classical” order of composition is firmly entrenched in much of mathematics. Many people who agree that diagrammatic order is “better” on its own merits nevertheless believe that trying to change the established “classical” order of composition creates more confusion than it removes.

In some older category theory papers, arrows were written pointing from right to left, so that the composition of arrows could be written in the “classical” style, while still preserving the diagrammatic intuition. Hom-sets were accordingly written $C\left(b,a\right)$, where $a$ is the source, and $b$ is the target. This sort of convention has also been used by people working with string diagrams and surface diagrams.

Revised on August 27, 2013 23:25:57 by Anonymous Coward (71.245.238.173)