TensorTranspose[tensor, perm]
represents the tensor obtained by transposing the slots of tensor as given by the permutation perm.


  • The tensor can be any form of explicit array (normal, sparse, or structured) or any symbolic expression representing a tensor, including tensor products, tensor contractions, etc.
  • The permutation perm can be given as a permutation list or in cyclic notation with head Cycles. Cyclic notation is automatically transformed into list notation.
  • TensorTranspose[tensor] is equivalent to TensorTranspose[tensor, {2, 1}].
New in 9
New to Mathematica? Find your learning path »
Have a question? Ask support »