✦ For everyone, free.

Practical knowledge for real and everyday life

Home

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 A and B of type (p,q), subtraction is defined by:

D = A - B = A + ( - B )

where -B denotes the tensor whose components are the negatives of the components of B. This definition reduces subtraction to a combination of addition and scalar multiplication by -1, both of which are already defined operations on tensors.

Componentwise Expression

In component form, the subtraction rule reads:

Dj1jqi1ip = Aj1jqi1ip - Bj1jqi1ip

Each component of D is obtained by subtracting the matching component of B from the matching component of A, 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 (p,q) is again a tensor of type (p,q), following directly from the fact that both addition and negation preserve tensor type.


Algebraic Properties

Non-Commutativity

Unlike addition, subtraction is not commutative:

A - B B - A

except in the special case where A and B 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:

A - A = 0

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 k, subtraction distributes over scalar multiplication in the same way addition does:

k ( A - B ) = k A - k B

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.


Illustration

Tensor A - Tensor B = Tensor D D has the same type as A and B, with entries differenced pairwise.

Content in this section