14.28 min read
Setup: Composition of Functions
To state the chain rule precisely, we need to set up the composition carefully. Suppose:
- (an inner function from variables to variables)
- (an outer function from variables to variables)
- (so the composition is defined)
The composition is defined by . The "intermediate variables" are the outputs of , which serve as inputs to .
We call the inputs the underlying variables and the intermediate outputs the intermediate variables. The chain rule expresses the Jacobian of in terms of the Jacobians of and .
Formal View
Definition 14.1 — Composition Setup
Let and with . The composition is , . The intermediate variables are .
Jacobian dimensions: is , is , and is . Matrix sizes are compatible.
Why This Matters
Identifying the decomposition of a function into inner and outer parts is the first step in applying the chain rule.
- Signal processing pipelines: each stage is an "outer function" applied to the "inner function" output
- Neural network layer decomposition: each layer is composed with the previous
- Coordinate transformations composed with physical models
Quiz
Question 1
If and , the composition maps:
Question 2
For and , what is the size of ?
Common Mistakes
- Not checking that before composing — the composition may not be well-defined.
- Confusing which is the "inner" and which is the "outer" function.
- Getting the Jacobian multiplication order backwards.