linalg(deprecated)
transpose
compute the transpose of a matrix
Calling Sequence
Parameters
Description
Examples
transpose(A)
A
-
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.
with⁡linalg:
A≔array⁡1,2,3,4,5
A≔12345`?`2,3
transpose⁡A
14253A2,3
B≔array⁡diagonal,1..2,1..2,1,1=5
B≔500`?`2,2
transpose⁡B
500B2,2
C≔array⁡1,2,3
C≔123
Ct≔transpose⁡C
evalm⁡C&*Ct
123246369
evalm⁡Ct&*C
14
See Also
linalg(deprecated)[htranspose]
LinearAlgebra
Download Help Document