Transpose
Swap rows and columns. xᵀy is a dot product; xyᵀ is an outer product.
In ML papers
is flipped over its diagonal: row becomes column , so an matrix becomes . For column vectors, is a result, the dot product, while is a full matrix, the outer product. In attention, dots every query with every key.
How to type it
| LaTeX | Shows |
|---|---|
^\top | |
^\intercal | |
^T common but ambiguous | |
^\mathsf{T} |
A worked example
Row vector times column vector: a single number.
Common confusions
- with an italic could be a power or a time index ; is unambiguous.
- : the order flips.
Equations that use it
- Scaled dot-product attention
- Backpropagation through one layer
- Rotary position embedding (RoPE)
- Logistic regression
- Normal equation (linear regression)
- Singular value decomposition (SVD)
- Principal component analysis (PCA)