Jacobian matrix of $\|\cdot\|_2$

76 Views Asked by At

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.

1

There are 1 best solutions below

0
On BEST ANSWER

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\|}$$