Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Angle Between Vectors

The dot product can be used to measure the angle between vectors u⃗\vec{u} and v⃗\vec{v} in Rn\reals^n. We call this angle θ\theta.


Image illustrating Angle Between Vectors


Another formula for the dot product involves θ\theta:

u⃗⋅v⃗=∥u⃗∥∥v⃗∥cos⁡(θ)\boxed{\quad \vec{u} \cdot \vec{v} = \lVert \vec{u} \rVert \lVert \vec{v} \rVert \cos(\theta) \quad}




Notes

Since the norms of the vectors on the RHS are non-negative, the sign of cos⁡θ\cos\theta determines the sign of the dot product.

u⃗⋅v⃗=∥u⃗∥∥v⃗∥⏟positivecos⁡(θ)\vec{u} \cdot \vec{v} = \underbrace{ \lVert \vec{u} \rVert \lVert \vec{v} \rVert }_{\text{positive}} \cos(\theta)



θu⃗⋅v⃗0<θ<π2,acuteu⃗⋅v⃗>0π2<θ<π,obtuseu⃗⋅v⃗<0θ=π2,orthogonalu⃗⋅v⃗=0θ=0,parallel (same direction)u⃗⋅v⃗=∥u⃗∥∥v⃗∥θ=π,parallel (opposite direction)   u⃗⋅v⃗=−∥u⃗∥∥v⃗∥\begin{array}{r l | c} & \bm{\theta} & \bm{\vec u \cdot \vec v}\\ \hline\\ 0<\theta<\frac{\pi}{2},&\text{acute}&\quad \vec u \cdot \vec v>0\\[1.5em] \frac{\pi}{2}<\theta<\pi, &\text{obtuse}&\quad \vec u \cdot \vec v<0\\[1.5em] \theta=\frac{\pi}{2}, &\text{orthogonal}&\quad \vec u \cdot \vec v=0\\[1.5em] \theta=0, &\text{parallel (same direction)}&\quad \vec u \cdot \vec v=\lVert \vec u \rVert \lVert \vec v \rVert\\[1.5em] \theta=\pi, &\text{parallel (opposite direction)}&\quad\ \ \ \vec u \cdot \vec v=-\lVert \vec u \rVert \lVert \vec v \rVert\\ \end{array}



Image illustrating Angle Between Vectors


Finding the Angle Between Vectors

Combining the two equations for u⃗⋅v⃗\vec{u} \cdot \vec{v} gives us the following:

u1v1+u2v2+⋯+unvn=∥u⃗∥∥v⃗∥cos⁡(θ)\boxed{\quad u_1v_1+u_2v_2+\dots+u_nv_n=\|\vec{u}\|\|\vec{v}\|\cos(\theta) \quad}

Steps

  1. LHS: Calculate the dot product u⃗⋅v⃗ = u1v1 + u2v2 + … + unvn\vec{u} \cdot \vec{v}\ = \ u_1v_1\ +\ u_2v_2 \ +\ \dots \ +\ u_nv_n
  2. RHS: Calculate ∥u⃗∥\lVert \vec u \rVert and ∥v⃗∥\lVert \vec v \rVert
  3. Solve for cos⁡(θ)\cos (\theta)
  4. Solve for θ\theta using special triangles or the inverse cosine, cos⁡−1\cos^{-1}

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Example: Angle Between Vectors

Find the angle between the vectors u⃗=[−21]\vec u = \begin{bmatrix} -2\\ 1\\ \end{bmatrix} and v⃗=[−3−1]\vec v = \begin{bmatrix} -3\\ -1\\ \end{bmatrix}.

Image illustrating Example

The formula is u⃗⋅v⃗=∥u⃗∥∥v⃗∥cos⁡(θ)\vec{u} \cdot \vec{v} = \lVert \vec{u} \rVert \lVert \vec{v} \rVert \cos(\theta)

LHS: u⃗⋅v⃗ = [−21]⋅[−3−1] = (−2)(−3)+(1)(−1) = 5\vec u \cdot \vec v \ =\ \begin{bmatrix} -2\\ 1\\ \end{bmatrix} \cdot \begin{bmatrix} -3\\ -1\\ \end{bmatrix} \ =\ (-2)(-3) + (1)(-1) \ =\ 5

RHS:∥u⃗∥=(−2)2+12=5∥v⃗∥=(−3)2+(−1)2=10\begin{aligned} &\lVert \vec u \rVert = \sqrt{(-2)^2+1^2} = \sqrt{5}\\ &\lVert \vec v \rVert = \sqrt{(-3)^2+(-1)^2} = \sqrt{10}\\ \end{aligned}

