Length (Magnitude, Distance)
Definition
Geometrically, the magnitude of a vector is a length of the directed line.
It is denoted by double vertical bars.
$$
∣∣v∣∣
$$
The length(magnitude) of a vector quantifies its size(distance) from the origin in space.
Formula

It is computed using the Pythagorean theorem.
- 2D vector : $\vec{v}=(x,y)$
- Length : $∣∣v∣∣=\sqrt{x^2+y^2}$
- 3D vector : $\vec{v}=(x,y,z)$
- Length : $∣∣v∣∣=\sqrt{x^2+y^2+z^2}$
- n-Dimensional Vector : $\vec{v}=(x_1,x_2,\ldots,x_n)$
- Length : $∣∣v∣∣=\sqrt{x_1^2+x_2^2+\cdots+x_n^2}=\sqrt{\sum_{i=1}^n x_i^2}$
Properties
Non-Negativity
- The length of a vector is always non-negative.
- If the length is zero, the vector is the zero vector
- if $∣∣v∣∣=0$, then $\vec{v}=(0,0,0,…,0)$.
Triangle Inequality
$$
∣∣u+v∣∣≤∣∣u∣∣+∣∣v∣∣
$$
- This property reflects the geometric fact that in any triangle.
- The length of one side cannot exceed the sum of the other two sides.