Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Core Language > List Manipulation > Rearranging & Restructuring Lists > Transpose >
Mathematica > Data Manipulation > Handling Arrays of Data > Rearranging & Restructuring Lists > Transpose >
Mathematica > Data Manipulation > Image Processing & Analysis > Basic Image Manipulation > Handling Arrays of Data > Rearranging & Restructuring Lists > Transpose >

Transpose

Transpose[list]
transposes the first two levels in list.
Transpose
transposes list so that the k^(th) level in list is the ^(th) level in the result.
  • Transpose gives the usual transpose of a matrix.
  • So long as the lengths of the lists at particular levels are the same, the specifications do not necessarily have to be distinct.
Transpose a 2×3 matrix:
Transpose a 2×3 matrix:
In[1]:=
Click for copyable input
Out[1]=
s is a sparse matrix:
Transpose[s] is sparse:
The indices have, in effect, just been reversed:
Enter using Esc tr Esc:
Get the leading diagonal by transposing two identical levels:
Multidimensionalize (in the tensor product sense) a one-dimensional list command:
Accumulate values of a tensor at all levels:
Import data from an image:
Flip the image by reversing at both levels:
T is a tensor with dimensions 2, 3, 4:
Transposing by a permutation transposes the element positions by :
Transpose is equivalent to Diagonal[m]:
Transpose only works for rectangular arrays:
Generalize transposition by padding:
Eliminate the padding:
New in 1 | Last modified in 5.1
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF