Chain Rule

Definition:
The chain rule is a fundamental principle in calculus used to compute the derivative of a composite function. If a function depends on , and depends on , the derivative of with respect to is:


General Form:

For functions composed of multiple layers:

the derivative is computed as:


Vectorized Form:

For functions of multiple variables, the chain rule extends to partial derivatives. If where and , then:

where:

  • is the Jacobian Matrix of .
  • is the gradient or Jacobian of .

Example:

Scalar Example:

If , let . Then:

  • ,
  • .

Substitute :

Vector Example:

If and , then:

where .

  • ,
  • .

Thus: