advanced34 min studyLesson 531 in Mathematics

Categories, morphisms, and composition

Build categories from typed arrows and distinguish smallness, composition, and isomorphism.

On this page

What you’ll understand

  • Verify identity and associativity laws with correctly typed arrows.
  • Count arrows and composable pairs in a finite poset category.
  • Distinguish small categories, locally small categories, and isomorphic objects.

A category records which transformations are allowed and how consecutive transformations combine. The objects could be sets, groups, or positions in an order; the arrows need not be ordinary functions. This change of viewpoint is useful only when the allowed compositions are specified precisely. A drawing of nodes and arrows is therefore a starting point, rather than a complete definition. We will build small examples in which every arrow and every possible composition can actually be checked.

Typed composition is the basic operation

For objects AA and BB, write C(A,B)\mathcal C(A,B) for the collection of arrows with source AA and target BB. Given f:A→Bf:A\to B and g:B→Cg:B\to C, composition produces g∘f:A→Cg\circ f:A\to C. The order of the symbols matters: the rightmost arrow acts first. Composition is not defined for arbitrary pairs of arrows. In a category of functions, an output set must match the next input set; in an abstract category this matching is part of the data.

Every object has an identity arrow, and composition must satisfy the identity and associativity laws. Associativity compares two bracketings of the same three-arrow path; it does not say that two arrows commute. Once these laws hold, longer composable paths have an unambiguous composite. A directed graph with no chosen composites is not yet a category. Its free category adds all finite paths, including empty paths as identities, and uses concatenation for composition.

h∘(g∘f)=(h∘g)∘f,idB∘f=f=f∘idA.h\circ(g\circ f)=(h\circ g)\circ f,\qquad \mathrm{id}_B\circ f=f=f\circ\mathrm{id}_A.
The expressions are defined for a path A to B to C to D; identities have the indicated endpoint types.↔ Scroll wide equations horizontally.

Finite orders and one-object categories

A partially ordered set becomes a category by putting exactly one arrow x→yx\to y when x≤yx\le y. Reflexivity supplies identities and transitivity supplies composites. Because each relevant arrow is unique, the category laws follow automatically. The Hasse diagram usually suppresses identities and transitive arrows, so its visible edges are not the full morphism collection. Recovering the missing arrows is essential before counting maps or testing a universal property.

Another useful example has one object and a monoid of endomorphisms. The monoid multiplication is composition, and its unit is the object's identity. A group gives a special case in which every arrow is invertible. In a poset category, an isomorphism between xx and yy would require both inequalities, so antisymmetry forces equality. A preorder can instead have distinct isomorphic objects. Thus the relationship between equality and isomorphism depends on the chosen category.

