0
$\begingroup$

I was asked to find a derivative of this function $$ f(x)=\frac{1}{2}\|Ax-b\|_2^2+\frac{\gamma}{2}\|x\|_2^2. $$

The problem was I didn't know the meanings of the double vertical slashes $\|\cdot\|$ and the top and bottom subscripts 2 at the end of the ||. From my own research, ||v||2 means the norm of vector v in 2 dimensions. But that still didn't help me understand the meaning of the whole function expression above.

Could you please help explain the meaning of the above function and how to find its derivative? Thanks in advance.

$\endgroup$

2 Answers 2

1
$\begingroup$

$|\hspace{-1pt}|\cdot|\hspace{-1pt}|$ simply means the norm. For, $p\geq1$, the $p$-norm is defined as $|\hspace{-1pt}|(x_1,\dots,x_n)|\hspace{-1pt}|_p=\sqrt[p]{|x_1|^p+\dots+|x_n|^p}$. Hence, $|\hspace{-1pt}|(x_1,\dots,x_n)|\hspace{-1pt}|_p^p$ simply means $|x_1|^p+\dots+|x_n|^p$. In particular, $p=2$ referes to the Euclidean norm as $$|\hspace{-1pt}|(x_1,\dots,x_n)|\hspace{-1pt}|_2^2=|x_1|^2+\dots+|x_n|^2$$

$\endgroup$
1
  • $\begingroup$ Thanks for a clear explanation that is useful for someone forgetting all the maths. Can you show me how to find the derivative of that function? $\endgroup$
    – Nemo
    Commented Feb 23, 2023 at 1:18
1
$\begingroup$

The vertical lines represent a norm. The subscript $2$ tells us it's the Euclidean norm which is a p-norm. It's basically the length of the vector.

$\endgroup$
2
  • $\begingroup$ So ||v|| means the length of vector v? But why did it have 2 subscripts of 2? Would that make it different to having just one subscript of 2? Can you show me how to find the derivative of that function? Thanks $\endgroup$
    – Nemo
    Commented Feb 23, 2023 at 1:13
  • 1
    $\begingroup$ @Nemo yeah that's exactly how I interpret norms, as a generalization of lengths. It has the subscript $2$ specifically because it's the $2$-norm, which is a $p$-norm so it's the normal Euclidean distance. You'll see the $\vert \vert \cdot \vert \vert_1$ and $\vert \vert \cdot \vert \vert_\infty$ norms often too since they show up in applications. $\endgroup$ Commented Feb 23, 2023 at 1:40

You must log in to answer this question.

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