Essentially applied vector calculus
- Main trick is casting objects of interest to normed vector spaces
‘Matrix Calculus’
Jacobian defaults to so-called “numerator layout” (i.e. output gradients stacked vertically as row vectors). “Denominator layout” refers to its transpose
- “numerator” means output first if we’re reading the shape left-to-right, I assume

99% of functions that pop up in ML
- $\mathbf f : \mathbb R \rightarrow \mathbb R^n$, e.g vector valued functions
- $f : \mathbb R^n \rightarrow \mathbb R$, e.g vector norms
- $f : \mathbb R^{n \times n} \rightarrow \mathbb R$, e.g determinant
- $\mathbf f: \mathbb R ^n \rightarrow \mathbb R ^m$, e.g bog-standard vec2vec transformations
Vec()
Little-o trick
Another way to do derivatives. Generally you have to be good at:
- Linear algebra and algebra with asymptotic notation
- Identifying linear maps
Sometimes it’s more painful than just computing partials
Main idea