Vector Norm Calculator
Compute L1, L2, L∞ vector norms, unit vector, vector distance, dot product, and angle — 100% in your browser.
Components separated by commas; a and b must have the same number of components.
Worked Examples (verified)
| Input | Result |
|---|---|
| v = (3, 4) | ‖v‖₁ = 7, ‖v‖₂ = 5, ‖v‖∞ = 4, v̂ = (0.6, 0.8) |
| v = (−6, 8) | ‖v‖₁ = 14, ‖v‖₂ = 10, ‖v‖∞ = 8, v̂ = (−0.6, 0.8) |
| a = (3, 4), b = (5, 6) | a·b = 39, θ = 2.9357° |
| a = (1, 2, 3), b = (4, 5, 6) | d₂ = 5.1962, d₁ = 9 |
All figures above were recomputed with a high-precision Python oracle (50-digit Decimal).
Formulas
FAQ
What is a vector norm?
A vector norm is a function that measures the 'length' or 'magnitude' of a vector in n dimensions. The three most common norms: the L1 (Manhattan) norm = sum of absolute component values; the L2 (Euclidean) norm = square root of the sum of squared components; the L∞ (max) norm = largest absolute component value.
What is the Euclidean norm of the vector (3, 4)?
‖(3, 4)‖₂ = √(3² + 4²) = √(9 + 16) = √25 = 5. This is the classic 3-4-5 Pythagorean triple.
What is the difference between the L1, L2, and L∞ norms?
For the vector (3, 4): L1 = |3| + |4| = 7; L2 = √(3²+4²) = 5; L∞ = max(|3|, |4|) = 4. L1 measures 'city-block' (Manhattan) distance, L2 measures straight-line Euclidean distance, and L∞ takes only the largest component.
How do I compute the unit vector (normalization)?
Divide each vector component by its L2 norm: û = v / ‖v‖₂. Example: v = (3, 4) has ‖v‖₂ = 5, so the unit vector = (3/5, 4/5) = (0.6, 0.8). A unit vector always has length 1 and points in the same direction as the original vector. The zero vector cannot be normalized.
How do I compute the Euclidean distance between two vectors?
Subtract corresponding components, then take the L2 norm of the difference: d = ‖a − b‖₂. Example: a = (1, 2, 3), b = (4, 5, 6) → difference = (−3, −3, −3) → d = √(9 + 9 + 9) = √27 ≈ 5.1962. Its Manhattan distance = 3 + 3 + 3 = 9.
How are the dot product and the angle between vectors related?
The dot product relates to the angle via a·b = ‖a‖₂‖b‖₂cos θ, so θ = arccos(a·b / (‖a‖₂‖b‖₂)). Example: (3, 4)·(5, 6) = 15 + 24 = 39; angle = arccos(39/(5 × √61)) ≈ 2.9357°. A zero dot product means the two vectors are perpendicular (orthogonal).
Does this calculator support n-dimensional vectors?
Yes. Add or remove as many components as needed (2D, 3D, up to n dimensions). To compare two vectors (distance, dot product, angle), both vectors must have the same number of components.
Are my vector data sent to a server?
No. This calculator is 100% client-side: all computations run in your browser with local JavaScript, with no network requests to any server.
Free tool by NRTechStudio