Tutorials › Real Analysis › Proof of the Multivariable Chain Rule

Multivariable Analysis · Tutorial 788 of 1000

Proof of the Multivariable Chain Rule

See how the chain rule follows by composing first-order approximations and carefully controlling the resulting remainder.

Advanced 10 min read

What You'll Learn

  • Express differentiability as a linear approximation plus a remainder that is small relative to the input increment
  • Prove that an intermediate increment is bounded by a constant times the original increment
  • Control the outer function’s remainder, including when the intermediate increment is zero
  • Derive the derivative of a composition from the two individual derivatives
  • Apply the proof’s remainder bookkeeping to explicit compositions

Why the Remainders Need Attention

The Multivariable Chain Rule says that the derivative of a composition is the composition of the derivatives. Its formula is compact, but proving it requires one point of care: the outer function’s differentiability controls its remainder relative to a change in its own input, while the composition is differentiated relative to a change in the original input. The proof must connect those two sizes.

We use the Euclidean norm and the derivative-as-linear-map notation established earlier in this course. If \(f\) is differentiable at \(a\), with derivative \(A=Df(a)\), then its increment can be written as a linear part and a remainder: \(f(a+h)=f(a)+A(h)+r(h)\), where \(r(h)\) is negligible compared with \(\|h\|_2\) as \(h\to0\). Differentiability of an outer function gives a similar expansion, but with a remainder measured relative to the increment arriving at that outer function.

A small intermediate increment is not automatically negligible at the scale we need. The essential estimate is that the intermediate increment is at most a constant times \(\|h\|_2\) for small \(h\). This lets us transfer the outer remainder estimate back to the original input scale.

A Remainder Estimate for Intermediate Increments

Lemma (Remainder Along a Controlled Increment): Let \(k(h)\) be defined for \(h\) near \(0\), with \(k(0)=0\), and suppose there are constants \(C\geq 0\) and \(\delta>0\) such that \(\|k(h)\|_2\leq C\|h\|_2\) whenever \(\|h\|_2<\delta\). Let \(s(u)\) be defined near \(0\), with \(s(0)=0\), and suppose \(\|s(u)\|_2/\|u\|_2\to0\) as \(u\to0\), where the ratio is considered for \(u\neq0\). Then \(\|s(k(h))\|_2/\|h\|_2\to0\) as \(h\to0\), for \(h\neq0\).

Proof. If \(C=0\), the bound implies \(k(h)=0\) for all sufficiently small \(h\). Thus \(s(k(h))=s(0)=0\), and the conclusion follows. Now suppose \(C>0\). The bound gives \(k(h)\to0\) as \(h\to0\), so \(s(k(h))\) is defined for all sufficiently small \(h\). If \(k(h)=0\), then \(s(k(h))=0\). If \(k(h)\neq0\), then

$$ \frac{\|s(k(h))\|_2}{\|h\|_2} = \frac{\|s(k(h))\|_2}{\|k(h)\|_2} \frac{\|k(h)\|_2}{\|h\|_2} \leq C\frac{\|s(k(h))\|_2}{\|k(h)\|_2}. $$

As \(h\to0\), \(k(h)\to0\). Along the values with \(k(h)\neq0\), the final ratio tends to \(0\) by the hypothesis on \(s\). At values with \(k(h)=0\), the original ratio is already \(0\). Together these cases show that \(\|s(k(h))\|_2/\|h\|_2\to0\). \(\square\)

The lemma packages a useful proof technique: a remainder that is small compared with an intermediate increment is also small compared with the original increment, provided that intermediate increment is controlled by a constant multiple of the original one. The zero case matters because a ratio with denominator \(\|k(h)\|_2\) cannot be used when \(k(h)=0\).

Proof of the Multivariable Chain Rule

Theorem (Multivariable Chain Rule): Let \(U\subseteq\mathbb{R}^m\) and \(V\subseteq\mathbb{R}^n\) be open, let \(f:U\to\mathbb{R}^n\) satisfy \(f(U)\subseteq V\), and let \(g:V\to\mathbb{R}^p\). Suppose \(f\) is differentiable at \(a\in U\) and \(g\) is differentiable at \(f(a)\). Then \(g\circ f\) is differentiable at \(a\), and $$ D(g\circ f)(a)=Dg(f(a))\circ Df(a). $$

