## `linalg::transpose` -- transpose of a matrix

#### Introduction

`linalg::transpose``(A)` returns the transpose A^T of the matrix A.

#### Call(s)

`linalg::transpose(A)`

#### Parameters

`A` | - | a matrix of a domain of category `Cat::Matrix`

#### Returns

a matrix of the same domain type as `A`.

#### Details

- `linalg::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 1

We 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  |
                                  +-          -+

#### Background

- Let A be an m x n matrix. Then the transpose of A is the n x m matrix:

      A^T = ( A[i,j] ) (1<=j<=n, 1<=i<=m)

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000