12.4 Tensor Object Subtraction Operation
Tensor Object Subtraction Operation subtracts tensors via element-wise difference, key in algebra with uses in physics and machine learning.
Tensor Object Subtraction Operation is the operation that combines two tensors of identical type by adding the first tensor to the additive inverse of the second, producing a new tensor of the same type whose components are the differences of the corresponding components of the two operands.
Formal Definition
Subtraction as Addition of an Inverse
For two tensors and of type , subtraction is defined by:
where denotes the tensor whose components are the negatives of the components of . This definition reduces subtraction to a combination of addition and scalar multiplication by , both of which are already defined operations on tensors.
Componentwise Expression
In component form, the subtraction rule reads:
Each component of is obtained by subtracting the matching component of from the matching component of , at every index position simultaneously.
Requirements for the Operation
Same Type Requirement
Just as with addition, subtraction is only defined between tensors sharing the same rank, the same variance pattern, and the same dimension in every index. A tensor cannot be subtracted from a tensor of a different type, since there is no consistent way to pair up their components.
Preservation of Type
The result of subtracting two tensors of type is again a tensor of type , following directly from the fact that both addition and negation preserve tensor type.
Algebraic Properties
Non-Commutativity
Unlike addition, subtraction is not commutative:
except in the special case where and are equal, in which case both sides equal the zero tensor.
Relation to the Zero Tensor
Subtracting a tensor from itself always produces the zero tensor of the same type:
This mirrors the additive inverse property inherited from the underlying vector space structure of tensors of a fixed type.
Distributivity with Scalar Multiplication
For a scalar , subtraction distributes over scalar multiplication in the same way addition does:
Basis Independence of Subtraction
Consistency Under Change of Basis
Because subtraction is built from addition and scalar multiplication, both of which commute with the linear transformation law governing change of basis, subtraction likewise commutes with change of basis. The difference of two tensors computed in one basis, then transformed to a new basis, matches the difference computed directly from each tensor's components already transformed into that new basis.