13.16 Tensor Contraction Diagram Representation
Tensor Contraction Diagrams visually represent tensor operations, simplifying algebraic contractions in mathematics and physics.
Tensor Contraction Diagram Representation is a graphical notation for expressing tensors and their contractions using nodes and connecting lines rather than indexed algebraic symbols, in which a tensor is drawn as a shape with protruding lines standing for its free indices, and a contraction is drawn as a line joining two such protrusions from different tensors or from the same tensor.
Definition
In this representation, a tensor of type is drawn as a single node with lines emerging from it, one line per index. A contraction between an upper index of one tensor and a lower index of another is represented by connecting the corresponding two lines into a single unbroken edge, replacing two open ends with one internal connection.
Basic Elements of the Notation
Nodes
Each node corresponds to one tensor. The node's shape, label, or fill pattern is used purely to distinguish which tensor it represents; the notation carries no requirement on how nodes are drawn beyond consistent labeling.
Open Legs
A line that terminates freely, without connecting to another node, represents a free index of the overall expression. The number of open legs remaining after all contractions equals the order of the resulting tensor.
Internal Edges
A line connecting two nodes, or connecting a node to itself, represents a contracted index pair. Each internal edge corresponds to exactly one implicit summation over the shared index range.
Reading Contractions From a Diagram
Counting Free Indices
The order of the tensor represented by an entire diagram equals the number of open legs, regardless of how many nodes or internal edges the diagram contains.
Self-Loops
An edge that connects two legs of the same node represents a trace-like contraction of that tensor against itself, corresponding algebraically to an expression such as , where two of the tensor's own indices are paired.
Disconnected Components
If a diagram splits into multiple disconnected pieces, the represented expression factors as a product of the tensors corresponding to each piece, since no contraction links the components together.
Example Diagram
Advantages Over Index Notation
Diagram representation makes the topology of a contraction pattern immediately visible: the number of tensors involved, how they are linked, and which indices remain free are all read directly from the picture, without tracking repeated symbol names across a long algebraic expression. This is particularly valuable when the same contraction pattern recurs across many named index labels, since the diagram is invariant under renaming of dummy indices.
Correspondence to Algebraic Notation
Every valid contraction diagram corresponds to exactly one algebraic expression up to the renaming of dummy indices, and conversely every algebraic contraction expression can be drawn as a diagram by placing one node per tensor factor and one edge per repeated index pair. This correspondence establishes diagram representation as a faithful, equivalent alternative to indexed contraction notation.