A category 𝒞 = (Ob(𝒞), Hom, ∘, id) consists of objects, morphisms between them, an associative composition operator, and an identity morphism on every object.
f: A → B, g: B → C
g∘f : A → C (composition)
id_A : A → A (identity, id_B∘f = f = f∘id_A)
h∘(g∘f) = (h∘g)∘f (associativity)
- Objects — the spheres; click empty space in "Object" mode to place one.
- Morphisms — click two objects in "Morphism" mode to draw an arrow f: A → B between them. Every object also carries a small identity loop id.
- Composition — the moment a chain f: A→B and g: B→C both exist, the engine automatically draws the gold composite arrow g∘f: A→C and pulses it on "Show composition".
- Functor — the smaller category on the right mirrors every object and morphism you create, colour-matched, demonstrating a functor F: 𝒞 → 𝒟 that preserves composition and identities.
Real-world relevance: category theory's language of objects/morphisms/functors underlies functional programming (types and functions), the composability of APIs, and the way disparate branches of mathematics (sets, groups, topological spaces) are unified through structure-preserving maps.