The **chain rule** is a formula for finding the derivative of a composite function. It uses a variable depending on a second variable, , which in turn depend on a third variable, .

The derivative of any function is the derivative of the function itself, as per the power rule, then the derivative of the inside of the function.

and so on, for as many interwoven functions as there are.

For a multivariable function of variables, the chain rule becomes the dot product of the gradient and the derivative of a vector function.

## Examples

This can get rather crowded with more than 3 functions:

which has an inlaid Quotient rule, which results from taking the derivative of the inner piece.

Make sure that you take note of how many functions there are so that you know how many pieces you should have. Also, remember that the inside of the internal functions remain the same.

## Proof

Let be differentiable at , and let be differentiable at .

Define a function such that

Note that , ie is continuous at , and as is differentiable at it is also continuous there, so by continuity of composition is continuous at .

which is equal to .

So

with the second equality relying on the Algebra of Limits and continuity of at .

Therefore is differentiable at with derivative .