# Magnitude of 2D and 3D Vectors – Formulas and Examples

The magnitude of a vector helps us to quantify the size or length of a vector in space. To find the magnitude of a 2D or 3D vector, we have to use the Pythagorean theorem with the corresponding components.

In this article, we will learn the formulas for calculating the magnitude of 2D and 3D vectors, thus providing a solid foundation for further exploration of vectors. We will look at several examples with answers.

##### PHYSICS

Relevant for

Learning about the magnitude of a vector with examples.

See examples

##### PHYSICS

Relevant for

Learning about the magnitude of a vector with examples.

See examples

## How to calculate the magnitude of a vector?

To calculate the magnitude of a vector, we can use the components of the vector in standard formulas that are derived from the Pythagorean theorem.

### Magnitude of a 2D vector

Consider the following 2D vector with the components $latex A_{x}$ and $latex A_{y}$.

To find the magnitude of this vector, we can use the Pythagorean theorem, which states that in a right triangle, the square of the length of the hypotenuse is equal to the sum of the squares of the lengths of the other two sides.

In this case, the hypotenuse is the magnitude, that is, $latex |A|$. The two sides are $latex A_{x}$ and $latex A_{y}$:

$latex |A|^2=A_{x}^2+A_{y}^2$

Taking the square root of both sides, we find the magnitude of the 2D vector:

$latex |A| = \sqrt{A_{x}^2+A_{y}^2}$

### Magnitude of a 3D vector

Let’s now consider a 3D vector having components $latex A_{x}$, $latex A_{y}$ and $latex A_{z}$.

We can use the same logic as for the 2D vector, but this time, we use the Pythagorean theorem in 3D. Then, we have:

$latex |A|^2=A_{x}^2+A_{y}^2+A_{z}^2$

Taking the square root of both sides, we find the magnitude of the 3D vector:

$latex |A| = \sqrt{A_{x}^2+A_{y}^2+A_{z}^2}$

## 10 Solved examples on the magnitude of a vector

### EXAMPLE 1

Find the magnitude of the vector $latex \vec{A} = 3i+4j$.

We have the following components:

• $latex A_{x}=3$
• $latex A_{y}=4$

Now, we use these components in the formula for the magnitude of a 2D vector:

$latex |A| = \sqrt{A_{x}^2+A_{y}^2}$

$latex = \sqrt{3^2 + 4^2}$

$latex = \sqrt{9 + 16}$

$latex = \sqrt{25}$

$latex |A| = 5$

### EXAMPLE 2

What is the magnitude of the vector $latex \vec{B} = -6i+8j$?

We can observe the following:

• $latex B_{x}=-6$
• $latex B_{y}=8$

Applying the magnitude formula with the given components, we have:

$latex |B| = \sqrt{A_{x}^2+A_{y}^2}$

$latex = \sqrt{(-6)^2 + 8^2}$

$latex = \sqrt{36 + 64}$

$latex = \sqrt{100}$

$latex |B| = 10$

### EXAMPLE 3

Determine the magnitude of the vector $latex \vec{C} = -5i +12j$.

We can observe the following:

• $latex C_{x}=-5$
• $latex C_{y}=12$

We use the formula for the magnitude of a 2D vector:

$latex |C| = \sqrt{C_{x}^2+C_{y}^2}$

$latex = \sqrt{(-5)^2 + 12^2}$

$latex = \sqrt{25 + 144}$

$latex = \sqrt{169}$

$latex |C| = 13$

### EXAMPLE 4

A hiker starts at the base of a mountain and walks 6 kilometers east and then 3 kilometers north to reach a campsite. What is the straight-line distance between the base and the campsite?

We can represent the base of the mountain by the origin (0, 0) in a 2D coordinate system. The movement of the hiker can be represented as a 2D vector, whose components are the distance traveled in the east direction (x) and the distance traveled in the north direction (y).

So, we have:

• $latex V_{x}=6$
• $latex V_{y}=3$

Using these components in the formula for the magnitude, we have:

$latex |V| = \sqrt{V_{x}^2+V_{y}^2}$

$latex = \sqrt{6^2 + 3^2}$

$latex = \sqrt{36 + 9}$

$latex = \sqrt{45}$

$latex |V| = 6.71$

The distance between the base and the camp is 6.71 kilometers.

### EXAMPLE 5

A ship sails 10 kilometers west and then 6 kilometers south from a port. What is the shortest distance between the ship’s final position and the port?

We represent the port by the origin (0, 0). The motion of the ship can be represented as a vector, whose components are the distance traveled in the west direction (x) and the distance traveled in the south direction (y).

As the ship moves westward (negative $latex x$) and southward (negative $latex y$), the components of the vector are negative. Then,

• $latex V_{x}=-10$
• $latex V_{y}=-6$

When applying the formula for the magnitude:

$latex |V| = \sqrt{V_{x}^2+V_{y}^2}$

$latex = \sqrt{(-10)^2 + (-6)^2}$

$latex = \sqrt{100 + 36}$

$latex = \sqrt{136}$

$latex |V| = 11.66$

The shortest distance between the ship’s final position and the port is approximately 11.66 kilometers.

### EXAMPLE 6

Find the magnitude of the vector $latex \vec{A} = 1i + 2j +2k$.

We can observe the following:

• $latex A_{x}=1$
• $latex A_{y}=2$
• $latex A_{z}=2$

Applying the formula for the magnitude of a 3D vector, we have:

$latex |A| = \sqrt{A_{x}^2+A_{y}^2+A_{z}^2}$

$latex = \sqrt{1^2 + 2^2+2^2}$

$latex = \sqrt{1+4+4}$

$latex = \sqrt{9}$

$latex |A| = 3$

### EXAMPLE 7

If we have the vector $latex \vec{B} = -3i+ 4j+ 2k$, what is its magnitude?

We can observe the following information:

• $latex B_{x}=-3$
• $latex B_{y}=4$
• $latex B_{z}=2$

Applying the formula for the magnitude of a 3D vector, we have:

$latex |B| = \sqrt{B_{x}^2+B_{y}^2+B_{z}^2}$

$latex = \sqrt{(-3)^2 + 4^2+2}$

$latex = \sqrt{9 + 16+4}$

$latex = \sqrt{29}$

$latex |B| = 5.385$

### EXAMPLE 8

Find the magnitude of the vector $latex \vec{C} = 5i -6j+ 8k$.

We have the following components:

• $latex C_{x}=5$
• $latex C_{y}=-6$
• $latex C_{z}=8$

Using the formula for the magnitude, we have:

$latex |C| = \sqrt{C_{x}^2+C_{y}^2+C_{z}^2}$

$latex = \sqrt{5^2 + (-6)^2+8^2}$

$latex = \sqrt{25 +36+64}$

$latex = \sqrt{125}$

$latex |C| = 11.18$

### EXAMPLE 9

A drone takes off from a location (0, 0, 0) in a 3D coordinate system. It flies 30 meters east, then 40 meters north, and finally ascends 50 meters vertically. What is the straight line distance between the initial and final positions of the drone?

The movement of the drone can be represented as a 3D vector, where the components correspond to the distances traveled eastward, northward, and upward:

Then, we have these components:

• $latex V_{x}=30$
• $latex V_{y}=40$
• $latex V_{z}=50$

Now, we use the formula for the magnitude of a 3D vector:

$latex |V| = \sqrt{V_{x}^2+V_{y}^2+V_{z}^2}$

$latex = \sqrt{30^2 + 40^2+50^2}$

$latex = \sqrt{900 + 1600+2500}$

$latex = \sqrt{5000}$

$latex |V| = 70.71$

The straight line distance between the initial and final positions of the drone is approximately 70.71 meters.

### EXAMPLE 10

An airplane flies at a constant altitude of 5 kilometers. It flies 32 kilometers to the south and 40 kilometers to the west. What is the straight-line distance between the initial and final positions of the airplane?

The motion of the aircraft can be represented as a 3D vector:

• $latex V_{x}=-40$
• $latex V_{y}=-32$
• $latex V_{z}=5$

Now, we calculate the magnitude with the given components:

$latex |V| = \sqrt{V_{x}^2+V_{y}^2+V_{z}^2}$

$latex = \sqrt{(-40)^2 + (-32)^2+5^2}$

$latex = \sqrt{1600 + 1024+25}$

$latex = \sqrt{2649}$

$latex |V| = 51.47$

The distance between the initial and final position of the aircraft is 51.47 kilometers.

## Magnitude of 2D and 3D vectors – Practice problems

Magnitude of vectors quiz
You have completed the quiz!

#### What is the magnitude of vector $latex \vec{A}=-8i+7j-9k$?

Write the answer using two decimal places.

$latex |V|=$