4
$\begingroup$

If $x \in \mathbb{R}^3$ I want to compute the jacobian of the following function

$$ f(x) = \frac{x}{\lVert x \rVert } $$

If I proceed I get a matrix whose elements are

$$ a_{ij} = \begin{cases} \frac{1}{\lVert x \rVert} - \frac{x_i^2}{\lVert x \rVert^3} & i = j \\ -\frac{x_i x_j}{\lVert x \rVert^3} &i \neq j \end{cases} $$

Is this the most compact form? The derivation is based on the product rule componentwise.

$\endgroup$
0

2 Answers 2

5
$\begingroup$

Extending user8469759's comment (and shortening $\nu := f(x)$).

There's even a bit simpler form, namely \begin{equation} \frac{1}{\lVert x \rVert}\left(I - \nu \nu^T \right). \end{equation} This also has a geometric interpretation: the mapping $y \mapsto (I - \nu \nu^T) y$ is a projection to the normal plane of $\nu$, in other words, it removes the component in the direction of the normalized vector $\nu$.

$\endgroup$
2
  • $\begingroup$ Can you derive the expression? $\endgroup$ Commented Mar 20, 2020 at 11:42
  • 1
    $\begingroup$ It can be derived from your formula using the bilinearity of $x \cdot x^T$: \begin{equation} \frac{x \cdot x^T}{ \lVert x \rVert^2 } = \lVert x \rVert^{-1} \lVert x \rVert^{-1}(x \cdot x^T) = (\lVert x \rVert^{-1}x) \cdot (\lVert x \rVert^{-1} x)^T = f(x) \cdot (f(x))^T \end{equation} $\endgroup$
    – oseiskar
    Commented Mar 22, 2020 at 10:25
1
$\begingroup$

I get the same result: $$ \begin{align} J_{ij} &= \partial_j \left( \frac{x}{\lVert x \rVert} \right)_i \\ &= \partial_j x_i \left(\sum_k x_k^2\right)^{-1/2} \\ &= \frac{\delta_{ij}}{\lVert x \rVert} + x_i \left(-\frac{1}{2}\right) \left(\sum_k x_k^2\right)^{-3/2}(2 x_k \delta_{kj}) \\ &= \frac{\delta_{ij}}{\lVert x \rVert} - \frac{x_i x_j}{\lVert x \rVert^3} \end{align} $$

$\endgroup$
1
  • 3
    $\begingroup$ Maybe an equivalent would be $$\frac{1}{\lVert x \rVert}\left(I - \frac{x \cdot x^T}{\lVert x \rVert^2} \right)$$ $\endgroup$ Commented Aug 14, 2018 at 18:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .