Chain rule (multivariable): Let U⊆RnU\subseteq\mathbb{R}^n and V⊆RmV\subseteq\mathbb{R}^m be open. Suppose f:U→Vf:U\to V is at a∈Ua\in U and g:V→Rpg:V\to\mathbb{R}^p is differentiable at f(a)f(a). Then g∘f:U→Rpg\circ f:U\to\mathbb{R}^p is differentiable at aa and

D(g∘f)(a)=Dg(f(a))∘Df(a).D(g\circ f)(a)=Dg(f(a))\circ Df(a).

In matrix form (with ),

Jg∘f(a)=Jg(f(a)) Jf(a).J_{g\circ f}(a)=J_g(f(a))\,J_f(a).

The is the main computational law of multivariable differentiation and underlies coordinate changes, implicit differentiation, and optimization.