Linear Algebra
14.38 min read

Univariate Chain Rule

The familiar single-variable chain rule says: if h(x)=g(f(x))h(x) = g(f(x)), then h′(x)=g′(f(x))⋅f′(x)h'(x) = g'(f(x)) \cdot f'(x).

In terms of Jacobians: Dh(a)=Dg(f(a))⋅Df(a)Dh(a) = Dg(f(a)) \cdot Df(a). Since n=k=m=1n=k=m=1, all Jacobians are 1×11\times 1 matrices (scalars), and Jacobian multiplication is just scalar multiplication. The univariate chain rule is the 1×11\times 1 matrix case of the general chain rule.

The key insight from this perspective: the intermediate variable u=f(a)u = f(a) appears as the evaluation point for g′g'. This is why we write g′(f(x))g'(f(x)), not g′(x)g'(x) — we must differentiate gg at the intermediate value u=f(x)u = f(x), not at xx itself.

Formal View

Theorem 14.1 (Univariate Chain Rule) — Chain Rule for Scalar Functions
If f:R→Rf: \mathbb{R} \to \mathbb{R} is differentiable at aa and g:R→Rg: \mathbb{R} \to \mathbb{R} is differentiable at f(a)f(a), then h=g∘fh = g \circ f is differentiable at aa and
h′(a)=g′(f(a))⋅f′(a)h'(a) = g'(f(a)) \cdot f'(a)

In Leibniz notation: dhdx=dgdu⋅dudx\frac{dh}{dx} = \frac{dg}{du}\cdot\frac{du}{dx} where u=f(x)u = f(x). The "cancellation of dudu" is a useful mnemonic, though not literally true.

Interactive Visualization

Chain Rule Circuit Diagram

Why This Matters

The univariate chain rule is the foundation for all differentiation of compositions — mastering it is essential.

  • Differentiating ex2e^{x^2}, sin⁡(cos⁡x)\sin(\cos x), ln⁡(1+x2)\ln(1+x^2) and all composed scalar functions
  • Implicit differentiation: treating yy as a function of xx in F(x,y)=0F(x,y)=0
  • Solving ODEs by substitution: u=f(x)u = f(x) transforms the equation

Quiz

Question 1

If h(x)=sin⁡(x2)h(x) = \sin(x^2), then h′(x)h'(x) equals:

Question 2

In the chain rule h′(x)=g′(f(x))⋅f′(x)h'(x) = g'(f(x))\cdot f'(x), where is g′g' evaluated?

Common Mistakes

  • Evaluating g′g' at xx instead of at f(x)f(x) — the outer derivative must be evaluated at the intermediate variable.
  • Forgetting to multiply by f′(x)f'(x) — every chain rule application adds a factor.
  • Confusing the chain rule with the product rule for f(x)g(x)f(x)g(x).