P(x,y)={{∗},x≤y,∅,x≰y.\mathcal P(x,y)=\begin{cases}\{*\},&x\le y,\\ \varnothing,&x\nleq y.\end{cases}
A poset category has at most one arrow of each source-target type; its arrows encode the order relation.↔ Scroll wide equations horizontally.

Size and invertibility require separate checks

A category is small when its objects and all its arrows form sets. It is locally small when each collection C(A,B)\mathcal C(A,B) is a set, even if the objects form a proper class. Throughout, Set means sets in a fixed universe; it is large relative to that universe but locally small. Our finite categories are small. Later constructions involving categories of functors will state smallness assumptions rather than quietly treating every collection as a set.

An isomorphism f:A→Bf:A\to B has an arrow g:B→Ag:B\to A whose two composites are the appropriate identities. Both conditions are required. The inverse is unique: any other candidate hh satisfies h=h(fg)=(hf)g=gh=h(fg)=(hf)g=g. Isomorphic objects can still have different names or different underlying sets. When we later call a construction unique up to unique isomorphism, uniqueness refers to an isomorphism compatible with the specified structure, not to every bare isomorphism between the objects.

g∘f=idA,f∘g=idB⟹f is an isomorphism.g\circ f=\mathrm{id}_A,\qquad f\circ g=\mathrm{id}_B\quad\Longrightarrow\quad f\text{ is an isomorphism}.
The inverse reverses source and target, and both composite identities are part of the definition.↔ Scroll wide equations horizontally.

The full category of a three-point chain

Make the ordered set 0<1<20<1<2 into a category. Count its morphisms and its ordered composable pairs, including identity arrows. Explain why the visible two-edge Hasse diagram does not contain all the arrows needed for composition.

  1. There are three identities and three strict-order arrows: 0→10\to1, 1→21\to2, and 0→20\to2. Thus there are six morphisms. The last one must be present to receive the composite of the first two.

  2. A composable pair is determined by a weakly increasing triple of endpoints. With middle object zero, there is one possible source and three targets; with middle object one, there are two sources and two targets; with middle object two, there are three sources and one target.

  3. Add these disjoint cases to get ten pairs. For example, the pair 0→1→20\to1\to2 composes to the unique arrow 0→20\to2, while a pair involving an identity composes to its other member.

∣Mor⁡(C)∣=3+3=6,N2=1⋅3+2⋅2+3⋅1=10.|\operatorname{Mor}(\mathcal C)|=3+3=6,\qquad N_2=1\cdot3+2\cdot2+3\cdot1=10.
Counting by the middle endpoint avoids confusing paths with arrows.↔ Scroll wide equations horizontally.
The result

The category has six morphisms and ten ordered composable pairs. Only its three identity arrows are isomorphisms.

Explore the model

Interactive lab

Interactive lab · modular

A monoid seen through one orbit

Pause and Reset, then set modulus to 6 and additive step to 2. Predict the three residues reached from zero and use Step three times to see the return. For a fresh comparison, Pause and Reset again, then set modulus to 6 and step to 1; predict a six-step return. Interpret residues as endomorphisms of one object, with addition as composition. They are not six objects of that category. Control changes retain elapsed time, which is why each comparison starts with Reset.

A monoid seen through one orbitAddition modulo m starts at zero: rₙ = na mod m. Playback advances two additions per second. The orbit has period m/gcd(m,a), including period one for a = 0. This is not a cryptographic security test or a primality algorithm. Current readings: Residue r0: 0; Orbit period · m/gcd(m,a): 12; Distinct residues visited: 1 of 12. All parameters are adjustable with the labeled controls below.Repeated addition modulo 12: the current residue is 0, and the orbit period is 12.01234567891011+ 5mod 12An additive orbitn = 0rₙ = 0Period = 12Cycle starts at 0:0 → 5 → 10 → 3 →8 → 1 → 6 → 11 →4 → 9 → 2 → 7 → 0Exact residues · two additions per second
Additive orbitCurrent residue / next edge
Residue r0
0
Orbit period · m/gcd(m,a)
12
Distinct residues visited
1 of 12
t = 0 s

Addition modulo m starts at zero: rₙ = na mod m. Playback advances two additions per second. The orbit has period m/gcd(m,a), including period one for a = 0. This is not a cryptographic security test or a primality algorithm. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forThe orbit displays a generated cyclic submonoid; checking one orbit does not establish the axioms for an arbitrary category.

Check your understanding

In the category associated with a partially ordered set, when are two objects isomorphic?

Try it yourself

Use divisibility to make the six positive divisors of 12 into a category. Count all arrows, including identities, and identify the isomorphisms.

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

For each possible source, count its multiples that are still divisors of 12. Keep source and target ordered.

Compare with the solution

The sources 1, 2, 3, 4, 6, and 12 have respectively 6, 4, 3, 2, 2, and 1 allowed targets. Their sum is 18. Divisibility is antisymmetric on positive integers, so arrows can have inverses only when their endpoints agree. The six identities are exactly the isomorphisms.

Take it with you

  • Composition is typed, associative, and equipped with an identity at every object.
  • A Hasse diagram suppresses identities and transitive morphisms.
  • Local smallness concerns individual Hom collections, while smallness also concerns the total object collection.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.