Tensor & Multilinear Algebra

contraction

Contraction is the operation that pairs one upper (contravariant) index of a tensor with one lower (covariant) index and sums over them, collapsing the tensor by two slots. It is the only canonical way to shrink a tensor without choosing extra structure: it uses the built-in pairing between a vector slot and a covector slot.

The simplest case is trace. A type-(1,1) tensor T has components T^i_j; contracting i against j gives the scalar sum_i T^i_i, which is exactly the trace of the corresponding matrix. So 'trace' is contraction of a once-up once-down tensor, and its basis-independence is just the statement that contraction is well defined.

Matrix-vector and matrix-matrix products are also contractions in disguise. (A*v)^i = sum_j A^i_j v^j contracts A's lower index against v's upper index. (A*B)^i_k = sum_j A^i_j B^j_k contracts the shared middle index. Every appearance of a summation in linear algebra where one index goes up and the other goes down is a contraction.

The crucial honesty point: you may only contract an upper index against a lower one. Summing two upper indices or two lower indices is NOT a canonical operation — it secretly depends on a choice of inner product (a metric). That is precisely the role of raising and lowering: the metric lets you legitimately convert an index so a contraction becomes possible.

trace(A) = sum_i A^i_i ; (A B)^i_k = sum_j A^i_j B^j_k

Trace contracts one slot; matrix multiplication contracts the shared middle index.

Contraction lowers the type from (p,q) to (p-1,q-1). It is the multilinear-algebra version of 'summing over a repeated dummy index', and it is exactly the partial trace used in quantum information to trace out a subsystem.

Also called
index contractiontrace contraction