I have a vector valued function $f:\mathbb{R}^m\to\mathbb{R}^n,\ \ x\to f(x)$. Taking first derivatives I obtain the Jacobian $D(x):=D\in\mathbb{R}^{m\times n}$ with entries $$ (D)_{i,j}=\frac{\partial f_i}{\partial x_j}. $$
How can I write the second derivatives of such a function? In particular, given a linear combination of the Jacobian times another matrix $W\in\mathbb{R}^{m\times m}$, $$ M = D^TW $$ what is the resulting derivative $\frac{dM}{dx}$?