TITLE: What does the $2$ in $\|Xw-y\|_2$ mean?
QUESTION [1 upvotes]: I was going through this link and I found the minimization expression. 
It says $\|Xw-y\|_2^2$. 
What is the significance of $2$ in the subscript? What does it mean? I understand that the double vertical lines mean the length of the vector.

REPLY [3 votes]: This designates the $2$-norm of your vector. If $1<p<\infty$, then the $p$ norm of a vector $x=[x_1,x_2,\dots,x_n]\in\mathbb C^n$ is defined as
$$||x||_p = \sqrt[p]{|x_1|^p + |x_2|^p + \cdots + |x_n|^p}$$
For the particular case of $p=2$, the $2$-norm of the vector is also called the Euclidean norm (and it is equal to our standard definition of distance):
$$||x||_2 = \sqrt{\langle x,x\rangle}$$
Where $$\langle x,y\rangle = \sum_{i=1}^n x_i \bar{y_i}$$
denotes the euclidian inner product in $\mathbb C^n$ (or in $\mathbb R^n$)
{"set_name": "stack_exchange", "score": 1, "question_id": 1292444}