Linear Algebra
14.47 min read

Chain Rule Notation

The chain rule has several equivalent notations, each useful in different contexts. Let h(x)=g(f(x))\mathbf{h}(\mathbf{x}) = \mathbf{g}(\mathbf{f}(\mathbf{x})) with u=f(x)\mathbf{u} = \mathbf{f}(\mathbf{x}):

Jacobian notation: Jh(x)=Jg(u)Jf(x)J\mathbf{h}(\mathbf{x}) = J\mathbf{g}(\mathbf{u}) \cdot J\mathbf{f}(\mathbf{x}) — clean and coordinate-free.

Leibniz notation: hixj=k=1Kgiukfkxj\frac{\partial h_i}{\partial x_j} = \sum_{k=1}^K \frac{\partial g_i}{\partial u_k} \frac{\partial f_k}{\partial x_j} — explicit coordinate formula, useful for computation.

Index notation: (Jh)ij=k(Jg)ik(Jf)kj(J\mathbf{h})_{ij} = \sum_k (J\mathbf{g})_{ik}(J\mathbf{f})_{kj} — this is exactly matrix multiplication.

The Leibniz form is often encountered in physics and engineering. The index form reveals the chain rule as matrix multiplication — the sum over kk is the dot product of row ii of JgJ\mathbf{g} with column jj of JfJ\mathbf{f}.

Formal View

Theorem 14.2 (Chain Rule — All Notations) — Chain Rule in Three Notations
For h=gf\mathbf{h} = \mathbf{g}\circ\mathbf{f}, u=f(x)\mathbf{u} = \mathbf{f}(\mathbf{x}): Jacobian: Jh=JgJfJ\mathbf{h} = J\mathbf{g} \cdot J\mathbf{f} Leibniz: hixj=kgiukfkxj\frac{\partial h_i}{\partial x_j} = \sum_k \frac{\partial g_i}{\partial u_k}\frac{\partial f_k}{\partial x_j} Scalar ($m=n=1$): dhdx=dgdududx\frac{dh}{dx} = \frac{dg}{du}\frac{du}{dx}

Interactive Visualization

Chain Rule Circuit Diagram

Why This Matters

Fluency in multiple notations is essential for reading and writing mathematics across different fields.

  • Physics papers often use Leibniz notation for clarity
  • Machine learning frameworks use Jacobian notation internally
  • Index notation is standard in tensor calculus and general relativity

Quiz

Question 1

In the Leibniz form of the chain rule, hixj=kgiukfkxj\frac{\partial h_i}{\partial x_j} = \sum_k \frac{\partial g_i}{\partial u_k}\frac{\partial f_k}{\partial x_j}, what does the sum over kk represent?

Question 2

The Leibniz form dhdx=dgdududx\frac{dh}{dx} = \frac{dg}{du}\frac{du}{dx} looks like the dudu's "cancel", giving an intuitive mnemonic even though this is not literally fraction cancellation.

Common Mistakes

  • Treating dudu in Leibniz notation as literally canceling — it is a mnemonic, not rigorous.
  • Forgetting to evaluate the outer derivative at the intermediate value u=f(x)\mathbf{u} = \mathbf{f}(\mathbf{x}).
  • Using different notations inconsistently in the same calculation.