1
$\begingroup$

My problem is to compute the Jacobian matrix $J_f$ of the function $f : \mathbb{R}^n \rightarrow \mathbb{R}, f(x) = \left\lVert x\right\rVert_2$ .

So, I have that $f: \left\lVert x\right\rVert_2 = \sqrt{x^2_1 + x^2_2 + \dots + x^2_n} $ and I have to compute the partial derivative of $\frac{\delta f}{\delta x}$ which in this case is the only derivative.

Anyway, I think this is a bit extreme case and I'm really lost now.

$\endgroup$
2
$\begingroup$

For $x = (x_1, \ldots, x_n) \in \mathbb{R}^n$ we have $$\frac{\partial f}{\partial x_i}(x) = \frac{2x_i}{2\sqrt{x_1^2 + \cdots + x_n^2}} = \frac{x_i}{\|x\|}, \quad \forall i = 1, \ldots, n$$

Therefore

$$J_f(x) = \pmatrix{\frac{\partial f}{\partial x_1}(x) & \cdots & \frac{\partial f}{\partial x_n}(x)} = \pmatrix{\frac{x_1}{\|x\|} & \cdots & \frac{x_n}{\|x\|}} = \frac1{\|x\|}(x_1, \ldots, x_n) = \frac{x}{\|x\|}$$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.