Compute L1, L2 (Euclidean), and L-infinity norms of a vector.
A norm measures the 'length' or 'size' of a vector. The L2 (Euclidean) norm is the ordinary distance from the origin. The L1 (Manhattan) norm sums absolute values. The L∞ (Chebyshev) norm is the maximum absolute component.
L2 (Euclidean)
||v||₂ = √(Σ vᵢ²)
L1 (Manhattan)
||v||₁ = Σ |vᵢ|
L∞ (Maximum)
||v||∞ = max |vᵢ|
L2 is the default geometric length. L1 is used in sparse optimization (lasso). L∞ is used in game theory and when bounding the worst-case component matters.
Yes. The Euclidean norm is the standard vector magnitude — the straight-line distance from the origin to the vector's tip.