The Einstein summation convention is a notational rule that replaces explicit summation signs with repeated indices. In its standard tensor form, an index appearing twice in a single term—once above and once below—is summed over its specified range. The convention makes expressions involving tensors more compact while retaining information about their components and contractions. Albert Einstein explicitly introduced the rule in Section 5 of his 1916 paper on general relativity. It is also used in linear algebra and computational array notation. (en.wikisource.org)
Basic rule and index ranges
For an index ranging from to , the expression
means
The repeated index identifies components to be multiplied and then added; it is not an exponent. The summation convention applies separately to each term of a sum, rather than indiscriminately across an entire equation. (en.wikisource.org)
The index range must be established by context. For components associated with a finite-dimensional vector space, it normally contains as many values as the space’s dimension. In four-dimensional spacetime, indices often run from to . Different kinds of indices may have different ranges; matching index letters must refer to compatible component spaces. (w0.ned.ipac.caltech.edu)
Multiple repeated pairs indicate multiple independent sums. For example,
Here both and disappear from the result. By contrast, , with distinct unrepeated indices, contains no implicit sum and gives components of a tensor product. (en.wikisource.org)
Free and dummy indices
A dummy index, or summation index, appears twice within a term and is summed out. Its letter has no intrinsic significance:
Both expressions denote the same components, provided the replacement letter does not conflict with another index in the term. (appliedmechanicslab.github.io)
A free index remains unsummed and labels components of the result. In
is free and is dummy. The equation represents one scalar equality for every allowed value of . All terms added together, and both sides of a tensor equation, must have matching free indices in matching upper or lower positions. Thus does not express ordinary componentwise vector addition. (appliedmechanicslab.github.io)
Under the standard convention, an index cannot occur three or more times in one term. An expression such as therefore requires rewriting or an explicit alternative convention. A particular component such as is not automatically summed: the repeated numeral specifies a fixed component, not a running index. (appliedmechanicslab.github.io)
Upper and lower indices
In differential geometry, index position encodes transformation behavior. Upper indices conventionally describe contravariant components, including vector components; lower indices describe covariant components, including components of elements of the dual space. Their transformation laws make a matched upper–lower pair suitable for tensor contraction. Contracting one pair reduces the total number of tensor indices by two. (w0.ned.ipac.caltech.edu)
A metric tensor relates upper and lower components:
where are components of the inverse metric. For real vectors, the metric pairing is
For a positive-definite metric this is an inner product; spacetime metrics need not be positive definite. (w0.ned.ipac.caltech.edu)
In an orthonormal basis of real Euclidean space, the metric components form the identity matrix, and corresponding upper and lower components coincide numerically. Cartesian tensor calculations consequently often write all indices below, using for a dot product. This simplified notation should not be transferred unchanged to arbitrary coordinates or indefinite metrics. (w0.ned.ipac.caltech.edu)
Matrix and tensor operations
A matrix representing a linear map acts on a vector through
Composition becomes
The shared index performs the summation familiar from matrix multiplication, while and label the output components. (nwchemex.github.io)
The trace is a contraction within one object:
The Kronecker delta, defined by when and otherwise, satisfies
These formulas illustrate how index patterns distinguish operations without naming each operation separately. Nevertheless, compact index notation alone does not establish that an array transforms as a tensor; transformation properties remain a separate requirement. (en.wikisource.org)
Computational notation and extensions
The convention also provides a language for multidimensional array operations in numerical linear algebra. NumPy’s einsum uses character labels for array axes. For example, einsum('ij,jk->ik', A, B) expresses matrix multiplication, and einsum('i,i->', a, b) sums products of corresponding vector entries. The arrow explicitly specifies the output labels. (numpy.org)
Such interfaces extend the traditional mathematical convention. einsum('ij->i', A) sums over an axis whose label occurs only once, while einsum('i,i->i', a, b) preserves a repeated label and computes elementwise products. Likewise, einsum('ii->i', A) extracts a diagonal rather than its trace. These are valid software instructions because output labels determine which axes survive; they should not be interpreted as ordinary Einstein notation without stating the modified rules. (numpy.org)
References
- The Foundation of the Generalised Theory of Relativityen.wikisource.org
- Einstein Summation Convention — Applied Mechanics Labappliedmechanicslab.github.io
- Einstein Summation Convention — TensorWrapper 1.0.0 documentationnwchemex.github.io
- numpy.einsum — NumPy v2.1 Manualnumpy.org