Repository navigation
Mathematical Foundations
Anurag Prasad edited this page Nov 9, 2026
·
6 revisions
One page of notation and identities used throughout the wiki. Derivations are in Module 01, 02 and 03.
| Symbol | Meaning |
|---|---|
| scalar, vector, matrix/tensor (bold lower-case = column vector) | |
| dot product; |
|
| elementwise (Hadamard) product | |
| weights and bias of layer |
|
| pre-activation and post-activation: |
|
| all trainable parameters; |
|
| total loss, per-example loss | |
| gradient (same shape as |
|
| batch size, sequence length, model width, number of heads | |
| key/query width, feed-forward hidden width | |
| expectation, variance, covariance | |
| distributions; |
|
| KL divergence; |
|
| logistic sigmoid (not a standard deviation, unless written |
|
| Gaussian distribution | |
| indicator function | |
| cumulative product of |
-
$(AB)^\top=B^\top A^\top$ ;$\ (AB)^{-1}=B^{-1}A^{-1}$ ;$\ \mathrm{tr}(AB)=\mathrm{tr}(BA)$ ;$\ \lVert A\rVert_F^2=\mathrm{tr}(A^\top A)$ . - Eigendecomposition (symmetric):
$A=Q\Lambda Q^\top$ . SVD:$A=U\Sigma V^\top$ ,$\ \sigma_i=\sqrt{\lambda_i(A^\top A)}$ . - Best rank-
$k$ approximation: truncate the SVD; error$\sqrt{\sum_{i>k}\sigma_i^2}$ (Frobenius). - Condition number
$\kappa(A)=\sigma_{\max}/\sigma_{\min}$ . PSD$\Leftrightarrow$ all eigenvalues$\ge0$ . - Cauchy–Schwarz:
$\lvert\mathbf{x}^\top\mathbf{y}\rvert\le\lVert\mathbf{x}\rVert\lVert\mathbf{y}\rVert$ .
| Function | Gradient |
|---|---|
|
|
|
| softmax cross-entropy | |
| sigmoid | |
Chain rule:
- Bayes:
$P(A\mid B)=P(B\mid A)P(A)/P(B)$ . Var$(X)=\mathbb{E}[X^2]-(\mathbb{E}X)^2$ . -
$H(p,q)=H(p)+D_{KL}(p\Vert q)$ ;$\ D_{KL}\ge0$ (Jensen).$I(X;Y)=D_{KL}(p(x,y)\Vert p(x)p(y))$ . - Gaussian KL:
$D_{KL}(\mathcal{N}(\mu_1,\sigma_1^2)\Vert\mathcal{N}(\mu_2,\sigma_2^2))=\ln\frac{\sigma_2}{\sigma_1}+\frac{\sigma_1^2+(\mu_1-\mu_2)^2}{2\sigma_2^2}-\frac12$ . - Bias–variance:
$\mathrm{MSE}=\text{bias}^2+\text{variance}+\sigma^2_{\text{noise}}$ .
| Quantity | Value |
|---|---|
| He init std | |
| Xavier init std | |
| Transformer layer parameters |
|
| Training compute |
|
| Adam memory (mixed precision) |
|
🏠 Home · 🗺️ Curriculum · 🧭 Learning paths · ❓ Question bank · 📖 Glossary · 📚 References · ✏️ Contributing
🏠 Home · 🗺️ Curriculum · 🧭 Learning paths
❓ Question bank · 📖 Glossary · 📚 References
Jump to module:
01 02 03 04 05 06 07 08 09 10 11 12
13 14 15 16 17 18 19 20 21 22 23 24