Bold uppercase (matrix)
A bold capital letter is a matrix (or a higher-order tensor).
In ML papers
Bold uppercase = matrix. is a weight matrix, a data matrix with one example per row, the attention matrices. is a matrix-vector product: an matrix times an -vector gives an -vector. (plain) is the entry in row , column .
How to type it
| LaTeX | Shows |
|---|---|
\mathbf{W} | |
\begin{pmatrix} a & b \\ c & d \end{pmatrix} written out |
A worked example
A matrix maps a 3-vector to a 2-vector: each output is a row dotted with the input.
Common confusions
- Check whether data matrices hold examples in rows () or columns (); papers differ, and the transposes follow.
Equations that use it
- Scaled dot-product attention
- Backpropagation through one layer
- LoRA
- Rotary position embedding (RoPE)
- Multi-head attention
- Normal equation (linear regression)
- Singular value decomposition (SVD)
- Principal component analysis (PCA)