Chain rule
The chain rule is a fundamental formula in calculus for differentiating the composition of two or more functions. In its simplest form for single‑variable real‑valued functions, it states that the derivative of the composite function \(h(x) = f(g(x))\) is the product of the derivative of the outer function evaluated at the inner function and the derivative of the inner function: \(h'(x) = f'(g(x)) \, g'(x)\). This rule generalises naturally to functions of several variables, where it governs the relationship between partial derivatives and is expressed compactly using Jacobian matrices. It appears in many branches of mathematics, including multivariable calculus, differential geometry, probability theory, and matrix calculus.
Intuitive explanation
If a quantity \(u\) depends on \(x\) and another quantity \(y\) depends on \(u\), then \(y\) ultimately depends on \(x\). The chain rule describes how a small change in \(x\) propagates through the intermediate variable \(u\): the overall rate of change is the product of the rate of change of \(y\) with respect to \(u\) and the rate of change of \(u\) with respect to \(x\). In Leibniz notation this is written as
\[
\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx},
\]
which suggests the intuitive cancellation of differentials, although the rigorous justification relies on limits.
Statement
Single‑variable calculus
For differentiable functions \(f : \mathbb{R} \to \mathbb{R}\) and \(g : \mathbb{R} \to \mathbb{R}\), the composition \(h = f \circ g\) is differentiable and
\[
h'(x) = f'(g(x)) \, g'(x).
\]
Equivalently, in Leibniz notation, if \(y = f(u)\) and \(u = g(x)\), then
\[
\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}.
\]
The rule can be extended to compositions of more than two functions; for three functions \(f \circ g \circ h\), the derivative is
\[
(f(g(h(x))))' = f'(g(h(x))) \, g'(h(x)) \, h'(x),
\]
and similar product‑chain expressions hold for any finite number of differentiable functions.
Multivariable calculus
In the multivariable setting, the chain rule takes several forms depending on the nature of the functions involved.
Case 1: Several inputs, one output (scalar‑valued composition).
Let \(z = f(x_1, \dots, x_m)\) and suppose each \(x_i = x_i(t_1, \dots, t_n)\) is a differentiable function. Then
\[
\frac{\partial z}{\partial t_j} = \sum_{i=1}^{m} \frac{\partial z}{\partial x_i} \frac{\partial x_i}{\partial t_j}, \quad j = 1,\dots,n.
\]
A common special case is when \(z = f(x,y)\) and \(x = x(t)\), \(y = y(t)\):
\[
\frac{dz}{dt} = \frac{\partial f}{\partial x} \frac{dx}{dt} + \frac{\partial f}{\partial y} \frac{dy}{dt}.
\]
Case 2: Vector‑valued functions.
If \(\mathbf{y} = \mathbf{f}(\mathbf{u})\) and \(\mathbf{u} = \mathbf{g}(\mathbf{x})\), where \(\mathbf{f} : \mathbb{R}^m \to \mathbb{R}^p\) and \(\mathbf{g} : \mathbb{R}^n \to \mathbb{R}^m\), then the derivative of the composition \(\mathbf{h} = \mathbf{f} \circ \mathbf{g}\) is represented by the Jacobian matrices:
\[
D\mathbf{h}(\mathbf{x}) = D\mathbf{f}(\mathbf{g}(\mathbf{x})) \, D\mathbf{g}(\mathbf{x}),
\]
where the product is matrix multiplication. In index notation,
\[
\frac{\partial h_i}{\partial x_j} = \sum_{k=1}^{m} \frac{\partial f_i}{\partial u_k} \frac{\partial g_k}{\partial x_j}.
\]
Case 3: Implicit and total derivatives.
When variables are linked by an equation \(F(x_1,\dots,x_n) = 0\), the chain rule yields the relation amongst partial derivatives that underpins the implicit function theorem. The total derivative of a function along a path is another direct consequence of the chain rule.
General rule in calculus on manifolds
On differentiable manifolds, the chain rule asserts that the differential of a composition of smooth maps is the composition of their differentials. If \(M \xrightarrow{g} N \xrightarrow{f} P\) are smooth maps between manifolds, then for any point \(p \in M\),
\[
d(f \circ g)_p = df_{g(p)} \circ dg_p.
\]
This coordinate‑free formulation reduces to the Jacobian matrix version in local coordinates.
Proofs
The simplest proof in single‑variable calculus considers the limit definition of the derivative and handles the case where \(g'(x) \neq 0\) by multiplying and dividing by \(g(x+\Delta x)-g(x)\). A complete proof using the error term is:
For functions differentiable at the relevant points, write
\[
f(g(x+h)) - f(g(x)) = f'(g(x)) [g(x+h)-g(x)] + \epsilon(g(x+h)-g(x)),
\]
where \(\epsilon(k) \to 0\) as \(k \to 0\). Dividing by \(h\) and taking the limit gives the chain rule. The argument avoids the problematic division when \(g(x+h)-g(x) = 0\) for arbitrarily small \(h\). This proof generalises smoothly to the multivariable case using linear approximations.
Higher derivatives
Higher‑order chain rules can be obtained by repeated differentiation. For the second derivative of a composition \(h = f \circ g\) in one variable,
\[
h(x) = f(g(x)) (g'(x))^2 + f'(g(x)) g''(x).
\]
Faà di Bruno’s formula expresses the \(n\)-th derivative of a composition as a sum over integer partitions, involving Bell polynomials. In multivariable calculus, higher‑order total derivatives involve tensorial chain rules that account for mixed partial derivatives.
Chain rule in probability theory
In probability theory, the chain rule of probability (also called the general product rule) expresses the joint probability of a collection of events (or variables) as a product of conditional probabilities. For events \(A_1, A_2, \dots, A_n\),
\[
P(A_1 \cap A_2 \cap \cdots \cap A_n) = P(A_1) \, P(A_2 \mid A_1) \, P(A_3 \mid A_1 \cap A_2) \, \cdots \, P(A_n \mid A_1 \cap \dots \cap A_{n-1}).
\]
For continuous random variables with probability density functions, an analogous factorization holds:
\[
f(x_1,\dots,x_n) = f(x_1) \, f(x_2 \mid x_1) \, f(x_3 \mid x_1,x_2) \, \cdots \, f(x_n \mid x_1,\dots,x_{n-1}).
\]
This rule is fundamental in Bayesian networks and graphical models, allowing the compact representation of high‑dimensional joint distributions.
Chain rule in matrix calculus
In matrix calculus, the chain rule applies to functions of matrices, provided the domains and codomains are consistent. For scalar‑valued functions of matrices, the gradient obeys
\[
\nabla_{\mathbf{X}} f(\mathbf{Y}) = \left( \frac{\partial \mathbf{Y}}{\partial \mathbf{X}} \right)^{\mathsf{T}} \nabla_{\mathbf{Y}} f,
\]
where \(\frac{\partial \mathbf{Y}}{\partial \mathbf{X}}\) is an appropriate matrix derivative. The precise form depends on the layout convention used (numerator or denominator layout). More generally, if \(\mathbf{Y} = \mathbf{G}(\mathbf{X})\) and \(z = f(\mathbf{Y})\), then the derivative of \(z\) with respect to \(\mathbf{X}\) involves the product of the derivative of \(f\) with respect to \(\mathbf{Y}\) and the derivative of \(\mathbf{G}\) with respect to \(\mathbf{X}\), respecting conformability for matrix multiplication.
Applications
The chain rule is ubiquitous in calculus and its applications. It is used in:
- Implicit differentiation: Finding derivatives of functions defined implicitly by equations.
- Related rates problems: Relating the rates at which quantities change in physical systems.
- Backpropagation in neural networks: The efficient computation of gradients in deep learning relies on recursively applying the chain rule to evaluate partial derivatives layer by layer.
- Change of variables in integration: The substitution rule for definite integrals is a direct consequence of the chain rule and the fundamental theorem of calculus.
- Differential equations: Solving separable and exact differential equations often employs the chain rule.
- Physics and engineering: Describing kinematics (velocity and acceleration of particles in curvilinear coordinates), thermodynamics (Maxwell relations), and fluid dynamics (material derivatives).
History
The chain rule is typically credited to Gottfried Wilhelm Leibniz, who used the notation \(dy/dx\) and explicitly recognised the multiplicative relationship of differentials. However, elements of the rule appeared earlier in the work of Isaac Barrow and Isaac Newton in geometric forms. Leibniz’s notation made the rule both transparent and mechanically useful, contributing to its widespread adoption. The rigorous formulation in the language of limits was established later, in the 19th century, by mathematicians such as Augustin‑Louis Cauchy and Karl Weierstrass.
See also
- Differentiation rules (sum, product, quotient)
- Implicit function theorem
- Total derivative
- Jacobian matrix and determinant
- Backpropagation
- Faà di Bruno’s formula
- Chain rule for Kolmogorov complexity
- Product rule of probability
Pour vous
Corée
La Corée est une région géographique et une entité culturelle d'Asie de l'Est, occupant la péninsule coréenne et les île...
OpenAI
OpenAI est une entreprise américaine de recherche et de déploiement dans le domaine de l'intelligence artificielle (IA),...
Prague
Prague (en tchèque : Praha) est la capitale et la plus grande ville de la République tchèque. Située au cœur de l'Europe...
Échecs
Les échecs sont un jeu de stratégie de société se jouant à deux sur un échiquier de soixante-quatre cases alternativemen...
Commentaires (0)
Aucun commentaire pour le moment. Soyez le premier !