# Angle between Vectors

## Key Questions

• When we are to consider the angle between any two vectors, it should be noted that the angle which is less than $\pi$ is to be taken.

• You can use the dot product to solve this problem. See http://en.wikipedia.org/wiki/Dot_product

The dot product is an operation on two vectors. There are two different definitions of dot product. Let $\setminus \vec{A} = \left[{A}_{1} , {A}_{2} , \ldots , {A}_{n}\right]$ be a vector and $\setminus \vec{B} = \left[{B}_{1} , {B}_{2} , \ldots , {B}_{n}\right]$ be another vector, then we have 2 formulas for dot product:

1) Algebraic definition:

$\setminus \vec{A} \setminus \cdot \setminus \vec{B} = \setminus {\sum}_{1}^{n} {A}_{i} {B}_{i} = {A}_{1} {B}_{1} + {A}_{2} {B}_{2} + \ldots + {A}_{n} {B}_{n}$

2) Geometric definition:

$\setminus \vec{A} \setminus \cdot \setminus \vec{B} = | | \setminus \vec{A} | | \setminus | | \setminus \vec{B} | | \setminus \cos \left(\setminus \theta\right)$

where $\setminus \theta$ is the angle between $\setminus \vec{A}$ and $\setminus \vec{B}$, and $| | \setminus \vec{A} | |$ denotes the magnitude of $\setminus \vec{A}$ and has the formula:

$| | \setminus \vec{A} | | = \setminus \sqrt{{A}_{1}^{2} + {A}_{2}^{2} + \ldots + {A}_{n}^{2}}$

We can solve many questions (such as the angle between two vectors) by combining the two definitions:

$\setminus {\sum}_{1}^{n} {A}_{i} {B}_{i} = | | \setminus \vec{A} | | \setminus | | \setminus \vec{B} | | \setminus \cos \left(\setminus \theta\right)$

or

${A}_{1} {B}_{1} + {A}_{2} {B}_{2} + \ldots + {A}_{n} {B}_{n} = \left(\setminus \sqrt{{A}_{1}^{2} + {A}_{2}^{2} + \ldots + {A}_{n}^{2}}\right) \left(\setminus \sqrt{{B}_{1}^{2} + {B}_{2}^{2} + \ldots + {B}_{n}^{2}}\right) \setminus \cos \left(\setminus \theta\right)$

If we have two vectors, then the only unknown is $\setminus \theta$ in the above equation, and thus we can solve for $\setminus \theta$, which is the angle between the two vectors.

Example:

Q: Given $\setminus \vec{A} = \left[2 , 5 , 1\right]$, $\setminus \vec{B} = \left[9 , - 3 , 6\right]$, find the angle between them.

A:
From the question, we see that each vector has three dimensions. From above, our formula becomes:

${A}_{1} {B}_{1} + {A}_{2} {B}_{2} + {A}_{3} {B}_{3} = \left(\setminus \sqrt{{A}_{1}^{2} + {A}_{2}^{2} + {A}_{3}^{2}}\right) \left(\setminus \sqrt{{B}_{1}^{2} + {B}_{2}^{2} + {B}_{3}^{2}}\right) \setminus \cos \left(\setminus \theta\right)$

Left side:

${A}_{1} {B}_{1} + {A}_{2} {B}_{2} + {A}_{3} {B}_{3} = \left(2\right) \left(9\right) + \left(5\right) \left(- 3\right) + \left(1\right) \left(6\right) = 9$

Right side:

$| | \setminus \vec{A} | | = \setminus \sqrt{{A}_{1}^{2} + {A}_{2}^{2} + {A}_{3}^{2}} = \setminus \sqrt{{2}^{2} + {5}^{2} + {1}^{2}} = \setminus \sqrt{30}$
$| | \setminus \vec{B} | | = \setminus \sqrt{{B}_{1}^{2} + {B}_{2}^{2} + {B}_{3}^{2}} = \setminus \sqrt{{9}^{2} + {\left(- 3\right)}^{2} + {6}^{2}} = \setminus \sqrt{126}$
$\setminus \theta$ is unknown

Plug everything into the formula, we get:

$9 = \left(\setminus \sqrt{30}\right) \left(\setminus \sqrt{126}\right) \setminus \cos \left(\setminus \theta\right)$

Solve for $\setminus \theta$:

\cos(\theta) = \frac(9)((\sqrt(30))(\sqrt(126))
$\setminus \theta = \setminus {\cos}^{-} 1 \left(\setminus \frac{9}{\left(\setminus \sqrt{30}\right) \left(\setminus \sqrt{126}\right)}\right)$

Using a calculator, we get:

$\setminus \theta = 81.58$ degrees

See the following video of ...

• It is simply the product of the modules of the two vectors (with positive or negative sign depending upon the relative orientation of the vectors).
A typical example of this situation is when you evaluate the WORK done by a force $\vec{F}$ during a displacement $\vec{s}$.
For example, if you have:

Work done by force $\vec{F}$:
$W = | \vec{F} | \cdot | \vec{s} | \cdot \cos \left(\theta\right)$
Where $\theta$ is the angle between force and displacement; the two vectors being parallel can give:

theta=0° and cos(theta)=cos(0°)=1 so:
$W = 5 \cdot 10 \cdot 1 = 50 J$

Or:

theta=180° and cos(theta)=cos(180°)=-1 so:
$W = 5 \cdot 10 \cdot - 1 = - 50 J$

• The dot of two vectors is given by the sum of its correspondent coordinates multiplied. In mathematical notation:
let $v = \left[{v}_{1} , {v}_{2} , \ldots , {v}_{n}\right]$ and $u = \left[{u}_{1} , {u}_{2} , \ldots , {u}_{n}\right]$,
Dot product:
$v \cdot u =$
$\sum {v}_{i} . {u}_{i} = \left({v}_{1} . {u}_{1}\right) + \left({v}_{2} . {u}_{2}\right) + \ldots + \left({v}_{n} . {u}_{n}\right)$

and angle between vectors:
$\cos \left(\theta\right) = \frac{v \cdot u}{| v | | u |}$

Since the angle between two perpendicular vectors is $\frac{\pi}{2}$, and it's cosine equals 0:
$\frac{v \cdot u}{| v | | u |} = 0 \therefore v \cdot u = 0$

Hope it helps.