Proof. Put \(b=f(a)\), \(A=Df(a)\), and \(B=Dg(b)\). Differentiability of \(f\) at \(a\) gives a remainder \(r(h)\), defined for small \(h\), such that \(r(0)=0\),

$$ f(a+h)=b+A(h)+r(h), \qquad \frac{\|r(h)\|_2}{\|h\|_2}\longrightarrow 0 \quad\text{as }h\to0,\ h\neq0. $$

Define the intermediate increment \(k(h)=f(a+h)-b\). Then \(k(0)=0\) and \(k(h)=A(h)+r(h)\). By the operator-norm bound for linear maps, \(\|A(h)\|_2\leq\|A\|_{\mathrm{op}}\|h\|_2\). Since \(r(h)/\|h\|_2\to0\), there is a neighborhood of \(0\) on which \(\|r(h)\|_2\leq\|h\|_2\). Consequently, for sufficiently small \(h\),

$$ \|k(h)\|_2 \leq \|A(h)\|_2+\|r(h)\|_2 \leq (\|A\|_{\mathrm{op}}+1)\|h\|_2. $$

Thus \(k(h)\) is controlled by a constant times \(\|h\|_2\), and in particular \(k(h)\to0\). Differentiability of \(g\) at \(b\) gives a remainder \(s(u)\), with \(s(0)=0\), such that

$$ g(b+u)=g(b)+B(u)+s(u), \qquad \frac{\|s(u)\|_2}{\|u\|_2}\longrightarrow0 \quad\text{as }u\to0,\ u\neq0. $$

Applying this expansion with \(u=k(h)\) gives \((g\circ f)(a+h)=g(b)+B(k(h))+s(k(h))\). Since \(k(h)=A(h)+r(h)\) and \(B\) is linear, we can rearrange this as

$$ (g\circ f)(a+h) = g(b)+B(A(h))+ \bigl(B(r(h))+s(k(h))\bigr). $$

The expression \(B\circ A\) is linear. It remains to show that the term in parentheses is negligible compared with \(\|h\|_2\). The operator-norm bound for \(B\) gives \(\|B(r(h))\|_2\leq\|B\|_{\mathrm{op}}\|r(h)\|_2\), so \(\|B(r(h))\|_2/\|h\|_2\to0\). By the Remainder Along a Controlled Increment Lemma and the bound on \(k(h)\), we also have \(\|s(k(h))\|_2/\|h\|_2\to0\). The triangle inequality therefore yields

$$ \frac{\|B(r(h))+s(k(h))\|_2}{\|h\|_2} \leq \|B\|_{\mathrm{op}}\frac{\|r(h)\|_2}{\|h\|_2} + \frac{\|s(k(h))\|_2}{\|h\|_2} \longrightarrow 0. $$

This is precisely the differentiability condition for \(g\circ f\) at \(a\), with derivative \(B\circ A\). Substituting \(A=Df(a)\) and \(B=Dg(f(a))\) proves the formula. \(\square\)

Worked Examples: Following the Remainders

Worked Example: A Composition from the Plane to the Plane

Let \(f:\mathbb{R}^2\to\mathbb{R}^2\) and \(g:\mathbb{R}^2\to\mathbb{R}^2\) be \(f(s,t)=(s+t^2,st)\) and \(g(x,y)=(x^2+y,xy)\). At \(a=(1,-1)\), substitution gives \(f(a)=(2,-1)\). The derivative matrices are

$$ J_f(1,-1)= \begin{pmatrix}1&-2\\-1&1\end{pmatrix}, \qquad J_g(2,-1)= \begin{pmatrix}4&1\\-1&2\end{pmatrix}. $$

The chain rule gives

$$ J_{g\circ f}(1,-1) = \begin{pmatrix}4&1\\-1&2\end{pmatrix} \begin{pmatrix}1&-2\\-1&1\end{pmatrix} = \begin{pmatrix}3&-7\\-3&4\end{pmatrix}. $$

