Wednesday, May 7, 2014

Generalization of transposition

Generalization of transposition

For a 2D matrix, transposition is defined as:

\begin{align*} A^T_{ij} = A_{ji} \end{align*}

This can be generalized to a matrix / array of any dimension, for example, the transposition of a 3D array:

\begin{align*} A^T_{ijk} = A_{kji} \end{align*}

You can also customized it:

\begin{align*} A^T_{ijk} = A_{jik} \end{align*}

In this case we have

\begin{align*} A^T_{mmk} = A_{mmk} \end{align*}

Illustration in numpy:

0 comments: