About Contribute Source

Tensor Diagram Notation

Tensor diagram notation[1] is a simple, yet powerful graphical notation for networks of contracted tensors.

A tensor contraction of the form $\sum_j M_{ij} N_{jkl}$ can be notated


Despite its graphical and intuitive nature, tensor diagram notation is completely rigorous and well defined: it is just a graphical notation for sums. It is inspired by the Einstein summation convention for notating tensor contractions.

Tensor Diagram Rules

There are two hard-and-fast rules of tensor diagrams:

  1. Tensors are notated by solid shapes, and tensor indices are notated by lines emanating from these shapes.

  2. Connecting two index lines implies a contraction, or summation over the connected indices.

Other conventions are often adopted by certain authors or in specific contexts. For example, using shapes or shadings to designate properties of tensors; orienting index lines according to certain conventions; or putting arrows on lines to distinguish contravariant and covariant indices.

Though it can be helpful to label indices and tensors with letters, it is optional to do so when the same information can be inferred from context. In fact, one of the main benefits of diagram notation is that it frees one from having to name every index in a complicated tensor network.


Let us look at some example diagrams for familiar low-order tensors:


And some examples of matrix-like contractions:


As well as tensor contractions:


In some examples above, the names of the indices are notated on the diagram. But the other examples emphasize that this is optional.

Identity Matrices

Because contracting a tensor over one of its indices with the identity matrix has no effect, it is customary to notate identity matrices just as plain lines with no “blob” or “shape” as with other tensors. Diagrammatically, this looks like:


This notation is useful, because the diagram for contracting with an identity matrix just extends an index line i.e. has no effect on the tensor:


Advantages of Tensor Diagram Notation

Tensor diagram notation has many benefits compared to other notations:

Advanced, Extended, or Optional Diagram Notations

Other Resources

The diagram notation used in the tensor network literature is relatively informal and has quite a range of variation, but more formal specifications have been proposed.

A helpful introduction to diagram notation as it is used in quantum physics is given by Bridgeman and Chubb.[2]


  1. Applications of negative dimensional tensors, Roger Penrose, Combinatorial mathematics and its applications 1, 221-244 (1971)
  2. Hand-waving and interpretive dance: an introductory course on tensor networks, Jacob C Bridgeman, Christopher T Chubb, Journal of Physics A: Mathematical and Theoretical 50, 223001 (2017), arxiv:1603.03039

Edit This Page