The atoms of category theory: objects, arrows, and hom-sets
Category theory starts with just two things: dots called objects and arrows called morphisms. Build some below and see how far arrows alone can go.
Click to place objects, then drag from one to another to draw arrows. Build a small category of your own.
Category theory begins with the simplest possible ingredients: objects (think of them as dots) and morphisms (arrows between dots). These arrows encode relationships or structure-preserving maps between objects.
Unlike set theory, category theory doesn't care about what objects "are" internally — only about how they relate to each other through morphisms. This makes it incredibly general: the same framework describes functions between sets, homomorphisms between groups, and continuous maps between topological spaces.
A category consists of objects (dots) and morphisms (arrows) between them. Build your own category below — click to place objects, drag between them to create arrows.
Key insight: A category is defined by its objects, morphisms between them, and a composition rule that combines arrows end-to-end. Every category must also have an identity morphism on each object.
Objects & Morphisms — A category is made of objects (dots) and morphisms (arrows). The arrows are the primary data — objects are just anchor points.
Switch between the tabs to see flights, orderings, and social networks drawn as dots and arrows.
Cities are objects, direct flights are morphisms. Connecting flights are composition: flying NYC→London→Tokyo is the composite of two morphisms.
Categories are everywhere! Any collection of things with structured relationships between them can often be viewed as a category.
Real-World Categories — Categories appear everywhere: cities with flights, ordered numbers, and social networks all have categorical structure.
Pick a name, a source, and a target to build the label f : A → B, and watch what each part tells you.
"f is a morphism from A to B"
Category theorists use a precise notation for morphisms. A morphism f from object A to object B is written as f : A → B. Try changing the components below!
Key insight: The notation f : A → B tells us three things: the morphism's name, its domain (source), and its codomain (target). This is analogous to typing in programming: a function has an input type and an output type.
Pick two objects, then add or remove arrows between them. Compare Hom(A, B) with Hom(B, A): they rarely match.
For two objects A and B, the hom-set Hom(A, B) is the collection of all morphisms from A to B. Select a pair below and add or remove morphisms to see how hom-sets work.
Key insight: The hom-set Hom(A, B) collects all morphisms from A to B into a single set. Its cardinality tells you "how many ways" to go from A to B. Notice that Hom(A, B) and Hom(B, A) are generally different sets!
Spot a mistake or have an idea?