Direction of a 2D Vector - Formulas and Examples

The direction of a vector is the orientation of the vector in a coordinate system, usually described by the angle it forms with one of the axes. To find the direction of a 2D vector, we calculate the inverse tangent of the y-component of the vector over the x-component.

In this article, we will learn the formula that we can apply to find the direction of a vector. We will learn how to derive this formula and use it to solve some practice problems.

PHYSICS
Formula for the angle or direction of a 2D vector

Relevant for...

Learning about the direction of a vector with examples.

See examples

PHYSICS
Formula for the angle or direction of a 2D vector

Relevant for...

Learning about the direction of a vector with examples.

See examples

How to calculate the direction of a 2D vector?

In a 2D Cartesian coordinate system ($latex x, ~y$ plane), the direction of a vector can be specified by the angle it makes with the positive $latex x$ axis.

This angle is normally measured counterclockwise, with the range of possible angles being 0° to 360° (0 to 2π radians).

To calculate the angle of a vector using its components, we can use trigonometry, specifically, the tangent function.

Suppose we have the vector $latex \vec{V}$ with components $latex V_{x}$ and $latex V_{y}$ and angle $latex \theta$:

Diagram of angle or direction of a 2D vector

We can observe that we have a right triangle, where the vector $latex \vec{V}$ is the hypotenuse. The adjacent side (base) is equal to $latex V_{x}$, and the opposite side (height) is $latex V_{y}$.

According to the definition of the tangent function in a right triangle, we have:

$$\tan(\theta) = \frac{\text{opposite}}{\text{adjacent}}$$

In this case,

$$\tan(\theta) = \frac{V_{y}}{V_{x}}$$

To find θ, we have to take the inverse tangent (also called arctangent or atan) of both sides of the equation. Then,

$$\theta = \tan^{-1}\left(\frac{V_{y}}{ V_{x}}\right)$$

It is important to take into account the quadrant in which the vector is located since the inverse tangent function returns a result between $latex -\frac{\pi}{2}$ and $latex \frac{\pi}{2}$ (-90° to 90°).

Therefore, we can use the following table to obtain the correct angle:

QuadrantValue of $latex \tan^{-1}$
IUse the value of the calculator
IIAdd 180° (π) to the calculator value
IIIAdd 180° (π) to the calculator value
IVAdd 360° (2π) to the calculator value

Solved examples on the direction of a vector

EXAMPLE 1

Find the angle $latex \theta$ of the vector $latex \vec{A}$ with components $latex A_{x} = 3$ and $latex A_{y} = 4$.

Solution

EXAMPLE 2

What is the angle $latex \theta$ of the vector $latex \vec{B}$ that has components $latex B_{x} = -5$ and $latex B_{y} = 12$?

Solution

EXAMPLE 3

Find the angle $latex \theta$ of the vector $latex \vec{C}$ having components $latex C_{x} = -6$ and $latex C_{y} = -8$.

Solution

EXAMPLE 4

What is the angle $latex \theta$ of the vector $latex \vec{D}$ with components $latex D_{x} = 7$ and $latex D_{y} = -3$?

Solution

EXAMPLE 5

If a vector has components $latex A_{x} = -10$ and $latex A_{y} = 0$, what is its angle $latex \theta$?

Solution

EXAMPLE 6

Find the angle $latex \theta$ of the vector $latex \vec{G}$ with components $latex G_{x} = 8$ and $latex G_{y} = 15$.

Solution

EXAMPLE 7

What is the angle $latex \theta$ of the vector $latex \vec{H}$ with components $latex H_{x} = -12$ and $latex H_{y} = -5$?

Solution

EXAMPLE 8

An airplane is flying on a northerly course at a speed of 150 km/h. There is a strong westerly wind pushing the airplane eastward with a speed of 40 km/h. What is the direction of the airplane relative to the ground?

Solution

2D Vector direction - Practice problems

Direction of a vector quiz
Logo
You have completed the quiz!

Find the angle θ of a vector that has the components $latex V_{x}=0$ and $latex V_{y}=-14$.

Write the angle in degrees.

$latex \theta=$

See also

Interested in learning more about vectors? You can take a look at these pages:

Learn mathematics with our additional resources in different topics

LEARN MORE