# Angle between Two Vectors Formula

If the two vectors are assumed as $\vec{a}$ and $\vec{b}$ then the dot created is articulated as $\vec{a}. \vec{b}$. Let’s suppose these two vectors are separated by angle θ. To know what’s the angle measurement we solve with the below formula

we know that the dot product of two product is given as

$\vec{a}.\vec{b} =|\vec{a}||\vec{b}|cos\theta$

Thus, the angle between two vectors formula is given by

$\theta = cos^{-1}\frac{\vec{a}.\vec{b}}{|\vec{a}||\vec{b}|}$

where θ is the angle between $\vec{a}$ and $\vec{b}$

## Angle Between Two Vectors Examples

Let’s see some samples on the angle between two vectors:

Example 1:

Compute the angle between two vectors 3i + 4j – k and 2i – j + k.

solution:

Let

$\vec{a}$ = 3i + 4j – k and

$\vec{b}$ = 2i – j + k

The dot product is defined as

$\vec{a}. \vec{b}$ = (3i + 4j – k).(2i – j + k)

= (3)(2) + (4)(-1) + (-1)(1)

= 6-4-1

= 1

Thus, $\vec{a}. \vec{b}$  = 1

The Magnitude of vectors is given by

$|\vec{a}| =\sqrt{(3^{2}+4^{2}+(-1)^{2})} =\sqrt{26}= 5.09$

$|\vec{b}| =\sqrt{(2^{2}+(-1)^{2}+1^{2})} =\sqrt{6}= 2.45$

The angle between the two vectors is

$\theta = cos^{-1}\frac{\vec{a}.\vec{b}}{|\vec{a}||\vec{b}|}$

$\theta = cos^{-1}\frac{1}{(5.09)(2.45)}$

$\theta = cos^{-1}\frac{1}{12.47}$

$\theta = cos^{-1}(0.0802)$

$\theta = 85.39^{\circ}$

Example 2:

Find the angle between two vectors 5i – j + k and i + j – k.

Solution:

Let

$\vec{a}$ = 5i – j + k and

$\vec{b}$ = i + j – k

The dot product is defined as
$\vec{a}. \vec{b}$= (5i – j + k)(i + j – k)

$\vec{a}. \vec{b}$= (5)(1) + (-1)(1) + (1)(-1)

$\vec{a}. \vec{b}$= 5-1-1

$\vec{a}. \vec{b}$= 3

The Magnitude of vectors is given by

$|\vec{a}| =\sqrt{(5^{2}+(-1)^{2}+1^{2})} =\sqrt{27}= 5.19$

$|\vec{b}| =\sqrt{(1^{2}+1^{2}+(-1)^{2})} =\sqrt{3}= 1.73$

The angle between the two vectors is

$\theta = cos^{-1}\frac{\vec{a}.\vec{b}}{|\vec{a}||\vec{b}|}$

$\theta = cos^{-1}\frac{3}{(5.19)(1.73)}$

$\theta = cos^{-1}\frac{3}{8.97}$

$\theta = cos^{-1}(0.334)$

$\theta =70.48^{\circ}$