Vector Magnitude Calculator
Compute 3D vector magnitude |v| = √(x² + y² + z²). For 2D leave z=0.
|v| = —
Vector magnitude: |v| = √(x² + y² + z² + …)
The magnitude (or modulus, or Euclidean norm, or L2 norm) of a vector is the length of the arrow that represents it: |v| = √(x² + y² + z² + …). It generalises the Pythagorean theorem from 2D to any number of dimensions. Example: v = (3, 4, 0) → |v| = √(9 + 16 + 0) = 5. Dividing each component by |v| gives the unit vector v̂ = v / |v|, which points in the same direction but has length 1 — essential for defining directions independently of magnitude. Other norms exist: the L1 norm (Manhattan) is |x| + |y| + … and counts city-block distance; the L∞ norm (Chebyshev) is max(|x|, |y|, …). Magnitudes appear in the dot product u·v = |u||v|cos θ (used to find the angle between vectors) and in the cross product |u×v| = |u||v|sin θ.
Applications
Physics (the magnitude of a velocity vector is the speed; the magnitude of force gives its intensity; electric/magnetic field strengths), computer graphics (normalising normals for lighting and shading), robotics and game engines (distance between objects), GPS and navigation (3D distance with altitude), and machine learning — cosine similarity in NLP embeddings depends on the magnitudes of the embedding vectors.
FAQ
What's the difference between magnitude and direction? The magnitude is a non-negative scalar (the "size" of the vector), while the direction is given by the unit vector v / |v|. A vector is fully specified by both.
Can the magnitude be negative? No. It comes from a square root of a sum of squares, so it's always ≥ 0. It is zero only for the zero vector.
When should I use L1 instead of L2? L1 (Manhattan) is preferred when you want robustness against outliers or when displacement happens along grid axes (e.g., Lasso regularisation, taxi route distances). L2 is the standard for Euclidean geometry and physics.
Related Tools
Rent Adjustment Calculator
Compute annual rent adjustment by IGP-M or IPCA accumulated in the last 12 months (manually configurable).
Pregnancy Calculator
Compute estimated due date (EDD), gestational age and trimester from the last menstrual period (LMP).
Fertile Period Calculator
Compute fertile window and ovulation day from the first day of the last cycle and the average cycle length.