# Topological Quantum Field Theory for Vampires

The obvious choice for Alex's [vampire Dr. Alex Schwartz's, PHANG's] research area, given the Oxford topology group's interests, appears to be Topological Quantum Field Theory, or TQFT. But what is a TQFT? And what does it have to do with category theory?...

### Dr. Alex Schwartz, PHANG

In honor of Halloween, I would like to discuss mathematics associated with one of my favorite fictional mathematicians: Dr. Alex Schwartz, from Charles Stross's Hugo-award-nominated series *The Laundry Files*. Alex is from the north of England and "suffers from an inordinate case of impostor syndrome." Like many people with math backgrounds, he has a job outside academia: at the beginning of *The Rhesus Chart*, he is working in London as a "quant," developing new financial models for the research arm of a major investment bank. He is also a vampire.

Alex Schwartz, as drawn by Erin Barbeau

There's a long literary tradition associating certain kinds of geometry with horror. It began with the astonishingly influential (and astonishingly racist) writer H.P. Lovecraft's references to non-Euclidean geometry and continues in more light-hearted references to twisting spaces and Escher's art. In Stross's fiction, this association is literal: sufficiently complex algorithmic or mathematical calculations can open gateways to other worlds and the unspeakable horrors that lurk within. Alex's multidimensional financial models create just such a gateway.

My favorite game, though, is trying to work out the topic of Alex's dissertation. What do we know about Alex's mathematical background?

- He got his PhD from Oxford.
- He knows how to code.
- He is expert in the "vistas of category theory and algebraic topology."
- He has a passing knowledge of theoretical physics, although "Alex's experience of dating is similar to his experience of string theory: abstract, intense, and entirely theoretical."

Armed with this information, one can try to identify Alex's research area, and perhaps even his advisor. There are multiple people in the Oxford topology group working on problems in algebraic topology inspired by theoretical physics. Category theory is a meta-subject, focused on common structures that appear in different branches of mathematics, so perhaps it's not surprising for physics-inspired topology problems to cross into category theory. (Oxford also has a very active mathematical physics group incorporating some people who literally work on string theory, but Alex's interest in physics seems to be limited to the math problems it produces.) The obvious choice for Alex's research area, given the Oxford topology group's interests, appears to be Topological Quantum Field Theory, or TQFT. But what is a TQFT? And what does it have to do with category theory?

Ulrike Tillmann, one of Alex's potential advisors; photo by Pavlína Jáchimová, Czech Academy of Science, (CC BY 3.0 CZ)

### A story about strings

Let's start with a very simple story motivated by string theory. Suppose we have a little tiny loop. Because this is a string theory story, this loop represents a fundamental component of the universe; perhaps a physicist in a lab would identify it as a light particle like a photon, or something more exotic, like a neutrino. After a little while, our loop splits into two loops. In the physicist's version of events, one particle has become two. We can illustrate this story with a surface, the aptly named pair of pants:

At the top of the picture we have our starting loop, and at the bottom of the picture we have the final two loops. Intermediate slices of the surface correspond to intermediate moments of time.

Now, even if the fundamental components of the universe do act like tiny loops--a matter which is a subject of much debate--we can't observe these loops directly. Not only is there no microscope powerful enough, it is impossible to build a microscope powerful enough. Instead, we associate to each loop a *quantum state*, representing quantities that someone *could* measure in a lab. Geometrically, we can think of these numbers as a vector, a little arrow with its tail at the origin and its head at the coordinates given by our list of numbers. If you're a quantum physics enthusiast, you may recognize that this vector describes the *probability* that a physicist will make particular measurements. At the moment, though, we're more interested in the shape of our pair of pants. Shapes like this will give us the topology in Topological Quantum Field Theory.

Suppose we have two loops that, after a while, join to form a single loop:

We can combine the pair of pants shape with the upside-down pair of pants shape to form a new shape, corresponding to the story of a loop that splits into two, then recombines into a single loop:

### Categories and cobordisms

Next, we'd like to recast our stories about loops and strings in the language of category theory. To specify a category in the sense of category theory, you start by specifying the *objects* you are studying. For example, I might have a category where my objects are collections of miniature animals:

Categories also come with *morphisms*, which are ways of transforming the objects in the category. You can think of morphisms as particularly nice maps or functions. Each morphism has a source (sometimes called a "domain") and a target. In the miniature animal collection category, I have morphisms that consist of "adding an animal":

If the target of one morphism matches the source of another morphism, we can compose the two morphisms. For example, I can add a frog after adding a chicken:

But I can't compose my "adding a chicken" morphism with itself: I only own one toy chicken, so an animal collection with a chicken in it cannot be the source of an adding a chicken morphism.

In our stories about strings, the objects are one or more loops, and the morphisms are the surfaces that connect them. These connecting surfaces are called *cobordisms*. The word "cobordism" combines "bord-" from border with "-ism" from morphism; we say "cobordisms" rather than "bordisms" because we are reversing the operation of taking the border of a surface.

It's worth pointing out that there can be multiple different cobordisms relating objects. For instance, one cobordism from a single loop to a single loop is a cylinder:

But we have already seen another cobordism starting and ending with one loop that has a hole in the middle:

Our category of cobordisms has some extra structure, which comes from the geometric operation of combining loops. Mathematically, the procedure of combining multiple loops without gluing them together is called the *disjoint union*. (It's "disjoint" because they are not joined!) The nice thing about disjoint union is that it's compatible with our morphisms, the cobordisms, as well as our objects. For example, we can combine the pair of pants with the hole-in-the-middle cobordism to make a cobordism taking two loops to three loops:

In this context, one can think of the disjoint union operation as being like multiplication. There's even an identity element: taking the disjoint union with the empty set gives us the same cobordism we started with. Mathematically, adding this multiplication-like operation to our category makes it a *monoidal category.*

Mathematicians don't necessarily stop at 1-dimensional loops and 2-dimensional cobordisms. You can also make a monoidal category out of smooth *d*-dimensional shapes (strictly speaking, *d*-manifolds) that form the boundaries of *d+1*-dimensional cobordisms. The loops and surface cobordisms category has two advantages, though: it matches the stories from string theory, and it's easy to draw examples.

### A category of vector spaces

Our story about strings also included vectors, associated with quantum states. Let's use some of these ingredients to build a different kind of monoidal category. There is certainly a category whose objects are vectors, but we want to do something a little fancier: our objects will be *vector spaces.* For example, we could take the two-dimensional vector space consisting of all of the vectors with their tails at the origin and their heads at a point in a plane. In physics terms, each vector space represents all of the possible quantum states that a string might be in at a particular moment in time.

A vector

The morphisms in our category will be *linear transformations.* These include operations such as stretching, rotating, or flipping all the vectors in a vector space. In terms of equations, each linear transformation corresponds to multiplying by a matrix. For example, we can include a two-dimensional vector space as the $xy$-plane in a three-dimensional vector space by multiplying by an appropriate matrix: $$ \begin{pmatrix} 1 & 0 \\ 0 & 1 \\ 0 & 0 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} x \\ y \\ 0 \end{pmatrix}$$

We have objects and morphisms now. For a monoidal category, we also need a "multiplication" operation. This means we need a way to combine two vector spaces *that might have different dimensions* in order to make a new vector space. We will use an operation called the *tensor product* of vectors, which is usually written $\otimes$. Tensor product is a really multiplication-heavy multiplication: we will multiply every single coordinate of the first vector by every coordinate of the second vector, then line up the resulting numbers into a new vector. Thus, if $\vec{u}$ has $m$ coordinates and $\vec{v}$ has $n$ coordinates, the tensor product $\vec{u} \otimes \vec{v}$ has $mn$ coordinates. We can organize the computation of $\vec{u} \otimes \vec{v}$ by computing the matrix $\vec{u} \vec{v}^T$ and then listing its entries in a vector of length $mn$.

As an example, let's compute $\begin{pmatrix} 1 \\ 2 \\ 3 \end{pmatrix} \otimes \begin{pmatrix} 4\\ 5 \end{pmatrix}$.

$$ \begin{align} \begin{pmatrix} 1 \\ 2 \\ 3 \end{pmatrix} \begin{pmatrix} 4\\ 5 \end{pmatrix}^T &= \begin{pmatrix} 1 \\ 2 \\ 3 \end{pmatrix} \begin{pmatrix} 4 & 5 \end{pmatrix} \\ &= \begin{pmatrix} 4 & 5 \\ 8 & 10 \\ 12 & 15\end{pmatrix} . \end{align} $$

Thus,

$$\begin{pmatrix} 1 \\ 2 \\ 3 \end{pmatrix} \otimes \begin{pmatrix} 4\\ 5 \end{pmatrix} = \begin{pmatrix} 4 \\ 5 \\ 8 \\ 10 \\ 12 \\ 15 \end{pmatrix}.$$

Now, if we have an $m$-dimensional vector space $V$ and an $n$-dimensional vector space $W$, the tensor product of vector spaces $V \otimes W$ is just all the possible tensor products of a vector from $V$ and a vector from $W$. The new vector space $V \otimes W$ is $mn$-dimensional. It's also possible to take the tensor product of two linear transformations, by finding the output of each linear transformation and then taking the tensor product of those outputs.

### Matching categories

Now that we have two different monoidal categories, we want a way to relate them. When mathematicians want to compare two categories, they usually look for a *functor*. Functors assign each object in one category to an object in the other category, and assign each morphism to a corresponding morphism. For example, I could create a category from my "collections of miniature animals" category to a "sets of names" category. Perhaps the bear is named Emmy, the green turtle is named Logo, and the blue turtle is named Pig. Then my functor takes this collection:

and yields {Emmy, Logo, Pig}. The functor takes the "adding an animal" morphism to the "adding a name" morphism. For example, adding a chicken corresponds to the transformation from {Emmy, Logo, Pig} to {Emmy, Logo, Pig, Henrietta Swan}.

We now have all of the language we need to describe topological quantum field theory. A Topological Quantum Field Theory, or TQFT, is a functor from the category of cobordisms of loops (or, more generally, from the category of cobordisms of $d$-dimensional manifolds) to the category of vector spaces that takes disjoint union to tensor product. In other words, a TQFT is a rule that tells you how to associate a vector space to a loop and a linear transformation to a cobordism. Disjoint unions on the cobordism side give you tensor products on the vector space side.

From a mathematical perspective, the interesting thing about a TQFT is that it relates very different styles of mathematics. Cobordisms are easy to visualize, at least in low dimensions, but the geometric information associated with them can grow very complicated very quickly. In contrast, working with tensor products can be algebraically intensive, but it's a very straightforward kind of labor. In particular, though it's hard to teach a computer to understand the boundaries of surfaces, it's very easy to make a computer manipulate matrices for you.

We've seen that the study of TQFTs combines topology (from cobordisms), algebra (from tensor products), category theory (to describe the functors), and even potentially some coding (to make a computer work out examples). This is excellent preparation for the modern, mathematically inclined vampire!

### Further reading

- John Baez, Higher-Dimensional Algebra and Planck-Scale Physics
- An introduction to topological quantum field theory in the broader context of mathematics inspired by quantum physics.
- Shaenon Garrity, "To Whatever"
- A short story about making friends with an extradimensional horror.
- Thomas Hull, H.P. Lovecraft, a Horror in Higher Dimensions,
*Math Horizons*Vol. 13, No. 3 (Feb. 2006), pp. 10-12. - A discussion of mathematical concepts that appear in Lovecraft's writing.
- Ed Morehouse, Burritos for the Hungry Mathematician
- "A burrito is just a strong monad in the symmetric monoidal category of food." Beware, however, the role of burritos in the monad tutorial fallacy.
- Charles Stross,
*The Rhesus Chart*and*The Nightmare Stacks* - Novels introducing and featuring Alex Schwartz, PHANG.