Skip to content

Documentation / @interstellar-tools/equations / transpose3

Function: transpose3() ​

ts
function transpose3(A: Matrix3x3Type): Matrix3x3Type;

Defined in: helpers/transpose-3.ts:51

Transpose a 3×3 matrix (row-major).

For a matrix:

A=[a00a01a02a10a11a12a20a21a22]

the transpose is:

AT=[a00a10a20a01a11a21a02a12a22]

Notes:

  • Matrices are treated as row-major: A[row][col].
  • For rotation matrices / DCMs, the transpose is also the inverse: R−1=RT.

Parameters ​

ParameterTypeDescription
AMatrix3x3Type3×3 matrix (row-major).

Returns ​

Matrix3x3Type

Transposed matrix Aᵀ (row-major).

Example ​

ts
const A: Matrix3x3Type = [
  [1, 2, 3],
  [4, 5, 6],
  [7, 8, 9]
];

const AT = transpose3(A);
// [
//   [1, 4, 7],
//   [2, 5, 8],
//   [3, 6, 9]
// ]