Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Vector Magnitude |v|
13
length of the vector
Sum of squares (x²+y²+z²) 169

What Is Vector Magnitude?

The magnitude of a vector — written \(\lvert \vec{v} \rvert\) — is its length, the straight-line distance from the tail of the vector to its head. It is always a non-negative number and is independent of the vector's direction. This calculator computes the magnitude of a vector given its components in two or three dimensions.

2D vector from origin with x and y components forming a right triangle, hypotenuse labeled as magnitude
A 2D vector's magnitude is the hypotenuse of the right triangle formed by its x and y components.

How to Use This Calculator

Select whether your vector is 2D or 3D. Enter the x and y components (and z for 3D vectors). Components can be positive, negative, or zero. The calculator squares each component, adds them together, and takes the square root to return the magnitude.

The Formula Explained

The formula is a direct extension of the Pythagorean theorem. In 2D, $$\lvert \vec{v} \rvert = \sqrt{\text{x}^{2} + \text{y}^{2}}$$ In 3D, we add a third squared term: $$\lvert \vec{v} \rvert = \sqrt{\text{x}^{2} + \text{y}^{2} + \text{z}^{2}}$$ Squaring removes the effect of negative signs, so the result is always positive. The sum of squares is shown alongside the answer so you can verify each step.

Advertisement

Worked Example

Take the 3D vector \(\vec{v} = (3, 4, 12)\). Square each component: $$9 + 16 + 144 = 169$$ The magnitude is \(\sqrt{169} = 13\). A famous 2D example is \((3, 4)\): \(9 + 16 = 25\), so \(\lvert \vec{v} \rvert = \sqrt{25} = 5\).

FAQ

Can the magnitude be negative? No. Because it is a square root of a sum of squares, the magnitude is always zero or positive. It is zero only for the zero vector.

What units does the result have? The magnitude carries the same units as the components. If x, y, z are in metres, the magnitude is in metres.

Does direction matter? No. Magnitude measures length only. Two vectors pointing in opposite directions can have the same magnitude.

Last updated: