6.25.5 Tensor Order Type Operation Boundary
Tensor Order Type Operation Boundary sets limits on tensor operations based on order and type, ensuring valid algebraic manipulations in tensor algebra.
Tensor Order Type Operation Boundary is the set of type-matching conditions that separate operations on tensors which are always well-defined from operations which are well-defined only under specific type constraints, delineating exactly how much agreement in order and type two or more tensors must share before a given operation — addition, tensor product, or contraction — can be legitimately applied to them. Each of the basic tensor operations sits at a different point along this boundary, admitting different degrees of type mismatch before the operation becomes meaningless.
Addition: The Strictest Boundary
Exact Type Match Required
Tensor addition S + T is defined only when S and T have exactly the same type (p, q), since addition is performed component-by-component in a shared basis, and components of different types transform by different rules; adding a (2,0) array to a (1,1) array entrywise might be numerically possible but produces an object that does not transform consistently under any change of basis, and is therefore not a tensor operation at all.
where R = S + T,
only when both S and T are of type (1,1). This is the tightest boundary among the three basic operations: any type mismatch at all, in either p or q, disqualifies the sum.
Tensor Product: No Boundary at All
Any Types May Be Combined
Tensor product places no restriction whatsoever on the types of the tensors involved: a (2,0) tensor and a (0,3) tensor can always be combined via ⊗ to produce a (2,3) tensor, since tensor product simply concatenates index lists without requiring any of them to match or cancel. This operation sits at the opposite extreme from addition — it is universally defined regardless of type, which is why it is the operation used to build tensors of arbitrarily high and mixed type from simpler pieces.
Contraction: A Selective, Slot-Specific Boundary
Opposite-Variance Pairing Required
Contraction occupies a middle position: it is not blocked by type mismatch in general, but it requires that the two specific slots being contracted have opposite variance — one contravariant, one covariant — drawn from the same underlying space. Contracting an upper index against a lower index is legitimate:
while attempting to "contract" two upper indices or two lower indices together (without an intervening metric to first lower or raise one of them) is not a legitimate tensor contraction, since no cancellation of transformation factors occurs in that case.
Diagram of the Three Boundaries
Consequences of the Differing Boundaries
Why Some Expressions Fail to Type-Check
Any tensor expression can be checked for validity by applying these three boundary rules to each operation it contains: every addition must join equal types, every tensor product is unconditionally allowed, and every contraction must pair opposite-variance indices; an expression fails to type-check the moment any operation within it violates its specific boundary condition, regardless of whether the numerical values involved would produce a computable result.
Building Complex Operations From the Three Boundaries
Because every more elaborate tensor manipulation — matrix multiplication, trace, inner products, raising and lowering indices with a metric — decomposes into some combination of tensor product followed by contraction (and occasionally addition of the results), the three boundary conditions described here are jointly sufficient to validate the type-correctness of essentially any expression built from these operations, making them the complete set of rules needed to check well-formedness in tensor algebra.