ArticleslgStudy

science

String diagram

String diagram is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand String diagram rather than just read about it. In short: In mathematics, string diagrams are a formal graphical language for representing morphisms in monoidal categories, or more generally 2-cells in 2-categories. They are a prominent tool in applied category theory.

String diagram — main illustration
String diagram — illustration

Key takeaways

  • String diagram belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect String diagram to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of String diagram from memory before moving on to harder problems.

Reference excerpt

In mathematics, string diagrams are a formal graphical language for representing morphisms in monoidal categories, or more generally 2-cells in 2-categories. They are a prominent tool in applied category theory. When interpreted in FinVect, the monoidal category of finite-dimensional vector spaces and linear maps with the tensor product, string diagrams are called tensor networks or Penrose graphical notation. This has led to the development of categorical quantum mechanics where the axioms of quantum theory are expressed in the language of monoidal categories.

History Günter Hotz gave the first mathematical definition of string diagrams in order to formalise electronic circuits. However, the invention of string diagrams is usually credited to Roger Penrose, with Feynman diagrams also described as a precursor. They were later characterised as the arrows of free monoidal categories in a seminal article by André Joyal and Ross Street. While the diagrams in these first articles were hand-drawn, the advent of typesetting software such as LaTeX and PGF/TikZ made the publication of string diagrams more widespread. The existential graphs and diagrammatic reasoning of Charles Sanders Peirce are arguably the oldest form of string diagrams, they are interpreted in the monoidal category of finite sets and relations with the Cartesian product. The lines of identity of Peirce's existential graphs can be axiomatised as a Frobenius algebra, the cuts are unary operators on homsets that axiomatise logical negation. This makes string diagrams a sound and complete two-dimensional deduction system for first-order logic, invented independently from the one-dimensional syntax of Gottlob Frege's Begriffsschrift.

Intuition String diagrams are made of boxes f:x→y, which represent processes, with a list of wires x coming in at the top and y at the bottom, which represent the input and output systems being processed by the box f. Starting from a collection of wires and boxes, called a signature, one may generate the set of all string diagrams by induction:

each box f:x→y is a string diagram, for each list of wires x, the identity id(x):x→x is a string diagram representing the process which does nothing to its input system, it is drawn as a bunch of parallel wires, for each pair of string diagrams f:x→y and f′:x′→y′, their tensor f⊗f′:xx′→yy′ is a string diagram representing the parallel composition of processes, it is drawn as the horizontal concatenation of the two diagrams, for each pair of string diagrams f:x→y and g:y→z, their composition g∘f:x→z is a string diagram representing the sequential composition of processes, it is drawn as the vertical concatenation of the two diagrams.

Definition

Algebraic Let the Kleene star X⋆ denote the free monoid, i.e. the set of lists with elements in a set X. A monoidal signature Σ is given by:

a set Σ0 of generating objects, the lists of generating objects in Σ0⋆ are also called types, a set Σ1 of generating arrows, also called boxes, a pair of functions dom,cod:Σ1→Σ0⋆ which assign a domain and codomain to each box, i.e. the input and output types. A morphism of monoidal signature F:Σ→Σ′ is a pair of functions F0:Σ0→Σ'0 and F1:Σ1→Σ'1 which is compatible with the domain and codomain, i.e. such that dom∘F1 = F0∘dom and cod∘F1 = F0∘cod. Thus we get the category 𝐌𝐨𝐧𝐒𝐢𝐠 of monoidal signatures and their morphisms. There is a forgetful functor U:𝐌𝐨𝐧𝐂𝐚𝐭→𝐌𝐨𝐧𝐒𝐢𝐠 which sends a monoidal category to its underlying signature and a monoidal functor to its underlying morphism of signatures, i.e. it forgets the identity, composition and tensor. The free functor C−:𝐌𝐨𝐧𝐒𝐢𝐠→𝐌𝐨𝐧𝐂𝐚𝐭, i.e. the left adjoint to the forgetful functor, sends a monoidal signature Σ to the free monoidal category CΣ it generates. String diagrams (with generators from Σ) are arrows in the free monoidal category CΣ. The interpretation in a monoidal category D is a defined by a monoidal functor F:CΣ→D, which by freeness is uniquely determined by a morphism of monoidal signatures F:Σ→U(D). Intuitively, once the image of generating objects and arrows are given, the image of every diagram they generate is fixed.

