keisoku

Vector Norm Calculator

Enter the components of an n-dimensional vector to compute its L2 (Euclidean), L1 (Manhattan), and L∞ (maximum) norms plus the unit vector.

Input

Enter each component of the vector. Separate them with commas, spaces, or new lines (e.g. 3, 4, 12).

Result

L2 norm (magnitude)

13

L1 norm

19

L∞ norm

12

Dimension

3

Components and unit vector

IndexComponentUnit vector
130.2308
240.3077
3120.9231

How it works

  • The L2 norm (Euclidean norm) is the square root of the sum of squared components, √(Σxᵢ²). It equals the straight-line distance from the origin to the tip of the vector (the vector's magnitude).
  • The L1 norm (Manhattan norm) is the sum of the absolute values of the components, Σ|xᵢ|, corresponding to distance traveled along a grid.
  • The L∞ norm (maximum norm) is the largest absolute value among the components, max|xᵢ|.
  • The unit vector is obtained by dividing each component by the L2 norm; it points in the same direction but has magnitude 1. A zero vector (all components 0) has an L2 norm of 0, so its unit vector is undefined.
  • Components may be separated by commas, spaces, or new lines, and the number of components entered becomes the dimension.

Reviews

Tell us what you think of this calculator.

Write a review

  1. Home
  2. Vector Norm Calculator