Search for all pages containing Transpose
- See Also
- 
    Related Guides
    - Rearranging & Restructuring Lists
- Matrix Operations
- Tensors
- Parts of Matrices
- GPU Computing
- List Manipulation
- Matrices and Linear Algebra
- Handling Arrays of Data
- Basic Image Manipulation
- Symbolic Vectors, Matrices and Arrays
- GPU Computing with NVIDIA
- Graph Programming
- Structural Operations on Expressions
 
- Tech Notes
- 
    
    - See Also
- 
      Related Guides
      - Rearranging & Restructuring Lists
- Matrix Operations
- Tensors
- Parts of Matrices
- GPU Computing
- List Manipulation
- Matrices and Linear Algebra
- Handling Arrays of Data
- Basic Image Manipulation
- Symbolic Vectors, Matrices and Arrays
- GPU Computing with NVIDIA
- Graph Programming
- Structural Operations on Expressions
 
- Tech Notes
 
Transpose[list]
transposes the first two levels in list.
Transpose[list,{n1,n2,…}]
transposes list so that the k level in list is the nk
 level in list is the nk level in the result.
 level in the result. 
Transpose[list,mn]
transposes levels m and n in list, leaving all other levels unchanged.
Transpose[list,k]
cycles the levels in list k positions to the right.
 
     
   Transpose
Transpose[list]
transposes the first two levels in list.
Transpose[list,{n1,n2,…}]
transposes list so that the k level in list is the nk
 level in list is the nk level in the result.
 level in the result. 
Transpose[list,mn]
transposes levels m and n in list, leaving all other levels unchanged.
Transpose[list,k]
cycles the levels in list k positions to the right.
Details and Options
 
     
   - Transpose[m] gives the usual transpose of a matrix m.
- Transpose[m] can be input as m.
-  can be entered as  tr tr or \[Transpose]. or \[Transpose].
- Transpose[m] formats as  in StandardForm and TraditionalForm. » in StandardForm and TraditionalForm. »
- For a matrix m, Transpose[m] is equivalent to Transpose[m,{2,1}].
- For an array a of depth r≥3, Transpose[a] is equivalent to Transpose[a,{2,1,3,…,r}], only transposing the first two levels. »
- The ni in Transpose[a,{n1,n2,…}] or Transpose[a,n1n2] must be positive integers no larger than ArrayDepth[a].
- If {n1,n2,…} is a permutation list, then the element at position {i1,i2,…} of Transpose[a,{n1,n2,…}] is the element at position {in1,in2,…} of the array a.
- For a permutation perm, the dimensions of Transpose[a,perm] are Permute[Dimensions[a],perm].
- A permutation list perm in Transpose[a,perm] can also be given in Cycles form, as returned by PermutationCycles[perm]. »
- Transpose[a,m↔n] or Transpose[a,TwoWayRule[m,n]] is equivalent to Transpose[a,Cycles[{{m,n}}]]. »
- Transpose[a,k] is equivalent to Transpose[a,RotateLeft[Range[n],k]], where n is the depth of a.
- Transpose allows the ni to be repeated, computing diagonals of the subarrays determined by the repeated levels. The result is therefore an array of smaller depth.
- For a square matrix m, Transpose[m,{1,1}] returns the main diagonal of m, as given by Diagonal[m]. »
- In general, if np=nq then the operation Transpose[a,{n1,n2,…}] is possible for an array a of dimensions {d1,d2,…} if dp=dq.
- Transpose works on SparseArray and structured array objects.
Examples
open all close allBasic Examples (4)
Scope (12)
Matrices (5)
Transpose the matrix and format the result:
Transpose a row matrix into a column matrix:
Transpose the column matrix back into a row matrix:
Transposition of a vector leaves it unchanged:
Transpose leaves the identity matrix unchanged:
Transpose[s] is also sparse:
The indices have, in effect, just been reversed:
Transpose a SymmetrizedArray object:
The result equals the negative of the original array, due to its antisymmetry:
Arrays (7)
Transpose the first two levels of a rank-3 array, effectively transposing it as a matrix of vectors:
Transpose an array of depth 3 using different permutations:
Cycle levels of a depth-5 array two positions to the right:
Perform transpositions using TwoWayRule notation:
Perform transpositions using Cycles notation:
Transpose levels 2 and 3 of a depth-4 array:
The second and third dimensions have been exchanged:
Get the leading diagonal by transposing two identical levels:
Applications (13)
Matrix Decompositions (4)
Find the QRDecomposition of  :
:
 is orthogonal, so its inverse is
 is orthogonal, so its inverse is ![TemplateBox[{q}, Transpose] TemplateBox[{q}, Transpose]](Files/Transpose.en/24.png) :