Geometric A topological graph, also called a one-dimensional cell complex, is a tuple (Γ,Γ0,Γ1) of a Hausdorff space Γ, a closed discrete subset Γ0⊆Γ of nodes and a set of connected components Γ1 called edges, each homeomorphic to an open interval with boundary in Γ0 and such that Γ−Γ0=∐Γ1. A plane graph between two real numbers a,b∈ℝ with a<b is a finite topological graph embedded in ℝ×[a,b] such that every point x∈Γ ∩ ℝ×{a,b} is also a node x∈Γ0 and belongs to the closure of exactly one edge in Γ1. Such points are called outer nodes, they define the domain and codomain dom(Γ),cod(Γ)∈Γ1⋆ of the string diagram, i.e. the list of edges that are connected to the top and bottom boundary. The other nodes f∈Γ0 − {a,b}×ℝ are called inner nodes. A plane graph is progressive, also called recumbent, when the vertical projection e→[a,b] is injective for every edge e∈Γ1. Intuitively, the edges in a progressive plane graph go from top to bottom without bending backward. In that case, each edge can be given a top-to-bottom orientation with designated nodes as source and target. One can then define the domain and codomain dom(f),cod(f)∈Γ1⋆ of each inner node f, given by the list of edges that have source and target. A plane graph is generic when the vertical projection Γ0−{a,b}×ℝ→[a,b] is injective, i.e. no two inner nodes are at the same height. In that case, one can define a list boxes(Γ)∈Γ0⋆ of the inner nodes ordered from top to bottom. A progressive plane graph is labeled by a monoidal signature Σ if it comes equipped with a pair of functions v0:Γ1→Σ0 from edges to generating objects and v1:Γ0−{a,b}×ℝ→Σ1 from inner nodes to generating arrows, in a way compatible with domain and codomain. A deformation of plane graphs is a continuous map h:Γ×[0,1]→[a,b]×ℝ such that

the image of h(−,t) defines a plane graph for all t∈[0,1], for all x∈Γ0, if h(x,t) is an inner node for some t it is inner for all t∈[0,1]. A deformation is progressive (generic, labeled) if h(−,t) is progressive (generic, labeled) for all t∈[0,1]. Deformations induce an equivalence relation with Γ∼Γ′ if and only if there is some h with h(−,0)=Γ and h(−,1)=Γ′. String diagrams are equivalence classes of labeled progressive plane graphs. Indeed, one can define:

… excerpt ends here. Continue reading the full article.

Illustrations

String diagram illustration
String diagram illustration
String diagram illustration
String diagram illustration
String diagram illustration

Worked examples

Example 1 — a first encounter with String diagram

Start with the simplest possible case. Write down what String diagram claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to String diagram before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about String diagram ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of String diagram

In research
String diagram appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses String diagram in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
String diagram is common in secondary-school and first-year university syllabi. It links to neighbouring topics Diagrams, Higher category theory, Monoidal categories, so understanding it makes those chapters shorter.
In everyday life
Look for String diagram outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “String diagram” →

How to study String diagram in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what String diagram means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain String diagram out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is String diagram in simple terms?

In mathematics, string diagrams are a formal graphical language for representing morphisms in monoidal categories, or more generally 2-cells in 2-categories. They are a prominent tool in applied category theory.

Why does String diagram matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study String diagram?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on String diagram.

Tags

  • Diagrams
  • Higher category theory
  • Monoidal categories

Keep exploring