While reading through some engineering related journals, I've come across the following notation:

$$\|p − Xw\|^2_2$$

$p$ and $w$ are vectors, while $X$ is a matrix. I understand that $\|p − Xw\|$ is finding the norm of the vector, i.e. $\left\|{\boldsymbol {x}}\right\|:={\sqrt {x_1^2+\cdots +x_n^2}}$. But what does two 2s mean at the subscript and superscript? I've seen them in multiple places, so I assume that it is a common notation, yet I could not find the exact definition online (it's hard to search when I don't know the terminology nor know how to type such mathematical function in google).

  • $\begingroup$ The common notation is that the subscript 2 means that it's the 2-norm (as opposed to the 3-norm, 1-norm, or whatever), while the superscript is just an exponent 2. $\endgroup$ – Nathan H. Mar 23 '17 at 4:43
  • $\begingroup$ One can define $\| x \|_p = \sqrt[p]{\sum_{i=1}^{n} |x_i|^p}$ for $p > 0$, which generalizes the concept of a 2-norm. The subscript is denoting $p=2$, and the superscript is just squaring. $\endgroup$ – David Kraemer Mar 23 '17 at 4:44

A norm is actually something much more general than simply the expression you gave. It is simply a function that satisfies certain properties. However, it turns out that the $2$-norm is exactly the norm you are used to.

In general, the $p$-norm of a vector is given by $$\|\boldsymbol {x}\|_p = \big(|x_1|^p + |x_2|^p + ... + |x_n|^p\big)^{1/p}.$$

You will see that by plugging in $p = 2$ you get the norm you are used to.

The superscript simply refers to ordinary squaring, hence $$\|\boldsymbol{x}\|_2^2 = |x_1|^2 + |x_2|^2 + ... + |x_n|^2.$$


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.