# Matrix identities

If $f(x) = g(Ax)$ for some $g(y)$ then $\frac{df}{dx} = A^T \frac{dg}{dy}$, or $\nabla f = A^T \nabla g$

If $f(x) = g(Ax)$ for some $g(y)$ then $\frac{d2f}{dx dx^T} = A^T \frac{dg}{dy} A$, or $H[f] = A^T H[g] A$

If $f({\bf x}) = {\bf a}\cdot{\bf x}$, then $df/d{\bf x}={\bf a}$.