|
SOLUTIONS
|
BUILT-IN MATHEMATICA SYMBOL
TensorContract
TensorContract[tensor, {{s11, s12}, {s21, s22}, ...}]
yields the contraction of tensor in the pairs
of slots.
DetailsDetails
- The first argument of TensorContract[tensor, pairs] can be any tensorial object, in particular explicit or symbolic arrays, or combinations like tensor products, transpositions, etc.
- The slots
must all be different positive integers, not larger than the rank of the contracted tensor. - The slots contracted in each pair must all have the same dimensions, but different pairs might be associated to different dimensions.
- For a symbolic tensor in the first argument of TensorContract, the contractions in the second argument are sorted, after sorting the slots in each contraction.
- TensorContract[tensor, {}] returns tensor.
New in 9
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
