Magnitude of a Vector Formula Solver with Worked Examples

The magnitude (length) of a vector with components , and is . It is Pythagoras’ theorem in three dimensions, and for a 2D vector you set .

Write 2x or 2*x to multiply, ^ for powers, and ; between simultaneous equations. You can also type factor, expand, derivative of, integrate … from a to b, limit … as x->0 or 15% of 80.

Try an example

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.

  • : magnitude (length) of the vector
  • : x-component (use positive values)
  • : y-component (use positive values)
  • : z-component (use 0 for a 2D vector)

Before you start

This page is easier if you are comfortable with:

What Magnitude of a vector (2D and 3D) means

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.

How to use the magnitude of a vector (2d and 3d) formula

  1. Write the vector in component form, for example .
  2. Square each component and add the squares.
  3. Take the square root of the sum.
  4. To find a missing component, subtract the other squares from and take the square root.

Graph

The vector (3, 4) has length 5(3, 4)3O-1012345-1012345The vector (3, 4) has length 5xyGraph with x from -1 to 5 and y from -1 to 5. Shows point (3, 4) at (3, 4); point 3 at (3, 0); point O at (0, 0).

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 .

Magnitude of a vector (2D and 3D) Answer checked
Answer
m=5m=5
  1. The formula
    Magnitude of a vector (2D and 3D). In this formula is the magnitude (length) of the vector, is the x-component (use positive values), is the y-component (use positive values), is the z-component (use 0 for a 2D vector).
  2. What we know and what we want
    We know and we want to find , the magnitude (length) of the vector.
  3. Substitute the numbers
  4. Calculate
  5. Check by substituting back
    Put all the values back into the original formula: both sides should match.

Example 2: a 3D vector

Find the magnitude of the vector .

Magnitude of a vector (2D and 3D) Answer checked
Answer
m=7m=7
  1. The formula
    Magnitude of a vector (2D and 3D). In this formula is the magnitude (length) of the vector, is the x-component (use positive values), is the y-component (use positive values), is the z-component (use 0 for a 2D vector).
  2. What we know and what we want
    We know and we want to find , the magnitude (length) of the vector.
  3. Substitute the numbers
  4. Calculate
  5. Check by substituting back
    Put all the values back into the original formula: both sides should match.

Example 3: a missing component

A vector has magnitude 13. Find the positive value of .

Magnitude of a vector (2D and 3D) Answer checked
Answer
z=12z=12
  1. The formula
    Magnitude of a vector (2D and 3D). In this formula is the magnitude (length) of the vector, is the x-component (use positive values), is the y-component (use positive values), is the z-component (use 0 for a 2D vector).
  2. What we know and what we want
    We know and we want to find , the z-component (use 0 for a 2D vector).
  3. Rearrange for
    Subtract x² and y² from m², then take the square root.
  4. Substitute the numbers
  5. Calculate
  6. Check by substituting back
    Put all the values back into the original formula: both sides should match.

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).

  1. Squares9 + 16 = 25
  2. Root5
  3. Check: 3-4-5 triangle ✓5.

A 3D vector

Find the magnitude of (2, 3, 6).

  1. Squares4 + 9 + 36 = 49
  2. Root7
  3. Check: 7² = 49 ✓7.

A missing component Higher

A vector (3, 4, z) has magnitude 13. Find z.

  1. Rearrangez = √(m² − x² − y²)
  2. Substitutez = √(169 − 9 − 16) = √144
  3. Calculatez = 12
  4. Check: 9 + 16 + 144 = 169 ✓z = 12.

A unit vector Higher

Find the unit vector in the direction of (3, 4).

  1. Magnitude5
  2. Divide each component(3/5, 4/5) = (0.6, 0.8)
  3. 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

  1. |v| = √(x² + y² + z²).
  2. Square every component.
  3. Negatives become positive.
  4. Unit vector = v ÷ |v|.
  5. 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.

Solve: …

Key terms

Magnitude
The length of a vector.
Component
The part along an axis.
Unit vector
A vector of length 1.
Position vector
A vector from the origin.
Modulus
Another word for magnitude.
Direction
Where the vector points.

Frequently asked questions

What is the magnitude of a vector?

Its length, √(x² + y² + z²).

How do I find a unit vector?

Divide the vector by its magnitude.

Can a magnitude be negative?

No.

How is it linked to distance?

Distance is the magnitude of a difference vector.

Which page covers 3D distance?

distance in 3D.

Which page covers the scalar product?

scalar product.

More in Vectors and matrices and the formula sheets.