The Jacobian Matrix of Differentiable Functions Examples 1

The Jacobian Matrix of Differentiable Functions Examples 1

Recall from The Jacobian Matrix of Differentiable Functions from Rn to Rm page that if $S \subseteq \mathbb{R}^n$ is open, $\mathbf{c} \in S$, $\mathbf{f} : S \to \mathbb{R}^m$, and $\mathbf{f}$ is differentiable at $\mathbf{c}$ then the total derivative of $\mathbf{f}$ at $\mathbf{c}$ is equal to the Jacobian matrix of $\mathbf{f}$ at $\mathbf{c}$ where the Jacobian matrix of $\mathbf{f}$ at $\mathbf{c}$ is the $m \times n$ matrix given by:

(1)
\begin{align} \quad \displaystyle{\mathbf{D} \mathbf{f} (\mathbf{c}) = \begin{bmatrix} D_1 f_1 (\mathbf{c}) & D_2 f_1 (\mathbf{c}) & \cdots & D_n f_1 (\mathbf{c}) \\ D_1 f_2 (\mathbf{c}) & D_2 f_2 (\mathbf{c}) & \cdots & D_n f_2 (\mathbf{c}) \\ \vdots & \vdots & \ddots & \vdots \\ D_1 f_m (\mathbf{c}) & D_2 f_m (\mathbf{c}) & \cdots & D_n f_m (\mathbf{c}) \\ \end{bmatrix}} \end{align}

We will now look at some example problems regarding the Jacobian matrix of a function.

Example 1

Determine the Jacobian matrix of the function $\mathbf{f} : \mathbb{R}^3 \to \mathbb{R}^2$ given by $f(x, y, z) = (xy + 2yz, 2xy^2z)$.

We first write $\mathbf{f} = (f_1, f_2)$ where $f_1, f_2 : \mathbb{R}^3 \to \mathbb{R}$ are given by the formulas $f_1(x, y, z) = xy + 2yz$ and $f_2(x, y, z) = 2xy^2z$. We now compute the gradients of these functions. We have that:

(2)
\begin{align} \quad \nabla f_1(x, y, z) &= \left [ D_1f_1(x, y, z), D_2f_1(x, y, z), D_3f_1(x, y, z) \right ] \\ &= \left [ y, x + 2z, 2y \right ] \end{align}
(3)
\begin{align} \quad \nabla f_2(x, y, z) &= \left [ D_1f_2(x, y, z), D_2f_2(x, y, z), D_3f_2(x, y, z) \right ] \\ &= \left [ 2y^2z, 4xyz, 2xy^2 \right ] \end{align}

The Jacobian matrix of $f$ is therefore the $2 \times 3$ matrix whose first row is $\nabla f_1(x, y, z)$ and whose second row is $\nabla f_2(x, y, z)$, so:

(4)
\begin{align} \quad \mathbf{D} \mathbf{f} (x, y, z) = \begin{bmatrix} y & x + 2z & 2y \\ 2y^2z & 4xyz & 2xy^2 \end{bmatrix} \end{align}

Example 2

Determine the Jacobian matrix of the function $f : \mathbb{R}^4 \to \mathbb{R}$ defined for all $\mathbf{x} = (x_1, x_2, x_3, x_4) \in \mathbb{R}^4$ by $f (\mathbf{x}) = \| \mathbf{x} \|$. Where is the Jacobian defined?

For each $\mathbf{x} = (x_1, x_2, x_3, x_4) \in \mathbb{R}^4$ we have that:

(5)
\begin{align} \quad f(\mathbf{x}) &= f(x_1, x_2, x_3, x_4) \\ &= \| (x_1, x_2, x_3, x_4) \| \\ &= \sqrt{x_1^2 + x_2^2 + x_3^2 + x_4^2} \end{align}

Since $f$ is a real-valued function, the Jacobian of $f$ is simply the gradient of $f$. The gradient of $f$ is:

(6)
\begin{align} \quad \nabla f(x_1, x_2, x_3, x_4) &= \left [ D_1f(x_1, x_2, x_3, x_4), D_2f(x_1, x_2, x_3, x_4), D_3f(x_1, x_2, x_3, x_4), D_4f(x_1, x_2, x_3, x_4) \right ] \\ &= \left [ \frac{2x_1}{2\sqrt{x_1^2 + x_2^2 + x_3^2 + x_4^2}}, \frac{2x_2}{2\sqrt{x_1^2 + x_2^2 + x_3^2 + x_4^2}}, \frac{2x_3}{2\sqrt{x_1^2 + x_2^2 + x_3^2 + x_4^2}}, \frac{2x_4}{2\sqrt{x_1^2 + x_2^2 + x_3^2 + x_4^2}} \right ] \\ &= \frac{1}{\sqrt{x_1^2 + x_2^2 + x_3^2 + x_4^2}} \left [ x_1, x_2, x_3, x_4 \right ] \end{align}

The Jacobian of $f$ defined whenever $\mathbf{x} \neq (0, 0, 0, 0)$.

Example 3

Prove (by counterexample) that the existence of the Jacobian matrix of $\mathbf{f}$ at $\mathbf{c}$ does not imply the differentiability of $\mathbf{f}$ at $\mathbf{c}$. (Hint: It's sufficient to give an example of a function whose partial derivatives exist at a point but such that $f$ is discontinuous at that same point).

Let $f : \mathbb{R}^2 \to \mathbb{R}$ be defined by:

(7)
\begin{align} \quad f(x, y) = \left\{\begin{matrix} \frac{x^2y}{(x^4 + y^2)} & \mathrm{if} \: (x, y) \neq (0, 0) \\ 0 & \mathrm{if} \: (x, y) = (0, 0) \end{matrix}\right. \end{align}

This is the example we saw on the Directional Derivatives of Functions from Rn to Rm and Continuity page which showed that the existence of all directional derivatives at the point $\mathbf{c} = (0, 0)$ did not imply the continuity of $\mathbf{f}$ at $\mathbf{c}$. In particular, the partial derivatives of $f$ exist at $\mathbf{c}$ and so the Jacobian of $f$ at $\mathbf{c}$ exists.

However, we know from the Differentiable Functions from Rn to Rm are Continuous page that if a function is differentiable at a point then it must be continuous at the point. The contrapositive of this statement says that if a function is discontinuous at a point then that function cannot be differentiable at that point.

Since $f$ is discontinuous at $\mathbf{c}$ we must have that $f$ is not differentiable at $\mathbf{c}$.

So the existence of the Jacobian matrix of a general function $\mathbf{f}$ at $\mathbf{c}$ does not imply the differentiability of $\mathbf{f}$ at $\mathbf{c}$.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License