TikZ diagram lab: category theory lecture notes
A diagram-heavy category theory note for practicing TikZ, tikz-cd, and compiler rendering behavior.
These notes are a scratch space for category-theory diagrams. The mathematical content is intentionally compact; the main point is to exercise the renderer on commutative diagrams, universal properties, adjunction triangles, and string-like composition pictures.
1. A category as composable arrows
A category has objects, morphisms, identities, and associative composition. In a small local picture, the equality is represented by the commutative triangle:
The same idea in raw TikZ gives more control over placement and labels:
2. Functors preserve shape
A functor sends objects to objects and morphisms to morphisms while preserving identity arrows and composition.
Functoriality says the following two routes in agree whenever the upper route agrees in :
3. Natural transformations as squares
For functors , a natural transformation assigns a component to each object . Naturality means every morphism gives a commutative square.
Here is the same square with visual emphasis on the two parallel paths:
4. Pullbacks
5. Adjunctions
6. Yoneda shape
The Yoneda embedding sends an object to the representable functor . A morphism induces a natural transformation by postcomposition.
One way to remember the Yoneda lemma is that every natural transformation out of a representable functor is determined by the image of the identity:
7. Linked stress-test knowls
These smaller knowls mix prose, LaTeX display math, and TikZ diagrams so the runtime can be checked on nested knowl content: