# 5.3.2: Vector Direction


## Vector Direction

Alyssa loves physics, and it fascinates her that there are calculations for all of the physical interactions and motions in the world around her. On Friday, Alyssa went to the county fair with her boyfriend Kurt, who decided it would be romantic if he could win her a giant stuffed animal in the can knockdown game. Unfortunately for Kurt, he still had not knocked anything over approximately 45 mins and \$35 later.

Alyssa decides to give it a try herself, and realizes that the center of the cans is a single position in space. If Alyssa knows her own throwing height, and the distance that the cans are stacked behind the throwing line, what else would she need to know to calculate the vectors involved with a straight-line path for the ball to take? How would she calculate them?

## Vector Direction

Recall that the equation for a vector is given by

$$\ \vec{p}=\left\langle P_{x}, P_{y}, P_{z}\right\rangle$$

where Px, Py, and Pz are the x, y, and z coordinates of the vector obtained by projecting the vector onto the x, y, and z axes as shown below to the left.

The image above to the right, shows the angles between the position vector, $$\ \vec{P}$$, and the three axes: α is the angle between $$\ \vec{P}$$ and the x-axis, β is the angle between $$\ \vec{P}$$ and the y-axis, and γ is the angle between $$\ \vec{P}$$ and the z-axis.

The position vector, $$\ \vec{P}$$, and the unit vector, $$\ \hat{x}$$, define a plane shown in lavender below.

The direction angle, α, is the angle between $$\ \vec{P}$$ and $$\ \hat{x}$$ in the plane defined by the two vectors.

The other plane shown in the diagram is the X-Y plane, which was included in the diagram to help you visualize the orientation of the plane defined by the vectors.

In our discussion of the dot product, we saw that the dot product of two vectors can be given by $$\ \vec{A} \times \vec{B}=|\vec{A}||\vec{B}| \cos \theta$$

Therefore, we can calculate the angle between $$\ \vec{P}$$ and the unit vector $$\ \hat{x}$$.

$$\ \alpha=\cos ^{-1} \frac{\vec{P} \times \hat{x}}{|\vec{P}|}$$

Similarly, the direction angles β and γ can be calculated using the equations

$$\ \beta=\cos ^{-1} \frac{\vec{P} \times \hat{y}}{|\vec{P}|} \text { and } \gamma=\cos ^{-1} \frac{\vec{P} \times \hat{z}}{|\vec{P}|}$$

In some applications, such as astronomy and applied optics, the direction cosines are used at least as frequently as the directional angles themselves.

$$\ \cos \alpha=\frac{\vec{P} \times \hat{x}}{|\vec{P}|}, \cos \beta \frac{\vec{P} \times \hat{y}}{|\vec{P}|}, \text { and } \cos \gamma=\frac{\vec{P} \times \hat{z}}{|\vec{P}|}$$

### Pythagorean Property of Direction Cosines

An interesting property of direction cosines can be seen if we write the equations for the direction cosines in terms of the components of the position vector, Px, Py, and Pz and using the definition of the vector magnitude $$\ |\vec{A}|=\sqrt{A_{x}^{2}+A_{y}^{2}+A_{z}^{2}}$$

For example,

$$\ \cos \alpha=\frac{P_{x}}{\sqrt{P_{x}^{2}+P_{y}^{2}+P_{z}^{2}}}$$

The other two directional cosines can be rewritten similarly:

$$\ \cos \beta=\frac{P_{y}}{\sqrt{P_{x}^{2}+P_{y}^{2}+P_{z}^{2}}} \text { and } \cos \gamma=\frac{P_{z}}{\sqrt{P_{x}^{2}+P_{y}^{2}+P_{z}^{2}}}$$

If we square both sides of all three equations and then sum them, we obtain

$$\ \cos ^{2} \alpha+\cos ^{2} \beta+\cos ^{2} \gamma=\frac{P_{x}^{2}}{P_{x}^{2}+P_{y}^{2}+P_{z}^{2}}+\frac{P_{y}^{2}}{P_{x}^{2}+P_{y}^{2}+P_{z}^{2}}+\frac{P_{z}^{2}}{P_{x}^{2}+P_{y}^{2}+P_{z}^{2}}$$

which simplifies to

$$\ \cos ^{2} \alpha+\cos ^{2} \beta+\cos ^{2} \gamma=\frac{P_{x}^{2}+P_{y}^{2}+P_{z}^{2}}{P_{x}^{2}+P_{y}^{2}+P_{z}^{2}}=1$$

This is an important result because the definition of the unit vector stated that $$\ |\hat{u}|=1$$ which also means that

$$\ u_{x}^{2}+u_{y}^{2}+u_{z}^{2}=\cos ^{2} a+\cos ^{2} \beta+\cos ^{2} \gamma$$

and that the components of the unit vectors correspond to the direction cosines.

## Examples

###### Example 1

Earlier, you were given a problem about Alyssa and the can knockdown game.

If Alyssa knows her own throwing height, and the distance that the cans are stacked behind the throwing line, (a) what else would she need to know to calculate the vectors involved with a straight-line path for the ball to take? (b) How would she calculate them?

Solution

1. Alyssa needs to know the height of the cans above the ground.
2. If Alyssa assumes that the center of the cans is directly in front of her, and treats her own hand as the origin, she can calculate the vector directions as above, using 0 for x, the difference between her throwing height and that of the cans as y, and the distance that the cans are stacked beyond the throwing line as z.
###### Example 2

Because airplanes move in three dimensions, air-craft ground crews can use direction cosines to identify their location at any moment. Rather than an arbitrary set of orthogonal x, y, and z axes, the position of an airplane is measured relative to the east, north, and zenith directions. (Zenith means top or upward.) At a particular moment, a small plane is 297 km east, 135 km north, and 7.5 km above its home airport. What are the directional cosines and directional angles for the position vector of the plane at that moment?

Solution

If we use the standard orientation of maps in the northern hemisphere, the x-direction corresponds to east, the y-direction to north, and the z-direction to the zenith. Therefore, the position vector of the plane can be written as $$\ \vec{P}=\langle 297,135,7.5\rangle \mathrm{km}$$.

The direction cosines associated with this vector are given by

$$\ \begin{array}{l} \cos \alpha=\frac{\vec{P} \times \hat{x}}{|\vec{P}|}=\frac{P_{x}}{\sqrt{P_{x}^{2}+P_{y}^{2}+P_{z}^{2}}} \\ \cos \alpha=\frac{P_{x}}{\sqrt{P_{x}^{2}+P_{y}^{2}+P_{z}^{2}}}=\frac{297}{\sqrt{297^{2}+135^{2}+7.5^{2}}}=0.582 \\ \cos \beta=\frac{\vec{P} \times \hat{y}}{|\vec{P}|}=\frac{P_{y}}{\sqrt{P_{x}^{2}+P_{y}^{2}+P_{z}^{2}}} \\ \cos \beta=\frac{P_{y}}{\sqrt{P_{x}^{2}+P_{y}^{2}+P_{z}^{2}}}=\frac{135}{\sqrt{297^{2}+135^{2}+7.5^{2}}}=0.811 \\ \cos \gamma=\frac{\vec{P} \times \hat{z}}{|\vec{P}|}=\frac{P_{z}}{\sqrt{P_{x}^{2}+P_{y}^{2}+P_{z}^{2}}} \\ \cos \gamma=\frac{P_{z}}{\sqrt{P_{x}^{2}+P_{y}^{2}+P_{z}^{2}}}=\frac{7500}{\sqrt{297^{2}+135^{2}+7.5^{2}}}=0.045 \end{array}$$

The associated direction angles are

$$\ \begin{array}{l} a=\cos ^{-1} 0.582=54.4^{\circ} \\ \beta=\cos ^{-1} 0.165=35.8^{\circ} \\ y=\cos ^{-1} 0.045=87.4^{\circ} \end{array}$$

###### Example 3

In an upcoming episode of a crime drama, a swarm of special-effect insects bothers one of the investigators after the discovery of a murder victim in a drainage ditch. The animator uses position vectors to track the positions of the virtual pests with respect to an origin at the investigator’s head. One such insect is located at a point 33 cm in front, 52 cm to the left, and 18 cm below the tip of the investigator’s nose. What are the directional cosines for this insect?

Solution

As we look at our investigator, the +x direction is to her left, the +y direction is upward from her nose, and the +z direction is in front of her. The position vector of the midge can be written as $$\ \vec{P}=\langle 33,52,-18\rangle \mathrm{cm}$$.

The direction cosines associated with this vector are given by

$$\ \begin{array}{l} \cos \alpha=\frac{\vec{P} \times \hat{x}}{|\vec{P}|}=\frac{P_{x}}{\sqrt{P_{x}^{2}+P_{y}^{2}+P_{z}^{2}}} \\ \cos \alpha=\frac{P_{x}}{\sqrt{P_{x}^{2}+P_{y}^{2}+P_{z}^{2}}}=\frac{33}{\sqrt{33^{2}+52^{2}+(-18)^{2}}}=0.514 \\ \cos \beta=\frac{\vec{P} \times \hat{y}}{|\vec{P}|}=\frac{P_{y}}{\sqrt{P_{x}^{2}+P_{y}^{2}+P_{z}^{2}}} \\ \cos \beta=\frac{P_{y}}{\sqrt{P_{x}^{2}+P_{y}^{2}+P_{z}^{2}}}=\frac{52}{\sqrt{33^{2}+52^{2}+(-18)^{2}}}=0.810 \\ \cos \gamma=\frac{\vec{P} \times \hat{z}}{|\vec{P}|}=\frac{P_{z}}{\sqrt{P_{x}^{2}+P_{y}^{2}+P_{z}^{2}}} \\ \cos \gamma=\frac{P_{z}}{\sqrt{P_{x}^{2}+P_{y}^{2}+P_{z}^{2}}}=\frac{-18}{\sqrt{33^{2}+52^{2}+(-18)^{2}}}=-0.281 \end{array}$$

###### Example 4

A local astronomer used direction cosines when programming the projector in a new planetarium dome. The projector itself sits at the center of the dome, 2.5 m above the floor. He wishes to project Mintaka, one of the stars in the belt of Orion, at a position 12 m south and 2.3 m east of the projector and 8.7 m above the floor. What is the equation of the directional unit vector that the astronomer must enter in to the projection computer?

Solution

We can use the same coordinate system that we used in example A above: $$\ \hat{x}=\text { east }$$, $$\ \hat{y}=\text { north }$$, and $$\ \hat{z}=\text { upward }$$. The projector itself is the origin. In such a coordinate system, the position vector for Mintaka becomes $$\ \vec{P}=\langle 2.3,-12,(8.7-2.5)\rangle=\langle 2.3,-12,6.2\rangle$$. Notice that we did not use Mintaka’s position above the floor as the z-coordinate. Rather, since the projector is 2.5 m above the floor, we needed to use the difference between the ceiling height and the projector height. Use the component form of the directional cosine equation to calculate the three components of the unit vector.

$$\ \begin{array}{l} \cos \alpha=\frac{P_{x}}{\sqrt{P_{x}^{2}+P_{y}^{2}+P_{z}^{2}}}=\frac{2.3}{\sqrt{2.3^{2}+(-12)^{2}+6.2^{2}}}=0.168 \\ \cos \beta=\frac{P_{x}}{\sqrt{P_{x}^{2}+P_{y}^{2}+P_{z}^{2}}}=\frac{-12}{\sqrt{2.3^{2}+(-12)^{2}+6.2^{2}}}=-0.876 \\ \cos \gamma=\frac{P_{x}}{\sqrt{P_{x}^{2}+P_{y}^{2}+P_{z}^{2}}}=\frac{6.2}{\sqrt{2.3^{2}+(-12)^{2}+6.2^{2}}}=0.453 \end{array}$$

Therefore, the position unit vector is given by $$\ \hat{u}=\langle 0.168,-0.876,0.453\rangle$$.

###### Example 5

Determine the components of the position vector $$\ \vec{P}=\langle 2.4,5.3,1.8\rangle$$ then determine the directional angles between this vector and the x-axis.

Solution

$$\ \begin{array}{l} \cos \alpha=\frac{\vec{P} \times \hat{x}}{|\vec{P}|}=\frac{P_{x}}{\sqrt{P_{x}^{2}+P_{y}^{2}+P_{z}^{2}}} \\ \cos \alpha=\frac{\vec{P} \times \hat{x}}{|\vec{P}|}=\frac{2.4}{\sqrt{(2.4)^{2}+(5.3)^{2}+(1.8)^{2}}}=\frac{2.4}{\sqrt{5.76+28.09+3.24}}=\frac{2.4}{\sqrt{37.09}}=0.394 \\ \alpha=\cos ^{-1} 0.394=66.8 \end{array}$$

###### Example 6

Determine the direction cosines for the vector $$\ \vec{N}=\langle 8,3,-5\rangle$$.

Solution

\ \begin{aligned} &\cos \alpha=\frac{\vec{N} \times \hat{x}}{|\vec{N}|}=\frac{N_{x}}{\sqrt{N_{x}^{2}+N_{y}^{2}+N_{z}^{2}}}\\ &\cos \alpha=\frac{\vec{N} \times \hat{x}}{|\vec{N}|}=\frac{N_{x}}{\sqrt{N_{x}^{2}+N_{y}^{2}+N_{z}^{2}}}=\frac{8}{\sqrt{(8)^{2}+(3)^{2}+(-5)^{2}}}=\frac{8}{\sqrt{64+9+25}}=0.7213\\ &\cos \beta=\frac{\vec{N} \times \hat{y}}{|\vec{N}|}=\frac{N_{y}}{\sqrt{N_{x}^{2}+N_{y}^{2}+N_{z}^{2}}}\\ &\cos \beta=\frac{\vec{N} \times \hat{y}}{|\vec{N}|}=\frac{N_{y}}{\sqrt{N_{x}^{2}+N_{y}^{2}+N_{z}^{2}}}=\frac{3}{\sqrt{(8)^{2}+(3)^{2}+(-5)^{2}}}=\frac{3}{\sqrt{64+9+25}}=0.3030\\ &\cos \gamma=\frac{\vec{N} \times \hat{z}}{|\vec{N}|}=\frac{N_{z}}{\sqrt{N_{x}^{2}+N_{y}^{2}+N_{z}^{2}}}\\ &\cos \gamma=\frac{\vec{N} \times \hat{z}}{|\vec{N}|}=\frac{N_{z}}{\sqrt{N_{x}^{2}+N_{y}^{2}+N_{z}^{2}}}=\frac{-5}{\sqrt{(8)^{2}+(3)^{2}+(-5)^{2}}}=\frac{-5}{\sqrt{64+9+25}}=-0.5051 \end{aligned}

###### Example 7

Determine the position vector for a small plane at the moment it is 2.5 km east, 8.8 km south, and 4.1 km above its home airport. Use a coordinate system where the x-direction corresponds to east, the y-direction to north, and the z-direction to the zenith. Then determine the directional cosines used by the air-traffic control personnel to identify the plane’s location.

Solution

In this coordinate system, with an origin at the home airport, the position vector is given by $$\ \vec{r}=\langle 2.5,-8.8,4.1\rangle$$ with units of kilometers.

$$\ \begin{array}{l} \cos \alpha=\frac{\vec{r} \times \hat{x}}{|\vec{r}|}=\frac{r_{x}}{\sqrt{r_{x}^{2}+r_{y}^{2}+r_{z}^{2}}} \\ \cos \alpha=\frac{\vec{r} \times \hat{x}}{|\vec{r}|}=\frac{r_{x}}{\sqrt{r_{x}^{2}+r_{y}^{2}+r_{z}^{2}}}=\frac{2.5}{\sqrt{(2.5)^{2}+(-8.8)^{2}+(4.1)^{2}}}=\frac{2.5}{\sqrt{100.5}}=0.249 \\ \cos \beta=\frac{\vec{r} \times \hat{y}}{|\vec{r}|}=\frac{r_{y}}{\sqrt{r_{x}^{2}+r_{y}^{2}+r_{z}^{2}}} \\ \cos \beta=\frac{\vec{r} \times \hat{y}}{|\vec{r}|}=\frac{r_{y}}{\sqrt{r_{x}^{2}+r_{y}^{2}+r_{z}^{2}}}=\frac{-8.8}{\sqrt{(2.5)^{2}+(-8.8)^{2}+(4.1)^{2}}}=\frac{-8.8}{\sqrt{100.5}}=-0.878 \\ \cos \gamma=\frac{\vec{r} \times \hat{z}}{|\vec{r}|}=\frac{r_z}{\sqrt{r_{x}^{2}+r_{y}^{2}+r_{z}^{2}}} \\ \cos \gamma=\frac{\vec{r} \times \hat{z}}{|\vec{r}|}=\frac{r_z}{\sqrt{r_{x}^{2}+r_{y}^{2}+r_{z}^{2}}}=\frac{4.1}{\sqrt{(2.5)^{2}+(-8.8)^{2}+(4.1)^{2}}}=\frac{4.1}{\sqrt{100.5}}=0.409 \end{array}$$

###### Example 8

Use the method of direction cosines to identify the unit vector having the same direction as the position vector $$\ \vec{R}=\langle 791,978,1310\rangle$$

Solution

The unit vector which has the same direction as this vector has the components $$\ \hat{u}=\langle\cos \alpha, \cos \beta, \cos \gamma\rangle$$ where

$$\ \begin{array}{l} \cos \alpha=\frac{\vec{R} \times \hat{x}}{|\vec{R}|}=\frac{R_{x}}{\sqrt{R_{x}^{2}+R_{y}^{2}+R_{z}^{2}}}, \cos \beta=\frac{\vec{R} \times \hat{y}}{|\vec{R}|}=\frac{R_{y}}{\sqrt{R_{x}^{2}+R_{y}^{2}+R_{z}^{2}}}, \text { and } \\ \cos \gamma=\frac{\vec{R} \times \hat{z}}{|\vec{R}|}=\frac{R_{z}}{\sqrt{R_{x}^{2}+R_{y}^{2}+R_{z}^{2}}} \end{array}$$

Once we find the three direction cosines, we have the components of the unit vector,

$$\ \begin{array}{l} \cos \alpha=\frac{\vec{R} \times \hat{x}}{|\vec{R}|}=\frac{791}{\sqrt{791^{2}+978^{2}+1310^{2}}}=\frac{791}{\sqrt{329826}}=\frac{791}{1816.11}=0.436 \\ \cos \beta=\frac{\vec{R} \times \hat{y}}{|\vec{R}|}=\frac{978}{\sqrt{791^{2}+978^{2}+1310^{2}}}=\frac{978}{\sqrt{3298265}}=\frac{978}{1816.11}=0.539 \\ \cos \gamma=\frac{\vec{R} \times \hat{z}}{|\vec{R}|}=\frac{1310}{\sqrt{791^{2}+978^{2}+1310^{2}}}=\frac{1310}{\sqrt{3298265}}=\frac{1310}{1816.11}=0.721 \\ \hat{u}=\langle\cos \alpha, \cos \beta, \cos \gamma\rangle=\langle 0.436,0.539,0.721\rangle \end{array}$$

###### Example 9

Determine the direction angles between the vector $$\ \vec{p}=\langle 25,8,15\rangle$$ and the coordinate axes.

Solution

$$\ \begin{array}{l} \cos \alpha=\frac{\vec{P} \times \hat{x}}{|\vec{P}|}=\frac{P_{x}}{\sqrt{P_{x}^{2}+P_{y}^{2}+P_{z}^{2}}} \\ \cos \alpha=\frac{\vec{P} \times \hat{x}}{|\vec{P}|}=\frac{25}{\sqrt{(25)^{2}+(8)^{2}+(15)^{2}}}=\frac{25}{\sqrt{914}}=\frac{25}{30.23}=0.827 \\ \alpha=\cos ^{-1} 0.827=34.2^{\circ} \\ \cos \beta=\frac{\vec{P} \times \hat{y}}{|\vec{P}|}=\frac{P_{y}}{\sqrt{P_{x}^{2}+P_{y}^{2}+P_{z}^{2}}} \\ \cos \beta=\frac{\vec{P} \times \hat{y}}{|\vec{P}|}=\frac{8}{\sqrt{(25)^{2}+(8)^{2}+(15)^{2}}}=\frac{8}{\sqrt{914}}=\frac{8}{30.23}=0.265 \\ \beta=\cos ^{-1} 0.265=75.7^{\circ} \\ \cos \gamma=\frac{\vec{P} \times \hat{z}}{|\vec{P}|}=\frac{P_{z}}{\sqrt{P_{x}^{2}+P_{y}^{2}+P_{z}^{2}}} \\ \cos \gamma=\frac{\vec{P} \times \hat{z}}{|\vec{P}|}=\frac{15}{\sqrt{(25)^{2}+(8)^{2}+(15)^{2}}}=\frac{15}{\sqrt{914}}=\frac{15}{30.23}=0.496 \\ \gamma=\cos ^{-1} 0.496=60.25^{\circ} \end{array}$$

## Review

What is the vector direction in degrees of the following two dimensional vectors, assuming the positive x-axis is 0o?

1. What is the direction of $$\ \langle-4,8\rangle$$
2. What is the direction of $$\ \langle-9,20\rangle$$
3. What is the direction of $$\ \langle 9,20\rangle$$
4. What is the direction of $$\ \langle 2,18\rangle$$
5. What is the direction of $$\ \langle 7,5\rangle$$
6. What is the direction of $$\ \langle 9,16\rangle$$

Identify the direction cosines associated with the given vector.

1. $$\ \vec{P}=\langle 42,6,9.5\rangle$$ a) cos α = b) cos β = c) cos γ =
2. $$\ \vec{P}=\langle 50,70,40.25\rangle$$ a) cos α = b) cos β = c) cos γ =
3. $$\ \vec{P}=\langle 75,30,102\rangle$$ a) cos α = b) cos β = c) cos γ =
4. $$\ \vec{P}=\langle 145,130,25.75\rangle$$ a) cos α = b) cos β = c) cos γ =
5. $$\ \vec{P}=\langle 220,300,175\rangle$$ a) cos α = b) cos β = c) cos γ =

Determine the direction angles between the given vector and the coordinate axes.

1. $$\ \vec{P}=\langle 13,30,17\rangle$$
2. $$\ \vec{P}=\langle 5,3,12\rangle$$
3. $$\ \vec{P}=\langle 75,130,45\rangle$$
4. $$\ \vec{P}=\langle 90,30,60\rangle$$
5. $$\ \vec{P}=\langle 7,18,4\rangle$$

Solve the word problems as specified.

1. Determine the position vector for a kite at the moment it is 3.5 m east, 10.8 m south, and 30 m above the child flying it. Use a coordinate system where the x-direction corresponds to east, the y-direction to north, and the z-direction to the zenith. Then determine the directional cosines to identify the kites location.
2. Determine the position vector for a cat stuck in a tree at the moment it is 7 ft. east, 12.3 ft south, and 25 ft. above the base of the tree. Use a coordinate system where the x-direction corresponds to east, the y-direction to north, and the z-direction to the zenith. Then determine the directional cosines to identify the cats location.

## Vocabulary

Term Definition
angle cosines Angle notation or angle cosines describe a vector as the result of individual magnitudes and directions as measured from the axes, starting at the origin.
angle notation Angle notation or angle cosines describe a vector as the result of individual magnitudes and directions as measured from the axes, starting at the origin.
Component notation Component notation is used to describe vectors algebraically in terms of their x, y and, if relevant, z components.
direction angles Direction angles (also known as direction cosines) describe a vector as the result of individual magnitudes and directions as measured from the axes, starting at the origin.
direction cosines Direction cosines (also known as direction angles) describe a vector as the result of individual magnitudes and directions as measured from the axes, starting at the origin.
dot product The dot product is also known as inner product or scalar product. The two forms of the dot product are $$\ \vec{a} \cdot \vec{b}=\|\vec{a}\|\|\vec{b}\| \cos \theta \text { and } \vec{a} \cdot \vec{b}=x_{a} x_{b}+y_{a} y_{b}$$.
position vector A position vector describes the straight-line travel between a starting point (usually the origin) and the location of a second point on a coordinate plane.
unit vector A unit vector is a vector with a magnitude of one.

5.3.2: Vector Direction is shared under a CK-12 license and was authored, remixed, and/or curated by CK-12 Foundation via source content that was edited to conform to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.