Maths - String Diagrams

There is an alternative to the usual category theoretical diagrams which are 'string diagrams'. We can think of string diagrams as being the Poincaré dual of the usual category theoretic diagrams.

  Category Diagram String Diagram
Objects point area
Morphism/Functor line (between objects) line (separates objects)
Natural Transform double line (between functors) point (expanded to circle)

Each type of diagram has pros and cons and the choice of best diagram type probably depends on what we are using it for.

Probably the best way to understand these is to look at some examples below:

The first two examples could have been represented as a one-dimensional string diagram (lines for objects and dots for functors) but I have expanded them into two dimensions to be the same as the other diagrams. there is not much advantage in a one dimensional string diagram. There is no arrow on the string diagram but here the direction is assumed to be from left to right (the convention varies, the Catsters video uses the opposite convention).

  Category Diagram String Diagram
A simple functor category diagram 1 string diagram 1
Functor composition category diagram 2 string diagram 2

Natural transformations are shown as dots on a line which are expanded to circles:

  Category Diagram String Diagram
A natural transformation category diagram 3 string diagram 3
Horizontal composition of natural transformations category diagram 4 string diagram 4
Vertical composition of natural transformations string diagram 5 string diagram 5
Horizontal and vertical composition of natural transformations. Implies interchange law: we don't have to define whether horizontal or vertical composition is done first. string diagram 6 string diagram 6

More complicated diagrams:

  Category Diagram String Diagram
A loop can be shown by having the same category on the left and the right. The identity map is shown here as a dotted line but it is usually omitted completely. string diagram 7 string diagram 7
Whiskering: G could have natural transform to itself but we don't need to show it. string diagram 8 string diagram 8

Adjunctions (more about adjunctions on this page):

  Category Diagram String Diagram
We start with a diagram like this (F is left adjoint to G) and add 2 natural transformations below (η and ξ) with the following axioms. adjunctions string diagram  
We take this diagram: adjunctions string diagram between functors and put it in a diagram with the objects. The string diagram has the identity functor omitted as explained above. Also, for simplicity, ξ is not shown in a circle. adjunctions string diagram adjunction string diagram
adjunction string diagram And again for η. adjunctions string diagram adjunction string diagram
adjunction string diagram Now for the triangle equalities. In the string diagram it just looks like we can pull the line straight. adjunction string diagram adjunction string diagram
adjunction string diagram The other triangle equality adjunction string diagram adjunction string diagram

Monads (more about monads on this page):

Because there is only one object, it is not shown on the string diagram. So, in this case, crossing over the line means going once round the endofunctor 'T'.

  Category Diagram String Diagram
A monoid is an endofunctor with two natural transformations and axioms shown below. monoid string diagram  
The first natural transformation μ monad string diagram monad string diagram
The other natural transformation η monad string diagram monad string diagram
The left unit triangle monad string diagram monoid string diagram
The right unit triangle monad string diagram monoid string diagram
The associatively square. monoid string diagram monoid string diagram

metadata block
see also:
Correspondence about this page

Book Shop - Further reading.

Where I can, I have put links to Amazon for books that are relevant to the subject, click on the appropriate country flag to get more details of the book or to buy it from them.

 

Terminology and Notation

Specific to this page here:

 

This site may have errors. Don't use for critical systems.

Copyright (c) 1998-2017 Martin John Baker - All rights reserved - privacy policy.