Tool to calculate the norm of a vector. The vector standard of a vector space represents the length (or distance) of the vector.
Vector Norm - dCode
Tag(s) : Matrix
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
The norm of a vector is a function that associates each vector with its length, that is, a non-negative real number. This norm is called the Euclidean norm or quadratic norm, or L² norm.
In a space of dimension $ n $, if $ A $ and $ B $ are two points, the norm of the vector $ \overrightarrow{AB} $, denoted $ \|\overrightarrow{AB}\| $, corresponds to the distance between $ A $ and $ B $ (the length of the segment $ [AB] $).
In dimension 1, the norm reduces to the absolute value of the real number.
In a Euclidean vector space of dimension $ n $, the norm of a vector $ \vec{v} = (x_1, x_2, \dots, x_n) $ is calculated by the square root of the sum of the squares of its components:
$$ \| \vec{v} \| = \sqrt{x_1^2 + x_2^2 + \cdots + x_n^2} $$
It can also be calculated from the dot product of the vector with itself: $$ \| \vec{v} \| = \sqrt{ \vec{v} \cdot \vec{v} } $$
Normalizing a vector involves constructing a unit vector (of magnitude 1) with the same direction as the original vector.
For a vector $ \vec{v} $, normalization is performed by dividing the vector by its norm: $$ \vec{u} = \frac{\vec{v}}{\|\vec{v}\|} $$
This operation is only possible if the vector is not zero: $ \vec{v} \neq \vec{0} $
Example: $$ \vec{v} = (3,4) \quad \Rightarrow \quad \| \vec{v} \| = \sqrt{3^2 + 4^2} = 5 \\ \vec{u} = \frac{1}{5}(3,4) = \left(\tfrac{3}{5}, \tfrac{4}{5}\right) $$
In the 2D plane, for a vector $ \vec{v} = (x,y) $ the formula is simplified $$ \|\vec{v}\|= \sqrt{x^2+y^2} $$
Example: $ \vec{v} = \left( \begin{array}{c} 1 \\ 2 \end{array} \right) $ so $ \|\vec{v}\| = \sqrt{1^2+2^2} = \sqrt{5} $
In 3D space, for a vector $ \vec{u} = (x,y,z) $ the formula is simplified $$ \|{\vec{u}}\|= \sqrt{x^2+y^2+z^2} $$
Geometrically, this norm corresponds to the distance of the point from the origin $ (0,0,0) $
From the coordinates of the points $ A (x_A,y_A) $ and $ B (x_B,y_B) $ of the vector $ \overrightarrow{AB} $, the components of the vector are $ {\overrightarrow {AB}} = \{ (x_B-x_A), (y_B-y_A) \} $ and therefore the norm is $ \|\overrightarrow {AB}\| = \sqrt{(x_B-x_A)^2+(y_B-y_A)^2} $
This generalizes to dimension $ n $, the components are $$ \overrightarrow{AB} = (x_{B1} - x_{A1}, \; x_{B2} - x_{A2}, \; \dots, \; x_{Bn} - x_{An}) $$ and the norm $$ \|\overrightarrow{AB}\| = \sqrt{(x_{B1} - x_{A1})^2 + (x_{B2} - x_{A2})^2 + \cdots + (x_{Bn} - x_{An})^2} $$
A unit vector is a vector with a norm equal to 1: $ \| \vec{v} \| = 1 $
dCode retains ownership of the "Vector Norm" source code. Any algorithm for the "Vector Norm" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Vector Norm" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Vector Norm" or any other element are not public (except explicit open source licence). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
The content of the page "Vector Norm" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source (Creative Commons CC-BY free distribution license).
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link:
In a scientific article or book, the recommended bibliographic citation is: Vector Norm on dCode.fr [online website], retrieved on 2025-11-29,