The contraction of a tensor is obtained by setting unlike indices equal and summing according to the Einstein
summation convention. Contraction reduces the tensor
rank by 2. For example, for a second-ranktensor,
The contraction operation is invariant under coordinate changes since
When
is interpreted as a matrix, the contraction is the same
as the trace.
Sometimes, two tensors are contracted using an upper index of one tensor and a lower of the other tensor. In this context, contraction occurs after tensor multiplication.