13.10.4 Tensor Matrix Multiplication Component Rule
The Tensor Matrix Multiplication Component Rule defines how components of tensors combine under matrix multiplication in multilinear algebra.
Tensor Matrix Multiplication Component Rule is the explicit prescription for computing each individual entry of the tensor product formed by the matrix multiplication contraction case, specifying that a given entry is obtained by summing, over the shared index, the product of the corresponding entries drawn from each of the two factor tensors. It provides the concrete recipe that translates the abstract contraction underlying matrix multiplication into a procedure for calculating any single component of the resulting tensor directly from the components of its two inputs.
Conceptual Basis
From Abstract Contraction to a Concrete Rule
The matrix multiplication contraction case states in general terms that a shared index is summed between two tensors. The component rule makes this concrete by specifying exactly which entries of the input tensors must be multiplied together and added to produce any one entry of the output tensor.
Fixing the Free Indices Before Summing
To compute a single entry of the product, the component rule requires first fixing the values of the two free indices, one inherited from each factor, and then carrying out the summation over the shared index while holding those free indices constant.
Entrywise Independence
Because the component rule specifies each entry of the resulting tensor independently in terms of a separate summation, different entries of the product can, in principle, be computed without reference to one another, even though in practice they draw on overlapping rows and columns of the same input tensors.
Formal Description
The Rule Stated in Index Notation
For mixed tensors and , the component rule for the resulting tensor is:
specifying, for each fixed pair of values of and , exactly which sum of products yields the corresponding entry of .
Worked Example
For , computing the entry requires:
illustrating that the rule draws one entry from each value of the shared index and multiplies corresponding pairs before summing.
Number of Terms per Entry
The component rule for any single entry of the resulting tensor involves exactly as many terms as the dimension of the shared contracted index, since the sum runs over every value that index can take.
Properties
Consistency With the Underlying Contraction
The component rule is not an independent definition but a direct unpacking of the Einstein summation convention applied to the specific index pattern of the matrix multiplication contraction case, so any result obtained by the rule automatically satisfies the general properties of tensor contraction, including basis-dependent transformation of the free indices.
Row-by-Column Interpretation
Read in the traditional matrix language, the component rule corresponds to pairing each row of the first factor with each column of the second factor, matching the classical description of matrix multiplication as a row-times-column procedure.
Sensitivity to Index Order
Because the rule fixes the free index from the first factor as the leading index and the free index from the second factor as the trailing index of the result, applying the rule with the factors exchanged generally produces a differently structured computation, consistent with the non-commutativity of the underlying contraction.
Practical Considerations
Direct Use in Manual Computation
The component rule is the form most directly usable for computing individual entries by hand, since it reduces the tensor operation to an explicit finite sum of ordinary products involving only the components already known for the two input tensors.
Basis for Algorithmic Implementation
In computational settings, the component rule corresponds directly to the nested loop structure used to implement matrix multiplication, with an outer pair of loops over the free indices and an inner loop over the shared index accumulating the sum.
Extension to Chained Products
When more than two tensors are multiplied in sequence, the component rule is applied repeatedly, first to an adjacent pair of factors to produce an intermediate tensor, and then again to that intermediate tensor and the next factor, continuing until all factors have been incorporated.