0:00 / 0:00

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.


Another formula for the dot product involves θ\theta:
uv=uvcos(θ)\boxed{\quad \vec{u} \cdot \vec{v} = \lVert \vec{u} \rVert \lVert \vec{v} \rVert \cos(\theta) \quad}


PAGE BREAK

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.
uv=uvpositivecos(θ)\vec{u} \cdot \vec{v} = \underbrace{ \lVert \vec{u} \rVert \lVert \vec{v} \rVert }_{\text{positive}} \cos(\theta)


θuv0<θ<π2,acuteuv>0π2<θ<π,obtuseuv<0θ=π2,orthogonaluv=0θ=0,parallel (same direction)uv=uvθ=π,parallel (opposite direction)   uv=uv\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}



PAGE BREAK

Finding the Angle Between Vectors

Combining the two equations for uv\vec{u} \cdot \vec{v} gives us the following:
u1v1+u2v2++unvn=uvcos(θ)\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 uv = 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, cos1\cos^{-1}
0:00 / 0:00

Example: Angle Between Vectors

Find the angle between the vectors u=[21]\vec u = \begin{bmatrix} -2\\ 1\\ \end{bmatrix} and v=[31]\vec v = \begin{bmatrix} -3\\ -1\\ \end{bmatrix}.
The formula is uv=uvcos(θ)\vec{u} \cdot \vec{v} = \lVert \vec{u} \rVert \lVert \vec{v} \rVert \cos(\theta)
LHS: uv = [21][31] = (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=5v=(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:

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

0:00 / 0:00

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}.

uv = (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θ=1821290.7294θ=cos1(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 , uv=6\vec{u}\cdot\vec{v}=6, and cosθ=12\cos\theta=\frac{1}{2}, find v\lVert \vec v \rVert.

Practice: Types of Angles Between Vectors

Match the correct angle to each expression.
A.
θ=3π4\theta = \frac{3\pi}{4}
B.
θ=π6\theta = \frac{\pi}{6}
C.
θ=π\theta = \pi
D.
θ=0\theta = 0
E.
θ=π2\theta = \frac{\pi}{2}
uv=0\vec u \cdot \vec v = 0
uv=uv\vec u \cdot \vec v = \lVert \vec u \rVert \lVert \vec v \rVert
uv=uv\vec u \cdot \vec v = -\lVert \vec u \rVert \lVert \vec v \rVert
uv=7\vec u \cdot \vec v = 7
uv=12\vec u \cdot \vec v = -\frac{1}{2}

Practice: Angle Between Vectors

Suppose u, vRn\vec{u},\ \vec v \in \reals^n are non-zero vectors that are not parallel, and let w=vuuv\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}.
Extra Practice