Understanding Vector Norms: L0, L1, L2, L∞, and Lp
This article introduces vector norms—including L0, L1, L2, L∞, and general Lp—explaining their mathematical definitions, geometric interpretations, and roles in machine learning such as compressive sensing and distance‑cosine equivalence after L2 normalization, supplemented with illustrative formulas and reference links.
Norms are functions that measure the “length” of vectors and are fundamental in linear algebra, functional analysis, and many applied fields. The article starts by recalling the familiar Euclidean (L2) norm and then presents other common norms.
L0 norm : Counts the number of non‑zero components in a vector. For example, the vector A = (0, 3, 6) has an L0 norm of 2. In compressive sensing, minimizing the L0 norm is desirable but NP‑hard, so it is often relaxed to L1 minimization.
L1 norm : Sum of absolute values of vector components. For A = (0, 3, 6), the L1 norm equals |0|+|3|+|6| = 9. L1 minimization is convex and easier than L0, but its derivative is not smooth, leading many problems to be further transformed to L2 minimization.
L2 norm : The Euclidean norm, defined as the square root of the sum of squares. For X = (2, 3, 6), the L2 norm is √(2²+3²+6²). This norm is widely used because it corresponds to geometric distance.
L∞ norm : Maximum absolute component of the vector. For X = (2, 3, 6), the L∞ norm equals 6.
Lp norm : Generalizes L1, L2, and L∞. Defined as (∑|x_i|^p)^{1/p}. Varying p changes the shape of the unit “circle” (e.g., a square for p = 1, a circle for p = 2, and a square again for p = ∞). Illustrations of unit circles for different p values are provided.
Advantages of L2 norm : After L2 normalization, Euclidean distance between vectors becomes equivalent to cosine similarity, enabling efficient similarity calculations. The article provides a geometric proof using unit circles and discusses practical implications for clustering algorithms such as scikit‑learn’s K‑means, which only support Euclidean distance.
Reference: Wikipedia – Norm (mathematics) .
Xueersi Online School Tech Team
The Xueersi Online School Tech Team, dedicated to innovating and promoting internet education technology.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.