:
Reconstruct  from the decomposition:
 from the decomposition:
Compute the SchurDecomposition of a matrix  :
:
The matrix  is orthogonal, so its inverse is
 is orthogonal, so its inverse is ![TemplateBox[{q}, Transpose] TemplateBox[{q}, Transpose]](Files/Transpose.en/28.png) :
:
Reconstruct  from the decomposition:
 from the decomposition:
Compute the SingularValueDecomposition of a matrix  :
:
The matrices  and
 and  are orthogonal, so their inverses are their transposes:
 are orthogonal, so their inverses are their transposes:
Reconstruct  from the decomposition:
 from the decomposition:
Construct the singular value decomposition of  , a random
, a random  matrix:
 matrix:
First compute the eigensystem of ![TemplateBox[{a}, Transpose].a TemplateBox[{a}, Transpose].a](Files/Transpose.en/36.png) :
:
The singular values are the square roots of the nonzero eigenvalues:
The  matrix is a diagonal matrix of singular values with the same shape as
 matrix is a diagonal matrix of singular values with the same shape as  :
:
The  matrix has the eigenvectors as its columns:
 matrix has the eigenvectors as its columns:
The  matrix has columns of the form
 matrix has columns of the form  for each of the nonzero eigenvalues:
 for each of the nonzero eigenvalues:
Special Matrices (6)
A symmetric matrix obeys ![s=TemplateBox[{s}, Transpose] s=TemplateBox[{s}, Transpose]](Files/Transpose.en/44.png) , an antisymmetric matrix
, an antisymmetric matrix ![a=-TemplateBox[{a}, Transpose] a=-TemplateBox[{a}, Transpose]](Files/Transpose.en/45.png) . This matrix is symmetric:
. This matrix is symmetric:
Confirm with SymmetricMatrixQ:
Confirm with AntisymmetricMatrixQ:
A matrix is orthogonal if ![TemplateBox[{o}, Inverse]=TemplateBox[{o}, Transpose] TemplateBox[{o}, Inverse]=TemplateBox[{o}, Transpose]](Files/Transpose.en/46.png) . Check if the matrix
. Check if the matrix  is orthogonal:
 is orthogonal:
Confirm that it is orthogonal using OrthogonalMatrixQ:
A real-valued symmetric matrix is orthogonally diagonalizable as ![s=o.d.TemplateBox[{o}, Transpose] s=o.d.TemplateBox[{o}, Transpose]](Files/Transpose.en/48.png) , with
, with  diagonal and real valued and
 diagonal and real valued and  orthogonal. Verify that the following matrix is symmetric and then diagonalize it:
 orthogonal. Verify that the following matrix is symmetric and then diagonalize it:
To diagonalize, first compute  's eigenvalues and place them in a diagonal matrix:
's eigenvalues and place them in a diagonal matrix:
Next, compute the unit eigenvectors:
Then  can be diagonalized with
 can be diagonalized with  as previously, and
 as previously, and ![o=TemplateBox[{v}, Transpose] o=TemplateBox[{v}, Transpose]](Files/Transpose.en/54.png) :
:
A matrix is unitary if ![TemplateBox[{u}, Inverse]=TemplateBox[{{(, TemplateBox[{u}, Transpose, SyntaxForm -> SuperscriptBox], )}}, Conjugate] TemplateBox[{u}, Inverse]=TemplateBox[{{(, TemplateBox[{u}, Transpose, SyntaxForm -> SuperscriptBox], )}}, Conjugate]](Files/Transpose.en/55.png) . Show that the matrix
. Show that the matrix  is unitary:
 is unitary:
Confirm with UnitaryMatrixQ:
A real-valued matrix  is called normal if
 is called normal if ![n.TemplateBox[{n}, Transpose]=TemplateBox[{n}, Transpose].n n.TemplateBox[{n}, Transpose]=TemplateBox[{n}, Transpose].n](Files/Transpose.en/58.png) . Normal matrices are the most general kind of matrix that can be unitarily diagonalized as
