Transpose
Swapping a matrix's rows and columns, turning an m by n matrix into an n by m one.
The transpose of , written , reflects it across its diagonal: the entry at row , column moves to row , column . A matrix becomes .
It shows up constantly because it is how you make shapes line up for multiplication — is legal when 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.