Previously we introduced string diagrams and saw that they were a convenient way to talk about tensor products, partial compositions of multilinear maps, and symmetries. But string diagrams really prove their use when augmented to talk about duality, which will be described topologically by bending input and output wires. In particular, we will be able to see topologically the sense in which the following four pieces of information are equivalent:

- A linear map ,
- A linear map ,
- A linear map ,
- A linear map .

Using string diagrams we will also give a diagrammatic definition of the trace of an endomorphism of a finite-dimensional vector space, as well as a diagrammatic proof of some of its basic properties.

Below all vector spaces are finite-dimensional and the composition convention from the previous post is still in effect.

**Bending wires**

Associated to every finite-dimensional vector space is a pair of special morphisms. The **evaluation** or **pairing** map

is the natural pairing between and its dual space (thinking of as a map and thinking of as a map ). The **coevaulation** or **copairing** map

is less obviously natural ( above is a basis of ); thinking of as identified with , it picks out the identity . Evaluation and coevaluation are represented by the following special wires, bent down:

We obtain the evaluation and coevaluation maps for by symmetry, namely

and

which we will represent by the following special wires, bent up:

Previously we drew directional arrows along the wires in our string diagrams even though these did not appear to provide any extra information. These directional arrows were for compatibility with evaluation and coevaluation, and we now allow them to point left where previously they had only pointed right, which has the following interpretation: an input wire labeled pointing to the left is equivalent to an input wire labeled pointing to the right, and similarly an output wire labeled pointing to the right is equivalent to an output wire labeled pointing to the left. For example, the following diagram describes a map :

Just as we have axioms ensuring that the symmetry behaves like crossing wires ought to, we have axioms ensuring that evaluation and coevaluation behave like bending wires ought to, namely the **zigzag identities**, which allow us to “pull wires straight”:

In non-string diagram notation, this means that

and that

both of which can be verified explicitly. We will verify the second zigzag identity as follows: letting denote a basis of . If is a basis vector, then the first zigzag transforms as follows:

.

The first zigzag identity can be verified similarly.

There are two other zigzag identities involving the other evaluation and coevaluation maps which follow from the above zigzag identities applied to . However, they also follow from the zigzag identities applied to as follows. By naturality of symmetry (applied to and ), we have (omitting labels on wires for convenience)

and similarly

and composing these two diagrams and applying Reidemeister III, Reidemeister II, and the definition of the other evaluation and coevaluation maps, we obtain the following sequence of equalities:

which establishes a third zigzag identity. A mirror version of this argument establishes a fourth zigzag identity.

The above argument is a good example of the benefits of string diagram notation, since writing it out in non-string diagram notation is unpleasant and unenlightening, even after omitting subscripts:

is equal to

by the naturality of , which is equal to

by Reidemeister III, which is equal to

by the interchange law and Reidemeister II, which is equal to

by the interchange law and definition, where in this last line refers to . When we use non-string diagram notation we are unnaturally attempting to compress a 2-dimensional argument into 1-dimensional notation.

**Duals of maps**

Given a linear map , we can now bend its input and output wires to obtain the three other equivalent descriptions of given at the beginning of the post. We can pass back and forth between these perspectives in various ways using evaluation and coevaluation, and any move from one perspective to another can be inverted using evaluation or coevaluation again by the zigzag identities:

In particular, we can define the dual using evaluation and coevaluation, or alternately we can notate it using the diagram describing but rotated :

In non-string diagram notation, this means

and it can be verified explicitly that this reproduces the usual definition of dual as follows: if is a basis of and is a basis of , then let denote the corresponding dual bases of , and write

.

Then the above diagram transforms as follows:

which is precisely as desired.

If our goal in constructing the dual was finding a natural way of switching the input and the output, we could also have done so as follows:

This gives us the same dual map. To see this, and to get a feel for duality in general, we will prove a few lemmas showing that we can slide boxes along bent wires. Below we again omit labels on wires for convenience.

**Lemma (sliding down on the right):**

*Proof.* By definition and the zigzag identities,

and the conclusion follows.

The same argument gives the following.

**Lemma (sliding down on the left):**

The next lemma requires a slightly longer argument.

**Lemma (sliding up on the left):**

*Proof.* By definition, naturality of symmetry, and sliding down on the left,

By a second application of naturality of symmetry and by definition,

and the conclusion follows.

Essentially the same argument gives the following.

**Lemma (sliding up on the right):**

We are now ready to prove the following.

**Proposition:**

*Proof.* By sliding up on the left and the zigzag identities,

and the conclusion follows.

**Trace**

Now that we have established some basic properties of the dual, we can define the **trace** of a linear map to be the following diagram (again omitting labels on wires for convenience):

In other words, the trace is given by “feeding back to itself.” Note that it has no input or output wires and is therefore a morphism , hence a scalar. In non-string diagram notation, this means that

.

If is a basis for and , then we compute that the above diagram transforms as follows:

.

This reproduces the usual coordinate-dependent definition of the trace. Note, however, that the diagrammatic definition is automatically independent of a choice of basis, since both and are defined independent of a choice of basis.

We now give some diagrammatic proofs (in particular, coordinate-free) of two basic properties of the trace.

**Theorem:** .

*Proof.* By sliding down on the right and sliding up on the left, we have

and the conclusion follows. Note that and need not both be endomorphisms of a vector space as long as is.

The same proof shows quite vividly that the trace of a composite of morphisms is invariant under cyclic permutation.

**Theorem:** .

*Proof.* By either sliding up on the right or sliding down on the left, is

so we are also trying to show that the other possible way of feeding back to itself also reproduces the trace. By definition, by naturality of the symmetry, and by definition again,

and the conclusion follows.

on April 27, 2017 at 1:40 am |samsonblackThis is a really nice introduction. At the top, your fourth bullet point seems to have a typo: in the target of the map, they shouldn’t both be duals.

on April 27, 2017 at 11:02 am |Qiaochu YuanOops, fixed. Thanks!

on October 26, 2015 at 8:17 am |Dualizable objects (and morphisms) | Annoying Precision[…] post should, but will not, include diagrams, so pretend that I’ve inserted some string diagrams or globular diagrams where […]