Subsititute these values into the formula, then solve for cos⁡θ\cos \theta and simplify:

5 = 510cos⁡θ5510 = cos⁡θ550 = cos⁡θ5252 = cos⁡θ552 = cos⁡θ12 = cos⁡θ\begin{aligned} 5 \ =\ \sqrt{5} \sqrt{10} &\cos \theta\\ \dfrac{5}{\sqrt{5}\sqrt{10}} \ =\ &\cos\theta\\ \dfrac{5}{\sqrt{50}} \ =\ &\cos\theta\\ \dfrac{5}{\sqrt{25}\sqrt2} \ =\ &\cos\theta\\ \dfrac{\cancel{5}}{\cancel{5}\sqrt2} \ =\ &\cos\theta\\ \dfrac{1}{\sqrt{2}} \ =\ &\cos\theta\\ \end{aligned}

Finally, we can recall a special triangle to find θ\theta:

Image illustrating Example


∴  θ=π4\therefore \ \ \boxed{\theta = \dfrac{\pi}{4}}


Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Example: Angle Between Vectors

Given u⃗=⟨1,4,−2⟩\vec{u} = \lang 1,4,-2\rang and v⃗=⟨0,−2,5⟩\vec{v}=\lang 0,-2,5\rang, find the angle between u⃗\vec{u} and v⃗\vec{v}.


u⃗⋅v⃗ = (1)(0)+(4)(−2)+(−2)(5) = −18\begin{aligned} \vec{u} \cdot \vec{v} \ =\ (1)(0) + (4)(-2) + (-2)(5) \ =\ -18 \end{aligned}

∥u⃗∥=(1)2+(4)2+(−2)2=21\lVert \vec u \rVert =\sqrt{\left(1\right)^2+\left(4\right)^2+\left(-2\right)^2}=\sqrt{21}

∥v⃗∥=(0)2+(−2)2+(5)2=29\lVert \vec v \rVert =\sqrt{\left(0\right)^2+\left(-2\right)^2+\left(5\right)^2}=\sqrt{29}


Substituting into the formula:

−18=2129cos⁡θ -18 = \sqrt{21}\sqrt{29}\cos\theta

So we can solve for cos⁡θ\cos\theta, then use the inverse cosine to find θ\theta:

cos⁡θ=−182129≈−0.7294θ=cos⁡−1(−18609)≈2.388 rad  (136.8°)\begin{aligned} &\cos\theta = \dfrac{-18}{\sqrt{21}\sqrt{29}} \approx -0.7294\\[1.5em] &\theta = \cos^{-1} \left( \dfrac{-18}{\sqrt{609}} \right) \approx \boxed{2.388 \text{ rad} \ \ (136.8\degree)}\\ \end{aligned}

Practice: Angle Between Vectors

Given u⃗=⟨1,7⟩\vec{u}=\lang1,7\rang , u⃗⋅v⃗=6\vec{u}\cdot\vec{v}=6, and cos⁡θ=12\cos\theta=\frac{1}{2}, find ∥v⃗∥\lVert \vec v \rVert.


Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Practice: Types of Angles Between Vectors

Match the correct angle to each expression.

Match each term
A.

θ=π\theta = \pi

B.

θ=π6\theta = \frac{\pi}{6}

C.

θ=π2\theta = \frac{\pi}{2}

D.

θ=3π4\theta = \frac{3\pi}{4}

E.

θ=0\theta = 0

u⃗⋅v⃗=∥u⃗∥∥v⃗∥\vec u \cdot \vec v = \lVert \vec u \rVert \lVert \vec v \rVert

u⃗⋅v⃗=−12\vec u \cdot \vec v = -\frac{1}{2}

u⃗⋅v⃗=−∥u⃗∥∥v⃗∥\vec u \cdot \vec v = -\lVert \vec u \rVert \lVert \vec v \rVert

u⃗⋅v⃗=7\vec u \cdot \vec v = 7

u⃗⋅v⃗=0\vec u \cdot \vec v = 0

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Practice: Angle Between Vectors

Suppose u⃗, v⃗∈Rn\vec{u},\ \vec v \in \reals^n are non-zero vectors that are not parallel, and let w⃗=∥v⃗∥u⃗−∥u⃗∥v⃗\vec{w}=\lVert\vec{v}\rVert\vec{u} -\lVert\vec{u}\rVert\vec{v}.


Find a simplified expression for the cosine of the angle between v⃗\vec{v} and w⃗\vec{w}.

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors