compute the transpose of a matrix
m x n matrix or vector
Important: The linalg package has been deprecated. Use the superseding command LinearAlgebra[Transpose], instead.
- For information on migrating linalg code to the new packages, see examples/LinearAlgebraMigration.
The matrix transpose of A is computed. The result is an n x m matrix. The [i,j]th element of the result is equal to the [j,i]th element of A. The result inherits the indexing function (for example, diagonal or sparse) of A, if it has one.
If A is a vector, then it is treated as if it were a column vector; transpose(A) would therefore be a row vector.
The command with(linalg,transpose) allows the use of the abbreviated form of this command.
A ≔ array⁡1,2,3,4,5
B ≔ array⁡diagonal,1..2,1..2,1,1=5
C ≔ array⁡1,2,3
Ct ≔ transpose⁡C
evalm⁡C &* Ct
evalm⁡Ct &* C
Download Help Document