For a direct check, write \(q=s+t^2\) and \(r=st\), so \((g\circ f)(s,t)=(q^2+r,qr)\). At \((1,-1)\), \(q=2\), \(r=-1\), and \(Dq=(1,-2)\), \(Dr=(-1,1)\). Therefore \(D(q^2+r)=4(1,-2)+(-1,1)=(3,-7)\), while \(D(qr)=(-1)(1,-2)+2(-1,1)=(-3,4)\). These rows agree with the matrix product.

Worked Example: A Scalar Function Along a Curve

Let \(\gamma:\mathbb{R}\to\mathbb{R}^2\) be \(\gamma(t)=(t^2+1,2t-1)\), and let \(G:\mathbb{R}^2\to\mathbb{R}\) be \(G(x,y)=x^2+3xy+y^2\). At \(t=1\), \(\gamma(1)=(2,1)\) and \(D\gamma(1)=\begin{pmatrix}2\\2\end{pmatrix}\). Also, \(DG(x,y)=\begin{pmatrix}2x+3y&3x+2y\end{pmatrix}\), so \(DG(2,1)=\begin{pmatrix}7&8\end{pmatrix}\). Thus

$$ D(G\circ\gamma)(1) = \begin{pmatrix}7&8\end{pmatrix} \begin{pmatrix}2\\2\end{pmatrix} =30. $$

To check this result directly, differentiating the composition gives \[ \frac{d}{dt}G(\gamma(t)) = 2(t^2+1)(2t) +3\bigl((2t-1)(2t)+(t^2+1)2\bigr) +2(2t-1)2. \] At \(t=1\), the three terms are \(8\), \(18\), and \(4\), respectively, so the derivative is \(30\).

Worked Example: Seeing the Small Outer Remainder

Let \(f:\mathbb{R}\to\mathbb{R}^2\) be \(f(t)=(t,t^2)\), and let \(g:\mathbb{R}^2\to\mathbb{R}\) be \(g(x,y)=x+y^2\). At \(0\), \(f(0)=(0,0)\), \(Df(0)(h)=(h,0)\), and \(Dg(0,0)(u,v)=u\). Hence the chain rule predicts \(D(g\circ f)(0)(h)=h\).

Here the inner increment at \(0\) is \(k(h)=(h,h^2)\), and \(\|k(h)\|_2\leq |h|+h^2\leq2|h|\) for \(|h|\leq1\). The outer function has the exact expansion \(g(u,v)=g(0,0)+Dg(0,0)(u,v)+v^2\), so its remainder at \(k(h)\) is \(h^4\). For \(h\neq0\), \(h^4/|h|=|h|^3\to0\). Indeed, direct substitution gives \((g\circ f)(t)=t+t^4\), whose derivative at \(0\) is \(1\). This example displays why controlling the size of \(k(h)\) is useful: the outer remainder is measured using that intermediate increment.

What the Proof Does—and Does Not—Assume

The proof uses differentiability at the two relevant points, not continuity of either derivative on a neighborhood. Differentiability of \(f\) provides a controlled increment \(k(h)\); differentiability of \(g\) provides a remainder small relative to that increment. The argument then shows that the resulting error is small relative to the original \(h\).

A common gap is to write that the outer remainder is negligible and stop there. Its defining estimate is relative to \(\|k(h)\|_2\), not directly to \(\|h\|_2\). The intermediate-increment bound bridges this gap. Another detail is the case \(k(h)=0\): in that case the outer remainder equals \(s(0)=0\), so no division by \(\|k(h)\|_2\) is needed.

The resulting derivative is \(Dg(f(a))\circ Df(a)\), in that order: \(Df(a)\) first transforms the original increment, and \(Dg(f(a))\) then transforms the intermediate one. With Jacobian matrices, this is \(J_g(f(a))J_f(a)\), consistent with the matrix representation of the derivative.

Check Your Understanding

Use the proof and its remainder estimates to answer the following questions.

  1. In the chain rule proof, what is the intermediate increment \(k(h)\), and why does it tend to \(0\)?
  2. How does differentiability of \(f\) imply a bound of the form \(\|k(h)\|_2\leq C\|h\|_2\) for small \(h\)?
  3. Why must the case \(k(h)=0\) be treated separately when estimating the outer remainder?
  4. Which point is used to evaluate the derivative of the outer function, and why?
  5. Does the proof require the derivatives of \(f\) and \(g\) to be continuous near the points in question?