Skip to content

Esta página también está en español.

Léela en español

このページは日本語でも読めます。

日本語で読む

本页也有简体中文版本。

阅读简体中文版本

Transpose of a matrix (transpose)

Transpose of a matrix: its rows become its columns.

How to write it

transpose(matrix)

matrix
A matrix, written as a list of rows. Takes a matrix, written as a list of rows.

Examples

  • (123456)⊤=(142536)\displaystyle \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{pmatrix}^{\top} = \begin{pmatrix} 1 & 4 \\ 2 & 5 \\ 3 & 6 \end{pmatrix}
    transpose([[1, 2, 3], [4, 5, 6]])

    In the solver, transpose([[1, 2, 3], [4, 5, 6]]) gives [[1, 4], [2, 5], [3, 6]].

    Open in the solver