8.1 Tensor Indexed Notation Scope
Tensor Indexed Notation Scope defines how indices are used to represent tensors, clarifying their structure and operations within mathematical contexts.
Tensor Indexed Notation Scope is the extent of an expression over which a given occurrence of a repeated index is understood to be linked and summed under the Einstein summation convention, analogous to the scope of a bound variable in logic or programming. It determines precisely which occurrences of an index letter within a larger tensor expression are tied together into a single implicit sum, and which occurrences, despite sharing the same letter, belong to separate, independent parts of the expression.
Scope as a Boundary Around an Implicit Sum
A Single Term Is the Natural Scope
The summation convention ties together a repeated index only within a single multiplicative term: an index occurring once as a superscript and once as a subscript within the same product is summed, and the scope of that summation is exactly the boundary of that product. An index occurring in one term of a sum of terms does not automatically link to an index of the same letter appearing in a different term.
Here i is a dummy index scoped separately within each of the two additive terms; despite the letter being reused, the two sums are entirely independent, and either i could be renamed without affecting the other.
Scope Does Not Cross an Addition
Because each term of a sum is evaluated and then added, a repeated index confined to scope within one term is fully summed before that term is combined with the next; there is no notion, within standard tensor index notation, of an index whose summation spans across separate additive terms.
Nested Expressions and Scope
Parenthesized Subexpressions
When an expression contains a parenthesized or otherwise delimited subexpression, such as (A^{i}_{j} B^{j}_{k}) C^{k}, the scope of the dummy index j is confined to the inner grouping A^{i}_{j} B^{j}_{k}, and only after that subexpression is fully contracted does the resulting object participate, via k, in the outer contraction with C^{k}. The nesting of scopes mirrors the nesting of the parentheses.
Functions of Tensor Expressions
If a tensor expression with free indices is passed into a function, such as a trace or a determinant taken of a matrix of components, the scope of any index summed inside that function is confined to the function's argument and does not extend outward to interact with indices used elsewhere in the surrounding expression.
Diagram of Index Scope
Scope Versus Free-Index Consistency
Free Indices Have a Different Requirement
While dummy-index scope is confined to a single term, free indices are subject to the opposite requirement: the same free index letter, in the same vertical position, must appear consistently across every term of a valid equation, since free indices label the shared component being described by the whole equation rather than being summed within any one term.
Correctly Distinguishing the Two Roles
Determining whether a given occurrence of an index letter is free or dummy — and hence what its scope is — requires checking, within the specific term in which it occurs, whether a matching occurrence of opposite vertical position is present in that same term; this local, per-term check is what defines the scope boundary in practice.
Renaming Within and Across Scopes
Safe Renaming Within a Single Scope
A dummy index may always be renamed to an unused letter without changing the meaning of the term in which it is scoped, since the summation convention depends only on the pattern of repetition, not the letter chosen.
Renaming to Avoid Scope Collisions
When combining two expressions that each use the same dummy letter in their own separate scopes — for instance, multiplying two contracted expressions together — one of the two dummy letters must first be renamed to a fresh, unused letter before the expressions are combined, so that the two originally independent scopes do not become accidentally and incorrectly merged into a single, unintended summation.
Practical Importance
Preventing Notational Ambiguity
Clarity about index scope prevents a common class of error in which a letter reused across unrelated parts of a long expression is misread as a single contraction spanning the whole expression, when in fact the notation intends several smaller, independent contractions, each scoped to its own term or subexpression.
Alignment with Scoping in Formal Logic and Programming
The scope of a tensor index behaves analogously to the scope of a bound variable in a quantified logical statement or a local variable in a block of code: in each case, the same symbol may be reused in disjoint scopes without conflict, and the meaning of any particular occurrence is determined entirely by the smallest enclosing scope in which it is bound.