17
$\begingroup$

The $l_p$-norm of the vector $\mathbf{x}$ is defined as $$\Vert \mathbf{x} \Vert_p = \left(\sum_i |x_i|^p\right)^{1/p}$$ I want to calculate the following derivative. Any hint is appreciated. $$\frac{\partial}{\partial \mathbf{x}}\Vert \mathbf{x} \Vert_p $$

Thanks.

$\endgroup$
3
  • 2
    $\begingroup$ Can we define this derivative as: $\frac{\partial}{\partial V}\|X\|_{p}=\lim_{t \to 0} \frac{\|X+tV\|_{p}-\|X\|_{p}}{t}$ $\endgroup$ Oct 16, 2015 at 2:41
  • 5
    $\begingroup$ Well, despite being closed, this question helped me. +1. $\endgroup$ Feb 18, 2017 at 21:03
  • 9
    $\begingroup$ Why is this question closed and how is it missing the context or is off-topic? $\endgroup$ Apr 22, 2019 at 8:52

2 Answers 2

28
$\begingroup$

For $j = 1, 2, \ldots, N$, by chain rule, we have $$\partial_j \|\mathbf{x}\|_p = \frac{1}{p} \left(\sum_i \vert x_i \vert^p\right)^{\frac{1}{p}-1} \cdot p \vert x_j \vert^{p-1} \operatorname{sgn}(x_j) = \left(\frac{\vert x_j \vert}{\|\mathbf{x}\|_p}\right)^{p-1} \operatorname{sgn}(x_j)$$

$\endgroup$
16
$\begingroup$

For all $j\in\lbrace1,\,\dots,\,n\rbrace$, \begin{align*} \frac{\partial}{\partial x_j}{||\mathbf{x}||}_{p} &= \frac{\partial}{\partial x_j} \left( \sum_{i=1}^{n} |x_i|^p \right)^{1/p}\\ &= \frac{1}{p} \left( \sum_{i=1}^{n} |x_i|^p \right)^{\left(1/p\right)-1} \frac{\partial}{\partial x_j} \left(\sum_{i=1}^{n} |x_i|^p\right)\\ &= \frac{1}{p} \left( \sum_{i=1}^{n} |x_i|^p \right)^{\frac{1-p}{p}} \sum_{i=1}^{n} p|x_i|^{p-1} \frac{\partial}{\partial x_j} |x_i|\\ &= {\left[\left( \sum_{i=1}^{n} |x_i|^p \right)^{\frac{1}{p}}\right]}^{1-p} \sum_{i=1}^{n} |x_i|^{p-1} \delta_{ij}\frac{x_i}{|x_i|}\\ &= {||\mathbf{x}||}_{p}^{1-p} \cdot |x_j|^{p-1} \frac{x_j}{|x_j|}\\ &= \frac{x_j |x_j|^{p-2}}{{||\mathbf{x}||}_{p}^{p-1}} \end{align*}

$\endgroup$
2
  • 1
    $\begingroup$ What is $\delta_{ij}$? $\endgroup$
    – Christina
    Mar 11, 2020 at 13:41
  • 1
    $\begingroup$ @Christina Likely the Dirac delta function. $\endgroup$
    – Galen
    Dec 24, 2020 at 8:06

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