transpose
The transpose of a matrix is what you get by flipping it across its main diagonal, like reflecting it in a mirror laid corner to corner. Every row becomes a column and every column becomes a row.
Written A with a superscript T (A^T), the transpose sends the entry in row i, column j of A to row j, column i of A^T. So an m-by-n matrix transposes into an n-by-m matrix, and the entry a_ij becomes the entry in position (j, i).
Transposing is a tidy, reversible operation: do it twice and you are back where you started, since (A^T)^T = A. It also interacts neatly with products but with a twist — (AB)^T equals B^T times A^T, with the order reversed. A matrix equal to its own transpose is called symmetric.
The transpose of [1, 2, 3; 4, 5, 6] is [1, 4; 2, 5; 3, 6]: a 2-by-3 becomes a 3-by-2.
Rows and columns trade roles.