TensorTranspose

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

DetailsDetails

  • 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}].

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

Transpose the first two levels of a symbolic array of rank 3:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=

Perform tensor operations on transposed symbolic tensors:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=
Introduced in 2012
(9.0)