linear algebra calculators

Vector Magnitude Calculator

Find the length (magnitude) of a 3D vector by entering its X, Y, and Z components. Essential for normalizing vectors, computing distances from the origin, and working with physics or graphics problems.

About this calculator

The magnitude of a vector — also called its length or norm — measures how far the vector's tip is from the origin. For a 3D vector **v** = (x, y, z), the formula is: |**v**| = √(x² + y² + z²). This is a direct application of the Pythagorean theorem extended into three dimensions: the magnitude is the length of the space diagonal of a rectangular box with sides x, y, and z. The result is always a non-negative number and is zero only for the zero vector. Magnitude is critical for normalizing a vector (dividing each component by the magnitude to get a unit vector with length 1). It also appears in the dot product formula when computing angles, and in physics when finding the speed of an object given its velocity components.

How to use

Suppose your vector is **v** = (3, 4, 0). Enter x = 3, y = 4, z = 0. Apply the formula: |**v**| = √(3² + 4² + 0²) = √(9 + 16 + 0) = √25 = 5. The magnitude is 5. This is the classic 3-4-5 right triangle in 3D space (with z = 0). Now try **v** = (1, 2, 2): |**v**| = √(1 + 4 + 4) = √9 = 3. To normalize this vector, divide each component by 3, giving the unit vector (1/3, 2/3, 2/3), which has magnitude exactly 1.

Frequently asked questions

What is the difference between magnitude and direction of a vector?

Magnitude is the scalar length of a vector — it tells you how big or how far, but not which way. Direction describes where the vector points in space, typically expressed as an angle or as a unit vector. Together, magnitude and direction fully specify a vector. In physics, for instance, speed is the magnitude of velocity and is always positive, while velocity also carries direction. Separating these two properties is useful when you want to scale a vector (change its length) without altering where it points.

How do I normalize a vector using its magnitude?

To normalize a vector means to scale it so its magnitude becomes exactly 1, producing a unit vector that preserves only direction. Divide each component by the magnitude: û = (x/|v|, y/|v|, z/|v|). For example, if **v** = (3, 4, 0) and |**v**| = 5, the unit vector is (0.6, 0.8, 0). You can verify normalization by computing the magnitude of û — it will equal 1. Unit vectors are widely used in computer graphics for surface normals and lighting calculations, and in physics for specifying directions of forces.

Why does the magnitude formula use a square root of the sum of squares?

The formula comes from the Pythagorean theorem applied repeatedly. In 2D, the distance from the origin to point (x, y) is √(x² + y²) by the Pythagorean theorem. Extending to 3D, you first find the diagonal of the base rectangle — √(x² + y²) — and then treat that as one leg of a right triangle with height z, giving √(x² + y² + z²). This generalizes to any number of dimensions, which is why the Euclidean norm in n-dimensional space is always √(Σxᵢ²). The squaring ensures negative components do not cancel positive ones.