. Normal matrices are the most general kind of matrix that can be unitarily diagonalized as ![n=u.d.TemplateBox[{{(, TemplateBox[{u}, Transpose, SyntaxForm -> SuperscriptBox], )}}, Conjugate] n=u.d.TemplateBox[{{(, TemplateBox[{u}, Transpose, SyntaxForm -> SuperscriptBox], )}}, Conjugate]](Files/Transpose.en/59.png) with
 with  diagonal and
 diagonal and  unitary. All real symmetric matrices
 unitary. All real symmetric matrices  are normal because both sides of the equality are simply
 are normal because both sides of the equality are simply  :
:
Show that the following matrix is normal and then diagonalize it:
Confirm using NormalMatrixQ:
A normal matrix like  can be unitarily diagonalized using Eigensystem:
 can be unitarily diagonalized using Eigensystem:
Unlike the case of a symmetric matrix, the diagonal matrix here is complex valued:
Normalizing the eigenvectors and putting them in columns gives a unitary matrix:
Show that real antisymmetric matrices and orthogonal matrices are normal and thus can be unitarily diagonalized. For orthogonal matrices, simply substitute in the definition ![TemplateBox[{o}, Transpose]=TemplateBox[{o}, Inverse] TemplateBox[{o}, Transpose]=TemplateBox[{o}, Inverse]](Files/Transpose.en/66.png) to get the identity matrix on both sides:
 to get the identity matrix on both sides:
For an antisymmetric matrix, both sides are simply  :
:
Orthogonal matrices have eigenvalues that lie on the unit circle:
Visualization (3)
Use Transpose to change data grouping in BarChart:
Use Transpose to swap the  and
 and  axes in ListPlot3D:
 axes in ListPlot3D:
This has the effect of reflecting the data across the line  :
:
Multidimensionalize (in the tensor product sense) a one-dimensional list command:
For example, accumulate at all levels of an array:
Reverse at all levels of an array:
Reverse the data at all levels, reflecting across the line  and swapping red and blue channels:
 and swapping red and blue channels:
Properties & Relations (18)
Transpose obeys ![TemplateBox[{{(, TemplateBox[{A}, Transpose, SyntaxForm -> SuperscriptBox], )}}, Transpose]=A TemplateBox[{{(, TemplateBox[{A}, Transpose, SyntaxForm -> SuperscriptBox], )}}, Transpose]=A](Files/Transpose.en/72.png) :
:
For compatible matrices  and
 and  , Transpose obeys
, Transpose obeys ![TemplateBox[{{(, {a, ., b}, )}}, Transpose]=TemplateBox[{b}, Transpose].TemplateBox[{a}, Transpose] TemplateBox[{{(, {a, ., b}, )}}, Transpose]=TemplateBox[{b}, Transpose].TemplateBox[{a}, Transpose]](Files/Transpose.en/75.png) :
:
Matrix inversion commutes with Transpose, i.e. ![TemplateBox[{{(, TemplateBox[{a}, Transpose], )}}, Inverse]=TemplateBox[{{(, TemplateBox[{a}, Inverse], )}}, Transpose] TemplateBox[{{(, TemplateBox[{a}, Transpose], )}}, Inverse]=TemplateBox[{{(, TemplateBox[{a}, Inverse], )}}, Transpose]](Files/Transpose.en/76.png) :
:
Conjugate[Transpose[m]] can be done in a single step with ConjugateTranspose:
Many special matrices are defined by their properties under Transpose. A symmetric matrix has ![TemplateBox[{s}, Transpose]=s TemplateBox[{s}, Transpose]=s](Files/Transpose.en/77.png) :
:
An orthogonal matrix satisfies ![TemplateBox[{o}, Transpose]=TemplateBox[{o}, Inverse] TemplateBox[{o}, Transpose]=TemplateBox[{o}, Inverse]](Files/Transpose.en/78.png) :
:
The product of a matrix and its transpose is symmetric:
 is the matrix product of
 is the matrix product of  and
 and  :
:
The sum of a square matrix and its transpose is symmetric:
The difference is antisymmetric:
Transposition of {{}} returns {}:
The result cannot be {{}} again because the permutation of the dimensions {1,0} is {0,1} and no expression can have dimensions {0,1}:
Transpose[a] transposes the first two levels of an array:
Transpose[a,perm] returns an array of dimensions Permute[Dimensions[a],perm]:
Take an array with dimensions {2,3,4}:
Transposing by a permutation σ transposes the element positions by σ-1:
Transpose[a,Cycles[{{m,n}}]] and Transpose[a,mn] are equivalent:
Both forms are equivalent to using PermutationList[Cycles[{{m,n}}]:
Composition of transpositions is equivalent to a product of their permutations, in the same order:
Transpositions do not commute, in general:
Transpose[a,σ] is equivalent to Flatten[a,List/@InversePermutation[σ]]:
Transpose and TensorTranspose coincide on explicit arrays:
TensorTranspose further supports symbolic operations that Transpose does not:
Transposition of a matrix can also be performed with Thread:
Transpose[m,{1,1}] is equivalent to Diagonal[m]:
Transpose[a,{1,…,1,2,3,…}] is equivalent to tracing the levels being transposed to level 1:
Possible Issues (1)
Neat Examples (1)
See Also
Flatten Thread ConjugateTranspose TensorTranspose Tr TwoWayRule Cycles Reverse ArrayReshape ArrayReduce
Characters: \[Transpose]
Function Repository: AssociationTranspose
Related Guides
- 
    ▪
    
- Rearranging & Restructuring Lists ▪
- Matrix Operations ▪
- Tensors ▪
- Parts of Matrices ▪
- GPU Computing ▪
- List Manipulation ▪
- Matrices and Linear Algebra ▪
- Handling Arrays of Data ▪
- Basic Image Manipulation ▪
- Symbolic Vectors, Matrices and Arrays ▪
- GPU Computing with NVIDIA ▪
- Graph Programming ▪
- Structural Operations on Expressions
History
Introduced in 1988 (1.0) | Updated in 2003 (5.0) ▪ 2004 (5.1) ▪ 2012 (9.0) ▪ 2017 (11.2) ▪ 2024 (14.1) ▪ 2025 (14.3)
Text
Wolfram Research (1988), Transpose, Wolfram Language function, https://reference.wolfram.com/language/ref/Transpose.html (updated 2025).
CMS
Wolfram Language. 1988. "Transpose." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. https://reference.wolfram.com/language/ref/Transpose.html.
APA
Wolfram Language. (1988). Transpose. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Transpose.html
BibTeX
@misc{reference.wolfram_2025_transpose, author="Wolfram Research", title="{Transpose}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/Transpose.html}", note=[Accessed: 31-October-2025]}
BibLaTeX
@online{reference.wolfram_2025_transpose, organization={Wolfram Research}, title={Transpose}, year={2025}, url={https://reference.wolfram.com/language/ref/Transpose.html}, note=[Accessed: 31-October-2025]}
 followed by
 followed by 
 to enter the transposition operator:
 to enter the transposition operator:


![n=u.d.TemplateBox[{{(, TemplateBox[{u}, Transpose, SyntaxForm -> SuperscriptBox], )}}, Conjugate] n=u.d.TemplateBox[{{(, TemplateBox[{u}, Transpose, SyntaxForm -> SuperscriptBox], )}}, Conjugate]](Files/Transpose.en/65.png)
![TemplateBox[{s}, Transpose]=TemplateBox[{{(, {TemplateBox[{m}, Transpose], ., m}, )}}, Transpose]=TemplateBox[{m}, Transpose].TemplateBox[{{(, TemplateBox[{m}, Transpose, SyntaxForm -> SuperscriptBox], )}}, Transpose]=TemplateBox[{m}, Transpose]m=s TemplateBox[{s}, Transpose]=TemplateBox[{{(, {TemplateBox[{m}, Transpose], ., m}, )}}, Transpose]=TemplateBox[{m}, Transpose].TemplateBox[{{(, TemplateBox[{m}, Transpose, SyntaxForm -> SuperscriptBox], )}}, Transpose]=TemplateBox[{m}, Transpose]m=s](Files/Transpose.en/82.png)



![TemplateBox[{m}, Transpose] TemplateBox[{m}, Transpose]](Files/Transpose.en/86.png)
![TemplateBox[{s}, Transpose]=TemplateBox[{{(, {TemplateBox[{m}, Transpose, SyntaxForm -> SuperscriptBox], +, m}, )}}, Transpose]=TemplateBox[{m}, Transpose]+TemplateBox[{{(, TemplateBox[{m}, Transpose, SyntaxForm -> SuperscriptBox], )}}, Transpose]=TemplateBox[{m}, Transpose]+m=s TemplateBox[{s}, Transpose]=TemplateBox[{{(, {TemplateBox[{m}, Transpose, SyntaxForm -> SuperscriptBox], +, m}, )}}, Transpose]=TemplateBox[{m}, Transpose]+TemplateBox[{{(, TemplateBox[{m}, Transpose, SyntaxForm -> SuperscriptBox], )}}, Transpose]=TemplateBox[{m}, Transpose]+m=s](Files/Transpose.en/87.png)

