Home / Mathematics / Linear Algebra / Vector Magnitude (Euclidean Norm)

Formula & Calculator

Vector Magnitude (Euclidean Norm)

The magnitude (or length) of a vector is found by squaring each component, adding them up, and taking the square root. For example, the vector (3,4) has magnitude 5, the classic 3-4-5 triangle. It is just the Pythagorean theorem extended to any number of dimensions. It is used to measure distances, normalise vectors to unit length, and compute errors in machine learning.

Mathematics Linear Algebra Daily Life
linear algebra · geometry of vectors

Vector Magnitude Calculator

Compute the Euclidean norm of a vector, solve for a missing component, compare two vectors, and see the geometry behind the formula.

|v| = √( v₁² + v₂² + v₃² + ⋯ )
2D–6D vectorssolve any componentangle & direction3 live graphs

Calculator

Dimensions
Solve for (unknown)
Magnitude |v|
units

Compare with a second vector u

Scale factor k (for |k·v|)

Results

Direction cosines & angles

What this tool offers

Solve any partFind |v| or a missing component from the others (Advanced mode).
2D to 6D vectorsWorks in the plane, in 3D space, or in higher dimensions.
Direction & anglesUnit vector, direction cosines and angles to each axis.
Two-vector comparisonDot product, angle between vectors, projection, and 3D cross product.
Live graphsSee how magnitude reacts to scaling and to each component.
Tables & theoryComponent breakdown, scaling table, derivation and use cases.

How to use

  1. Pick a modeBasic finds the magnitude of a 3D vector. Advanced unlocks any dimension, solving for a component, and a second vector.
  2. Enter the componentsType v₁, v₂, v₃ … The magnitude updates instantly as you type.
  3. Or solve backwardsIn Advanced, choose a component as the unknown and enter |v| instead — the calculator finds the missing value.
  4. Read the geometryCheck the direction cosines table and the vector diagram to see where the vector points.
  5. Compare vectorsAdd a second vector u to see the angle between v and u, their dot product, and (in 3D) the cross product.

Diagram · How the formula builds up

Graph 1 · Vector diagram

Graph 2 · Magnitude vs scale factor k

Graph 3 · Magnitude sensitivity to v₁

Component breakdown table

Scaling table (k·v)

Two-vector relations

Theory & related concepts

Definition

The Euclidean norm (magnitude, or length) of a vector v = (v₁, v₂, …, vₙ) is |v| = √(v₁² + v₂² + ⋯ + vₙ²). It is the straight-line distance from the origin to the point the vector describes, and generalizes the Pythagorean theorem to any number of dimensions.

Related formulas

  • Unit vector: v̂ = v / |v|, a vector of magnitude 1 pointing the same direction.
  • Direction cosines: cos θᵢ = vᵢ / |v|, the angle each axis makes with v.
  • Scaling: |k·v| = |k| · |v| — magnitude scales linearly with a scalar multiplier.
  • Dot product: v · u = v₁u₁ + v₂u₂ + ⋯, and cos θ = (v · u) / (|v||u|) gives the angle between two vectors.
  • Distance between points: the magnitude of the vector connecting them, |P₂ − P₁|.
  • Cross product (3D only): v × u is perpendicular to both, with magnitude |v||u|sin θ.

Solving backwards

Given |v| and all but one component, the missing component is vᵢ = √(|v|² − Σ other vⱼ²), provided the value under the root is not negative — otherwise no real vector with that magnitude and those components exists.

Where it is used

Physics (speed from a velocity vector, force resultants), computer graphics (normalizing directions, lighting), machine learning (distance metrics, regularization), navigation (displacement and distance), and engineering (resultant loads and stresses).

Why is the magnitude never negative?

Each component is squared before summing, so the sum is always non-negative, and a square root of a non-negative number is non-negative.

What if a component is negative?

Squaring removes the sign, so a component's direction (positive or negative) does not change how much it contributes to the magnitude — only its own value's size matters.

Variables

Symbol Quantity Unit
|v| Magnitude (length) of the vector
v1, v2, v3 Components of the vector

What it means

The Euclidean norm (or magnitude) of a vector is its length, computed as the square root of the sum of the squares of its components. This generalises the Pythagorean theorem to higher dimensions. It is a measure of the vector’s "size" or "distance from the origin." In physics, it is used for speed (magnitude of velocity) and force magnitude. In data science, it is used to compute distances (Euclidean distance) for clustering, classification, and regression. Understanding vector magnitude is fundamental for any work with vectors in geometry, physics, and machine learning. It also appears in normalisation (unit vector) and in computing inner products.

Worked example

Vector Magnitude – Two Examples

Real‑World
Scenario: A navigator computes the length of vector (3,4,0) which represents displacement.
ParameterValue
Vector v(3,4,0)
1|v| = √(3²+4²+0²) = √25 = 5
Result 5 ✓ Distance
Scenario: A data scientist normalises vector (1,2,2) to unit vector.
ParameterValue
Vector v(1,2,2)
1|v| = √(1+4+4) = √9 = 3
Result 3 ✓ Norm
Insight: Euclidean norm is the length of the vector. Unit vector = v / |v|.

Common mistakes

  • Vector magnitude: |v| = √(v₁² + v₂² + v₃²) – always non‑negative.
  • Units: The magnitude has the same units as the vector components.
  • Normalisation: To get a unit vector, divide each component by the magnitude.
  • Distance: The magnitude of the difference between two vectors gives the distance.
  • Root: Ensure you take the square root – don’t forget it.

Applications

The Euclidean norm (magnitude) of a vector, |v| = √(v₁² + v₂² + v₃²), represents the length of the vector. This is fundamental for measuring distances, normalising vectors, and computing errors. Engineers use it in structural analysis to find displacements, in control systems for error metrics, and in signal processing for energy calculations. In machine learning, it serves as a regularisation term (L2 norm) and a distance metric. In navigation, it determines straight‑line distances. By computing the norm, professionals can standardise vectors, assess magnitudes, and analyse system states, making it a cornerstone of vector analysis and applied mathematics.

  • Distance and displacement calculations in geometry and physics
  • Normalisation of vectors for direction‑only analysis
  • Error metrics in optimisation and control (e.g., least squares)
  • Signal energy and power computations
  • Machine learning – L2 regularisation and Euclidean distance