Enriched and monoidal categories
Replace Hom sets by structured objects and interpret directed shortest paths as enriched composition.
On this page
The question for today
What you’ll understand
- State the tensor, unit, and coherence data needed for a monoidal base.
- Interpret enriched composition in Boolean and extended-distance bases.
- Compute a directed distance closure and check its enriched triangle inequalities.
Ordinary categories use sets of arrows. Enriched categories replace those sets by objects carrying another kind of structure, while composition becomes a morphism in a chosen base category. To combine two such Hom objects, the base needs a tensor product and a unit with coherent associativity. Boolean truth values recover preorders; nonnegative extended distances recover a generalized notion of metric space. These examples make the enriched axioms concrete while showing which familiar metric assumptions are additional.
The monoidal base supplies a coherent tensor
A monoidal category has a tensor bifunctor, a unit object I, and natural associator and left and right unit isomorphisms. The associator satisfies a pentagon identity, and the unit maps satisfy a triangle identity. These coherence conditions ensure that differently bracketed compositions interact consistently. Associativity is not assumed to be literal equality of objects: even Cartesian products are ordinarily connected by canonical rebracketing isomorphisms rather than identical ordered-pair encodings.
A symmetric monoidal category has additional coherent symmetry maps. A closed monoidal category has internal Hom objects implementing tensor–Hom adjunctions. Neither symmetry nor closedness is required merely to define an enriched category over a monoidal base. They become necessary assumptions for particular further constructions and theorems. For example, a general enriched functor category may demand suitable closedness and limits; those properties cannot be inferred just from the existence of a tensor.
Composition now lives inside the base
A -enriched category has objects x, a Hom object in the base for every ordered pair, composition morphisms from to , and identity morphisms from I to . Associativity and identity diagrams use the base's coherence maps. When the base is locally small, its ordinary maps from I into these Hom objects form the Hom sets of an underlying ordinary category.
Take the Boolean poset with tensor given by conjunction and unit true. A Hom object is a truth value expressing whether x relates to y. Identity requires reflexivity, and composition requires transitivity. Antisymmetry is not an enriched axiom, so this base describes preorders rather than only partially ordered sets. The base is symmetric, but that does not require its enriched relation to be symmetric: a directed order is already a counterexample.
Distances are Hom objects with reversed order
Use the monoidal poset , where an arrow from r to s exists when r is at least s. Composition becomes the usual triangle inequality, and the unit forces a zero self-distance. The allowed infinity satisfies the standard extended addition rule. Neither symmetry nor separation of distinct points at positive distance is required. These are Lawvere generalized metric spaces, whose axioms are weaker than those of ordinary symmetric, separated metric spaces.
For a finite directed graph with nonnegative edge weights, shortest-path distances provide such an enrichment whenever all distances are interpreted with infinity for missing routes. Concatenating two paths proves the triangle inequality after taking shortest lengths. Raw edge weights need not satisfy it, so taking their closure changes some entries. The associated ordinary category has a morphism exactly when the distance is zero, since a base map from the unit zero to a distance exists precisely in that case.
Work it through
Close a directed three-point distance table
On vertices A, B, C, give directed edges A→B weight 2, B→C weight 3, A→C weight 8, B→A weight 4, C→B weight 1, and C→A weight 10. Compute all shortest-path distances and identify what prevents the raw edge table from already defining a distance enrichment.
The path A→B→C has length five, shortening the raw A→C edge of weight eight. The path C→B→A also has length five, shortening the raw C→A edge of weight ten. The other four nonidentity edges are not shortened by routing through the third vertex.
Use zero on the diagonal and these shortest values off the diagonal. The resulting matrix in A,B,C order has rows , , and . Concatenating shortest paths gives every triangle inequality; direct checks give equalities for A→C through B and C→A through B.
The raw table fails the A,B,C triangle because eight exceeds two plus three; it also fails the reverse triangle because ten exceeds one plus four. The corrected table is asymmetric, since A→B has distance two while B→A has distance four, which is permitted for this enrichment.
Shortest-path closure gives a valid asymmetric distance enrichment. The raw edge table fails two required triangles and must first be closed.
The living notebook
Explore the model
Interactive lab · vectors
Inspect a triangle inequality without a graph solver
Pause and Reset, then set angle to 0 degrees and magnitude to 2; record u=(2,0). For a fresh comparison, Pause and Reset, then set angle to 90 degrees and magnitude to 3; record v=(0,3). Predict on paper that their sum has length √13, at most 5. The instrument shows one vector and its projections at a time, not a shortest-path graph or an enriched category. Control changes keep elapsed time, so Reset and both settings are required for each fresh comparison.
- x component
- 1.393
- y component
- 0.975
- Magnitude
- 1.7
Playback traces a fixed vector and its projections. Angle and magnitude set the geometry; the moving marker does not change them. 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 triangle inequality gives a compositional bound, while an enrichment additionally specifies its base, Hom objects, identities, and coherence.
Pause & reason
Check your understanding
Your turn
Try it yourself
In the Boolean monoidal base, use three objects a, b, c. Declare a and b related in both directions, both related to c, each related to itself, and no relation from c back to a or b. Does this define an enriched category? Is it a partial order, and are a and b isomorphic in its underlying category?
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Check reflexivity and transitivity separately from antisymmetry. In a category with at most one arrow of each type, opposite arrows automatically compose to the available identities.
Compare with the solution
All identities are present, and composing any two declared relations produces another declared relation. Thus this is a Boolean-enriched category, equivalently a preorder. It is not a partial order because distinct a and b are mutually related. In the underlying ordinary category the unique arrows a→b and b→a compose to the unique endomorphisms, which are identities, so a and b are isomorphic despite being distinct objects.
Keep the idea
Take it with you
- A monoidal base supplies tensor and unit coherence for enriched composition.
- Boolean enrichment gives preorders without requiring antisymmetry.
- Extended-distance enrichment allows asymmetry, zero distances between distinct points, and infinity.
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.