logo

Jacobian of Composite Functions 📂Vector Analysis

Jacobian of Composite Functions

Theorem

Let’s assume we have two functions f:RnRmf : \mathbb{R}^{n} \to \mathbb{R}^{m} and g:RmRkg : \mathbb{R}^{m} \to \mathbb{R}^{k}. We denote the Jacobian of ff as J(f)J(f). Then, the following holds.

J(gf)=J(g)J(f) J(g \circ f) = J(g) J(f)

Explanation

Since the Jacobian is the most generalized derivative, the above theorem is a generalization of the chain rule.

Proof

By definition of the Jacobian,

J(gf)=[(gf)1x1(gf)1xn(gf)kx1(gf)kxn]=[g1x1g1xngkx1gkxn] J(g \circ f) = \begin{bmatrix} \dfrac{\partial (g \circ f)_{1}}{\partial x_{1}} & \cdots & \dfrac{\partial (g \circ f)_{1}}{\partial x_{n}} \\ \vdots & \ddots & \vdots \\ \dfrac{\partial (g \circ f)_{k}}{\partial x_{1}} & \cdots & \dfrac{\partial (g \circ f)_{k}}{\partial x_{n}} \end{bmatrix} = \begin{bmatrix} \dfrac{\partial g_{1}}{\partial x_{1}} & \cdots & \dfrac{\partial g_{1}}{\partial x_{n}} \\ \vdots & \ddots & \vdots \\ \dfrac{\partial g_{k}}{\partial x_{1}} & \cdots & \dfrac{\partial g_{k}}{\partial x_{n}} \end{bmatrix}

Given gi=gi(f1(x),,fm(x)))g_{i} = g_{i}(f_{1}(\mathbf{x}), \dots, f_{m}(\mathbf{x}))),

gixj==1mgiffxj \dfrac{\partial g_{i}}{\partial x_{j}} = \sum \limits_{\ell=1}^{m} \dfrac{\partial g_{i}}{\partial f_{\ell}} \dfrac{\partial f_{\ell}}{\partial x_{j}}

Therefore,

J(gf)= [=1mg1ffx1=1mg1ffxn=1mgkffx1=1mgkffxm]= [g1f1g1fmgkf1gkfm][f1x1f1xnfmx1fmxn]= J(g)J(f) \begin{align*} J(g \circ f) =&\ \begin{bmatrix} \sum \limits_{\ell=1}^{m} \dfrac{\partial g_{1}}{\partial f_{\ell}} \dfrac{\partial f_{\ell}}{\partial x_{1}} & \cdots & \sum \limits_{\ell=1}^{m} \dfrac{\partial g_{1}}{\partial f_{\ell}} \dfrac{\partial f_{\ell}}{\partial x_{n}} \\ \vdots & \ddots & \vdots \\ \sum \limits_{\ell=1}^{m} \dfrac{\partial g_{k}}{\partial f_{\ell}} \dfrac{\partial f_{\ell}}{\partial x_{1}} & \cdots & \sum \limits_{\ell=1}^{m} \dfrac{\partial g_{k}}{\partial f_{\ell}} \dfrac{\partial f_{\ell}}{\partial x_{m}} \end{bmatrix} \\ =&\ \begin{bmatrix} \dfrac{\partial g_{1}}{\partial f_{1}} & \cdots & \dfrac{\partial g_{1}}{\partial f_{m}} \\ \vdots & \ddots & \vdots \\ \dfrac{\partial g_{k}}{\partial f_{1}}& \cdots & \dfrac{\partial g_{k}}{\partial f_{m}} \end{bmatrix} \begin{bmatrix} \dfrac{\partial f_{1}}{\partial x_{1}} & \cdots & \dfrac{\partial f_{1}}{\partial x_{n}} \\ \vdots & \ddots & \vdots \\ \dfrac{\partial f_{m}}{\partial x_{1}} & \cdots & \dfrac{\partial f_{m}}{\partial x_{n}} \end{bmatrix} \\ =&\ J(g) J(f) \end{align*}