Magnitude of a Vector Formula Solver with Worked Examples
The magnitude (length) of a vector with components x, y and z is ∣v∣=x2+y2+z2. It is Pythagoras’ theorem in three dimensions, and for a 2D vector you set z=0.
Give every value except the one you want, or write the letter with a question mark, for example x=3, y=4, z=0 or x=2, y=3, z=6. Every answer is checked by putting it back into the formula.
A vector has both a size and a direction. The size is its magnitude, which you find by squaring each component, adding the squares and taking the square root. In two dimensions this is the same calculation as the hypotenuse of a right-angled triangle.
The magnitude is always positive or zero, and it is zero only for the zero vector. A vector with magnitude 1 is called a unit vector, which is useful for describing directions on their own; in the plane, the angle of the vector carries the same information.
To find the length of a vector between two points, first work out the vector from one point to the other and then take its magnitude. This is exactly how the distance between two points is found, and in space it gives the 3D distance formula.
What is it used for?
The magnitude of a vector is its length. It is needed whenever you want the size of a velocity, a force or a displacement, regardless of direction.
Finding the size of a force from its horizontal and vertical components.
How to use the magnitude of a vector (2d and 3d) formula
Write the vector in component form, for example (3,4,0).
Square each component and add the squares.
Take the square root of the sum.
To find a missing component, subtract the other squares from m2 and take the square root.
Graph
The two components form the shorter sides of a right-angled triangle, so the length of the vector is the hypotenuse, √(3² + 4²) = 5.
Worked examples
Each example below was worked out by the solver on this page and checked by substituting the answer back into the formula.
Example 1: a 2D vector
Find the magnitude of the vector (3,4).
Magnitude of a vector (2D and 3D)Answer checked
Answer
m=5
The formula
Magnitude of a vector (2D and 3D). In this formula m is the magnitude (length) of the vector, x is the x-component (use positive values), y is the y-component (use positive values), z is the z-component (use 0 for a 2D vector).
∣v∣=x2+y2+z2
What we know and what we want
We know x=3,y=4,z=0 and we want to find m, the magnitude (length) of the vector.
Substitute the numbers
m=32+42+02
Calculate
m=5
Check by substituting back
Put all the values back into the original formula: both sides should match.
∣v∣=32+42+02✓
Example 2: a 3D vector
Find the magnitude of the vector 2i+3j+6k.
Magnitude of a vector (2D and 3D)Answer checked
Answer
m=7
The formula
Magnitude of a vector (2D and 3D). In this formula m is the magnitude (length) of the vector, x is the x-component (use positive values), y is the y-component (use positive values), z is the z-component (use 0 for a 2D vector).
∣v∣=x2+y2+z2
What we know and what we want
We know x=2,y=3,z=6 and we want to find m, the magnitude (length) of the vector.
Substitute the numbers
m=22+32+62
Calculate
m=7
Check by substituting back
Put all the values back into the original formula: both sides should match.
∣v∣=22+32+62✓
Example 3: a missing component
A vector (3,4,z) has magnitude 13. Find the positive value of z.
Magnitude of a vector (2D and 3D)Answer checked
Answer
z=12
The formula
Magnitude of a vector (2D and 3D). In this formula m is the magnitude (length) of the vector, x is the x-component (use positive values), y is the y-component (use positive values), z is the z-component (use 0 for a 2D vector).
∣v∣=x2+y2+z2
What we know and what we want
We know m=13,x=3,y=4 and we want to find z, the z-component (use 0 for a 2D vector).
Rearrange for z
Subtract x² and y² from m², then take the square root.
z=m2−x2−y2
Substitute the numbers
z=132−32−42
Calculate
z=12
Check by substituting back
Put all the values back into the original formula: both sides should match.
∣v∣=32+42+122✓
Special cases
A few situations come up again and again. Knowing them saves time and helps you spot answers that cannot be right.
A 2D vector
(3, 4): magnitude 5
√(9 + 16).
A 3D vector
(2, 3, 6): magnitude 7
√(4 + 9 + 36).
A missing component
m = 13, x = 3, y = 4: z = 12
z = √(m² − x² − y²).
A unit vector
(3, 4) ÷ 5 = (0.6, 0.8)
Divide by the magnitude.
Word problems
The magnitude (length) of a vector is |v| = √(x² + y² + z²).
A 2D vector
Find the magnitude of (3, 4).
Squares9 + 16 = 25
Root5
Check: 3-4-5 triangle ✓5.
A 3D vector
Find the magnitude of (2, 3, 6).
Squares4 + 9 + 36 = 49
Root7
Check: 7² = 49 ✓7.
A missing component Higher
A vector (3, 4, z) has magnitude 13. Find z.
Rearrangez = √(m² − x² − y²)
Substitutez = √(169 − 9 − 16) = √144
Calculatez = 12
Check: 9 + 16 + 144 = 169 ✓z = 12.
A unit vector Higher
Find the unit vector in the direction of (3, 4).
Magnitude5
Divide each component(3/5, 4/5) = (0.6, 0.8)
Check: 0.36 + 0.64 = 1 ✓(0.6, 0.8).
Common mistakes
Adding the components
3 + 4 = 7 ✗
√(9 + 16) = 5 ✓
Square then add.
Forgetting the square root
magnitude = 25 ✗
magnitude = √25 = 5 ✓
Take the root.
Ignoring the z component
√(4 + 9) for (2, 3, 6) ✗
√(4 + 9 + 36) ✓
Include every component.
Squaring a negative as negative
(−3)² = −9 ✗
(−3)² = 9 ✓
Squares are positive.
Exam tips
|v| = √(x² + y² + z²).
Square every component.
Negatives become positive.
Unit vector = v ÷ |v|.
Check with Pythagoras.
Practice questions
Try each one on paper, then open the answer. Use the solver above to see the full working.
1. Find the magnitude of (6, 8) Foundation
10
2. Find the magnitude of (5, 12) Foundation
13
3. Find the magnitude of (1, 2, 2) Foundation
3
4. Find the magnitude of (4, −3, 12) Higher
13
5. A vector (x, 4, 3) has magnitude √41. Find x Higher
4
6. Find the magnitude of (2, 5) to 2 decimal places Higher
5.39
Practice generator
Unlimited fresh questions with instant marking. Choose a level, work it out on paper, then type your answer.