linalg::transpose -- transpose
of a matrix
Introductionlinalg::transpose(A) returns the transpose
A^T of the matrix A.
Call(s)linalg::transpose(A)
ParametersA |
- | a matrix of a domain of category Cat::Matrix |
Returnsa matrix of the same domain type as A.
Detailslinalg::transpose is an interface function for the
method "transpose" of the matrix domain of A,
i.e., instead of linalg::transpose(A) one may
call A::dom::transpose(A) directly.
Example
1We define a 3x4 matrix:
>> A := matrix([[1, 2, 3, 4], [-1, 0, 1, 0], [3, 5, 6, 9]])
+- -+
| 1, 2, 3, 4 |
| |
| -1, 0, 1, 0 |
| |
| 3, 5, 6, 9 |
+- -+
Then the transpose of A is the
4x3 matrix:
>> linalg::transpose(A)
+- -+
| 1, -1, 3 |
| |
| 2, 0, 5 |
| |
| 3, 1, 6 |
| |
| 4, 0, 9 |
+- -+
BackgroundA^T = ( A[i,j] ) (1<=j<=n, 1<=i<=m)