Skip to main content
Interactive 3D/Norms Explorer
L1 = 1.400
L2 = 1.000
L∞ = 0.800
Lp(2.0) = 1.000
Lp Parameter
p (purple ball)2.0
Vector (x, y)
x0.6
y0.8
Toggle Norms
About Norms
L1 (p=1): Manhattan: sum of absolute values. Sparsity-inducing - used in LASSO.
L2 (p=2): Euclidean: ordinary distance. Used in weight decay, gradient magnitude.
L∞: Max norm: the largest absolute component. Used in RL value bounds.

Norms Explorer - Interactive Visualization

The choice of norm determines the shape of your regularization constraint. L1 (Manhattan) norm creates a diamond-shaped unit ball and promotes sparsity - coefficients can be exactly zero. L2 (Euclidean) creates a sphere - coefficients shrink uniformly. L∞ creates a cube. This visualization shows all four simultaneously, making the geometry of regularization concrete.

  • See L1 diamond, L2 sphere, L∞ cube, and Lp unit balls simultaneously
  • Drag p slider (0.5–4) and watch the shape morph
  • Enter a vector and see each norm value computed instantly
  • Understand why L1 promotes sparsity - the diamond has corners on axes
  • Connect norm geometry to Ridge (L2) and Lasso (L1) regularization

Part of the EngineersOfAI Interactive 3D - free interactive visualizations covering every major concept in machine learning and AI engineering. Hover any element for a plain-English explanation. No code required.