✦ For everyone, free.

Practical knowledge for real and everyday life

Home

12.8.3 Tensor Composition Order Dependence

Tensor Composition Order Dependence refers to how the arrangement of tensor operations affects the resulting tensor structure and mathematical outcome.

Tensor Composition Order Dependence is the property describing which sequences of tensor operations within a composed expression yield the same final result regardless of the order in which they are performed, and which sequences instead produce different results depending on that order, distinguishing operations that commute from those that do not.


Order-Independent Compositions

Addition and Its Rearrangements

Because tensor addition is both commutative and associative, any composed expression built purely from additions of tensors sharing the same type produces an identical result no matter the order in which the individual sums are carried out:

A + B + C = C + A + B

The final tensor is unaffected by how the terms are grouped or reordered, as long as only addition is involved.

Scalar Multiplication and Its Interaction with Addition

Distributing a scalar over a sum, or first summing and then scaling, yields the same result, since scalar multiplication distributes over tensor addition:

k ( A + B ) = k A + k B

so composing a scalar multiplication before or after a compatible addition produces an order-independent result.


Order-Dependent Compositions

Subtraction Is Not Commutative

Unlike addition, subtraction does not commute, so the order in which two tensors are subtracted changes the result:

A - B B - A

except in the special case where A and B are equal. Any composed expression containing subtraction is therefore order dependent with respect to which tensor is subtracted from which.

Mixed Compositions Involving Subtraction

Because subtraction is defined via addition of a negation, a longer composed expression mixing addition and subtraction retains order independence among the purely additive parts, but any term entering as a subtracted quantity must remain fixed as the one being subtracted, since swapping its role relative to another term changes the overall result.


Sources of Order Dependence

Non-Commutativity of Subtraction Traced to the Field

The order dependence of tensor subtraction is inherited directly from the fact that ordinary subtraction of numbers in the underlying field is not commutative. Since tensor subtraction operates componentwise using this same field-level subtraction, the resulting order dependence appears identically at the tensor level.

Absence of Order Dependence in Purely Additive and Scalar Compositions

Because addition and scalar multiplication both rely only on properties of the field, such as commutativity and associativity of addition and distributivity of multiplication over addition, that hold universally, compositions built exclusively from these operations remain order independent throughout.


Practical Implications

Safe Rearrangement Cases

When simplifying a composed tensor expression that involves only additions and scalar multiplications, terms can be freely reordered or regrouped without altering the final tensor, which can be useful for organizing a computation or exposing shared factors.

Caution Required with Subtraction

When a composed expression contains one or more subtractions, care must be taken to preserve the specific order in which each subtraction is performed, since reordering terms across a subtraction generally changes the sign of the affected term and alters the final result.


Illustration

A + B = B + A (order independent) A - B ≠ B - A (order dependent)