The chain rule lets you find derivatives of composite functions, where one function is nested inside another. Since composite functions show up constantly in calculus (and in nearly every application), this is one of the most frequently used differentiation techniques you'll encounter.
The Chain Rule
Chain rule for composite functions
A composite function has the form , where you plug one function into another. The chain rule says: to differentiate a composite function, take the derivative of the outer function (evaluated at the inner function) and multiply by the derivative of the inner function.
The key step is identifying which part is the outer function and which is the inner function.
Example 1:
- Outer function: , so
- Inner function: , so
Example 2:
- Outer function: , so
- Inner function: , so
Think of it this way: the chain rule tracks how a small change in ripples through the layers. A change in first affects , and that change in then affects . Multiplying the two rates together gives the total rate of change.

Combining chain rule with other rules
Most real problems require the chain rule together with other differentiation rules. Here's how they combine.
Power rule + chain rule: When you raise an entire expression to a power:
For example, :
- Bring down the exponent and reduce the power:
- Multiply by the derivative of the inside:
- Result:
Product rule + chain rule: When two functions are multiplied and at least one is composite, apply the product rule first, then use the chain rule wherever you need to differentiate a composite piece.
For example, :
- Product rule:
- Chain rule on : derivative is
- Result:
Quotient rule + chain rule: Same idea. Apply the quotient rule for the overall structure, then use the chain rule on any composite pieces in the numerator or denominator.

Chain rule for multiple compositions
When three or more functions are nested, you apply the chain rule at each layer, working from the outside in, and multiply all the derivatives together.
For :
Example:
- Identify the layers: outer , middle , inner
- Derivative of the outer, evaluated at everything inside it:
- Times the derivative of the middle, evaluated at the innermost part:
- Times the derivative of the innermost function:
- Result:
A common mistake here is forgetting one of the layers. Every time you "peel off" an outer function, you still owe a derivative for everything that remains inside.
Variables and implicit differentiation
The chain rule also powers implicit differentiation, which you use when a relationship between and isn't solved for explicitly (for example, ).
The core idea: whenever you differentiate a term involving with respect to , you treat as a function of and attach a factor by the chain rule.
Example: Differentiate with respect to .
-
Differentiate each term:
- The comes from the chain rule applied to , since depends on .
-
Solve for :
Real-world applications of chain rule
The chain rule shows up whenever a quantity you care about depends on an intermediate variable that itself changes.
- Velocity and acceleration: If position is given as a composite function like , you need the chain rule to find velocity and then acceleration .
- Economics: If cost depends on production quantity, and production quantity depends on time, the chain rule connects the rate of cost change to the rate of time change: .
- Engineering optimization: Objective functions often involve nested expressions. The chain rule is necessary for computing the derivatives that locate maximum and minimum values.