Skip to content
AI360Xpert
Glossary
Definition

Transpose

Swapping a matrix's rows and columns, turning an m by n matrix into an n by m one.

The transpose of AA, written ATA^{T}, reflects it across its diagonal: the entry at row ii, column jj moves to row jj, column ii. A 200×50200 \times 50 matrix becomes 50×20050 \times 200.

It shows up constantly because it is how you make shapes line up for multiplication — ATBA^{T}B is legal when ABAB is not. It is also the reason the backward pass of a linear layer multiplies by the weight matrix transposed rather than the weight matrix itself.

Worth distinguishing from reshape. Transposing moves data so that the values follow their new positions; reshaping keeps the memory order and re-cuts it into a new shape. Both change the shape and only one preserves meaning, so using reshape to reorder axes silently scrambles the contents.