Chain rule (multivariable)

The derivative of a composition is the composition (product) of derivatives
Chain rule (multivariable)

Chain rule (multivariable): Let URnU\subseteq\mathbb{R}^n and VRmV\subseteq\mathbb{R}^m be open. Suppose f:UVf:U\to V is at aUa\in U and g:VRpg:V\to\mathbb{R}^p is differentiable at f(a)f(a). Then gf:URpg\circ f:U\to\mathbb{R}^p is differentiable at aa and D(gf)(a)=Dg(f(a))Df(a). D(g\circ f)(a)=Dg(f(a))\circ Df(a). In matrix form (with ), Jgf(a)=Jg(f(a))Jf(a). J_{g\circ f}(a)=J_g(f(a))\,J_f(a).

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

Proof sketch: Write linear approximations with remainders: f(a+h)=f(a)+Df(a)h+rf(h),rf(h)h0, f(a+h)=f(a)+Df(a)h+r_f(h),\quad \frac{\|r_f(h)\|}{\|h\|}\to 0, and similarly for gg at f(a)f(a). Substitute the first into the second and control the remainder terms using of DgDg at f(a)f(a) (or directly from differentiability), yielding the stated .