The Chain Rule for Functions of more than One Variable
The generalization of the chain rule to multi-variable functions is rather technical. However, it is simpler to write in the case of functions of the form
As this case occurs often in the study of functions of a single variable, it is worth describing it separately.
Contents
Case of f(g1(x), ... , gk(x))
For writing the chain rule for a function of the form
- f(g1(x), ... , gk(x)),
one needs the partial derivatives of f with respect to its k arguments. The usual notations for partial derivatives involve names for the arguments of the function. As these arguments are not named in the above formula, it is simpler and clearer to denote by
the derivative of f with respect to its ith argument, and by
the value of this derivative at z.
With this notation, the chain rule is
Example: arithmetic operations
If the function f is addition, that is, if
then and . Thus, the chain rule gives
For multiplication
the partials are and . Thus,
The case of exponentiation
is slightly more complicated, as
and, as
It follows that
General rule
The simplest way for writing the chain rule in the general case is to use the total derivative, which is a linear transformation that captures all directional derivatives in a single formula. Consider differentiable functions f : Rm → Rk and g : Rn → Rm, and a point a in Rn. Let Da g denote the total derivative of g at a and Dg(a) f denote the total derivative of f at g(a). These two derivatives are linear transformations Rn → Rm and Rm → Rk, respectively, so they can be composed. The chain rule for total derivatives is that their composite is the total derivative of f ∘ g at a:
or for short,
The higher-dimensional chain rule can be proved using a technique similar to the second proof given above.
Because the total derivative is a linear transformation, the functions appearing in the formula can be rewritten as matrices. The matrix corresponding to a total derivative is called a Jacobian matrix, and the composite of two derivatives corresponds to the product of their Jacobian matrices. From this perspective the chain rule therefore says:
or for short,
That is, the Jacobian of a composite function is the product of the Jacobians of the composed functions (evaluated at the appropriate points).
The higher-dimensional chain rule is a generalization of the one-dimensional chain rule. If k, m, and n are 1, so that f : R → R and g : R → R, then the Jacobian matrices of f and g are 1 × 1. Specifically, they are:
The Jacobian of f ∘ g is the product of these 1 × 1 matrices, so it is f′(g(a))⋅g′(a), as expected from the one-dimensional chain rule. In the language of linear transformations, Da(g) is the function which scales a vector by a factor of g′(a) and Dg(a)(f) is the function which scales a vector by a factor of f′(g(a)). The chain rule says that the composite of these two linear transformations is the linear transformation Da(f ∘ g), and therefore it is the function that scales a vector by f′(g(a))⋅g′(a).
Another way of writing the chain rule is used when f and g are expressed in terms of their components as y = f(u) = (f1(u), …, fk(u)) and u = g(x) = (g1(x), …, gm(x)). In this case, the above rule for Jacobian matrices is usually written as:
The chain rule for total derivatives implies a chain rule for partial derivatives. Recall that when the total derivative exists, the partial derivative in the ith coordinate direction is found by multiplying the Jacobian matrix by the ith basis vector. By doing this to the formula above, we find:
Since the entries of the Jacobian matrix are partial derivatives, we may simplify the above formula to get:
More conceptually, this rule expresses the fact that a change in the xi direction may change all of g1 through gm, and any of these changes may affect f.
In the special case where k = 1, so that f is a real-valued function, then this formula simplifies even further:
This can be rewritten as a dot product. Recalling that u = (g1, …, gm), the partial derivative ∂u / ∂xi is also a vector, and the chain rule says that:
Example
Given u(x, y) = x2 + 2y where x(r, t) = r sin(t) and y(r,t) = sin2(t), determine the value of ∂u / ∂r and ∂u / ∂t using the chain rule.
and
Higher derivatives of multivariable functions
Faà di Bruno's formula for higher-order derivatives of single-variable functions generalizes to the multivariable case. If y = f(u) is a function of u = g(x) as above, then the second derivative of f ∘ g is:
Resources
- Chain Rule, WikiBooks: Multivariable Calculus
- Multivariable Chain Rule, Harvey Mudd College
- Chain Rule With Partial Derivatives - Multivariable Calculus Video by The Organic Chemistry Tutor 2019
Licensing
Content obtained and/or adapted from:
- Chain rule, Wikipedia under a CC BY-SA license