In calculus, the chain rule describes the derivative of a "function of a function": the composition of two function, where the output z is a given function of an intermediate variable y which is in turn a given function of the input variable x.
Suppose that y is given as a function
and that z is given as a function
. The rate at which z varies in terms of y is given by the derivative
, and the rate at which y varies in terms of x is given by the derivative
. So the rate at which z varies in terms of x is the product
, and substituting
we have the chain rule
![{\displaystyle (f\circ g)'=(f'\circ g)\cdot g'.\,}](https://wikimedia.org/api/rest_v1/media/math/render/svg/b9cd51c47c8c9e0512dbb9ebf6c005ba23a8fbed)
In order to convert this to the traditional (Leibniz) notation, we notice
![{\displaystyle z(y(x))\quad \Longleftrightarrow \quad z\circ y(x)}](https://wikimedia.org/api/rest_v1/media/math/render/svg/e7005f7ab72a3e1e71981f97f24b2e62b581b638)
and
.
In mnemonic form the latter expression is
![{\displaystyle {\frac {\mathrm {d} z}{\mathrm {d} x}}={\frac {\mathrm {d} z}{\mathrm {d} y}}\,{\frac {\mathrm {d} y}{\mathrm {d} x}},\,}](https://wikimedia.org/api/rest_v1/media/math/render/svg/509c8bfc4e3633fc28c25493a8320bbbe1ec9321)
which is easy to remember, because it as if dy in the numerator and the denominator of the right hand side cancels.
Multivariable calculus
The extension of the chain rule to multivariable functions may be achieved by considering the derivative as a linear approximation to a differentiable function.
Now let
and
be functions with F having derivative
at
and G having derivative
at
. Thus
is a linear map from
and
is a linear map from
. Then
is differentiable at
with derivative
![{\displaystyle \mathrm {D} (F\circ G)=\mathrm {D} F\circ \mathrm {D} G.\,}](https://wikimedia.org/api/rest_v1/media/math/render/svg/7b97b02cff15af91ab1e03fc78f08448dff67d44)
See also