1001Ferramentas
šŸ“ Calculators

3D Vector Norm

Computes the Euclidean norm of a 3D vector from its x, y and z components.

—

3D vector norm (Euclidean length)

The Euclidean norm (or L2 norm) of a 3D vector v = (x, y, z) is |v| = √(x² + y² + z²). It's the Pythagorean theorem carried into three dimensions. Divide the vector by its norm and you get the unit vector vĢ‚ = v/|v|, which has length 1 and points the same way as v. That last step only works when |v| ≠ 0.

Example: for v = (1, 2, 2), |v| = √(1 + 4 + 4) = √9 = 3, and vĢ‚ = (1/3, 2/3, 2/3).

Other norms: the L1 norm (Manhattan) is |x|+|y|+|z|, which measures distance as if you had to walk a grid. The Lāˆž norm (Chebyshev) is max(|x|, |y|, |z|). One practical difference: L2 stays the same under rotation, while L1 and Lāˆž don't.

Applications

You run into 3D norms in more places than you'd expect. In CAD and 3D computer graphics, surface normals get normalized before any lighting math happens. Physics and engineering lean on them to find the magnitude of a force or velocity. GPS and navigation measure Euclidean distance between coordinates, and machine learning uses L1 (lasso) and L2 (ridge) regularization to keep models from getting too complex.

FAQ

What if the vector is zero? The norm comes out to 0, and there's no unit vector to speak of, since a zero vector has no direction.

When pick L1 over L2? Reach for L1 when you want sparsity (it drives coefficients to exactly zero) or when outliers are a concern. L2 has the advantage of being differentiable everywhere and matching ordinary Euclidean geometry.

Does this extend to n dimensions? It does: |v| = √(v₁² + v₂² + … + vₙ²). That one formula is what defines the Euclidean norm in any ā„āæ.

Related Tools