Diagram examples

Creating Diagrams in Category Theory

This page provides examples of different diagram types available for category theory notes.

Commutative Diagrams with MathJax

Use the AMScd package for simple commutative diagrams:

Basic Square Diagram

\[\begin{CD} A @>f>> B\\ @VgVV @VVhV\\ C @>>k> D \end{CD}\]

Code:

$$
\begin{CD}
A @>f>> B\\
@VgVV @VVhV\\
C @>>k> D
\end{CD}
$$

Triangle Diagram

\[\begin{CD} A @>f>> B\\ @| @VVgV\\ A @>>h> C \end{CD}\]

Functor Diagram

\[\begin{CD} F(A) @>F(f)>> F(B)\\ @V\eta_AVV @VV\eta_BV\\ G(A) @>>G(f)> G(B) \end{CD}\]

Product Diagram

\[\begin{CD} @. A \times B @.\\ @. @V\pi_1VV @VV\pi_2V @.\\ @. A @. B \end{CD}\]

String Diagrams

For categories where objects can be combined side-by-side (in monoidal categories):

Identity Wire

Cup (Creation/Unit)

Map $\eta: I \to A \otimes A^*$ - creates a pair from nothing:

Cap (Evaluation/Counit)

Map $\epsilon: A^* \otimes A \to I$ - evaluates a pair to nothing:

Zigzag (Snake Equation)

The yanking identity: $(1_A \otimes \epsilon) \circ (\eta \otimes 1_A) = 1_A$

=

Morphism Box

f

Composition

f g

Tensor Product

f g

Braiding

Hasse Diagrams (Order Theory)

Hasse diagrams visualize partial orders. Edges represent cover relations (immediate order steps), and transitive edges are omitted.

Example Hasse Diagram

a b

Here, $a$ and $b$ are incomparable, but both are below $\top$ and above $\bot$.

String Diagram Notation

String diagrams use graphical elements to represent categorical structures:

  • Wires (straight lines): Represent objects flowing through the diagram
  • Boxes: Represent morphisms/functions transforming objects
  • Curves: Special morphisms like cups (creation) and caps (evaluation)
  • Connections: Composition shown by joining wires vertically

Reading String Diagrams

Convention: Diagrams can be read from bottom to top (objects flow upward) or top to bottom (composition flows downward). In these notes, we read top to bottom.

Commutative Diagram Notation (AMScd)

Arrow styles for commutative diagrams:

  • @>>> : Long right arrow
  • @>label>> : Right arrow with label above
  • @VVV : Down arrow
  • @VlabelVV : Down arrow with label on left
  • @AAA : Up arrow
  • @AAlabelA : Up arrow with label on left
  • @<<< : Left arrow
  • @= : Equals sign (for identities)
  • @| : Vertical bar
  • @. : Empty cell (for spacing)

Common Patterns

Adjunction

\[\begin{CD} @. F(A) @.\\ @. @| @.\\ \text{Hom}(F(A), B) @>{\cong}>> \text{Hom}(A, G(B)) \end{CD}\]

Limit Cone

\[\begin{CD} @. L @.\\ @. @VVV @.\\ A @>>f> B @<g<< C \end{CD}\]

Yoneda Lemma

\[\begin{CD} \text{Nat}(\text{Hom}(A, -), F) @>{\cong}>> F(A)\\ @. @VV{\alpha \mapsto \alpha_A(\text{id}_A)}V\\ @. F(A) \end{CD}\]

See:

25

25
Ready to start
Diagram examples
Session: 1 | Break: Short
Today: 0 sessions
Total: 0 sessions