A [[Vector Operations|Vector]] has two key properties:
1. *Direction:* The orientation of the vector in space.
2. *Length:* The magnitude or size of the vector.
The length of a vector can be computed using the Pythagorean theorem, as any vector can be seen as a linear combination of its components along mutually perpendicular basis vectors.
$ r = \begin{bmatrix} a\\b \end{bmatrix} \quad \implies \quad \lvert r \rvert = \sqrt{a^2+b^2} $
![[vector-length.png|center|300]]
For a general vector $s$ with $n$ components, we simply take the square-root of summed squares from all vector components.
$
s=[s_1, \cdots, s_n]^T \quad \implies \quad
\lvert s \rvert =\sqrt{s_1^2+\dots+s_n^2} $
## Norm Notation
In multivariate statistics, the squared length of a vector is commonly used, as it simplifies computations by avoiding the square root. This is equivalent to the squared $\ell_2$-norm of a vector.
The $\ell_2$-norm of a vector $v$:
$ \lvert \lvert v \rvert \rvert_2 = \sqrt{v_1^2+\dots+v_n^2} $
The squared $\ell_2$-norm:
$ \lvert \lvert v \rvert \rvert_2^2 = v_1^2+\dots+v_n^2 $