Angle between two vectors

 
 
Angle between two vectors blog post.jpeg
 
 
 

Formula for the angle between vectors

To find the angle between two vectors, we’ll use the formula

???\cos{\theta}=\frac{a\cdot b}{|a||b|}???

where ???a??? and ???b??? are the given vectors, ???a\cdot{b}??? is the dot product of the vectors, ???|a|??? is the length of ???a???, and ???|b|??? is the length of ???b???. To find the length of the vectors, we’ll use the distance formula

???D=\sqrt{\left(x_2-x_1\right)^2+\left(y_2-y_1\right)^2+\left(z_2-z_1\right)^2}???

Krista King Math.jpg

Hi! I'm krista.

I create online courses to help you rock your math class. Read more.

 
 
 

How to calculate the angle between two vectors


 
Krista King Math Signup.png
 
Calculus 3 course.png

Take the course

Want to learn more about Calculus 3? I have a step-by-step course for that. :)

 
 

 
 

Finding the angle between two vectors in three dimensions

Example

Find the angle between the vectors.

???a=\langle4,-2,3\rangle???

???b=\langle1,3,-1\rangle???

We’ll start by finding the dot product of ???a??? and ???b???, ???a\cdot b???.

???a\cdot{b}=(4)(1)+(-2)(3)+(3)(-1)???

???a\cdot{b}=4-6-3???

???a\cdot{b}=-5???

Angle between two vectors for Calculus 3.jpg

The formula for the angle between vectors also requires the formula for the distance between two points

Now we’ll use the distance formula to find the length of each vector, remembering that the initial point of both vectors is the origin, and the terminal points are given by ???(4,-2,3)??? and ???(1,3,-1)???.

???D=\sqrt{\left(x_2-x_1\right)^2+\left(y_2-y_1\right)^2+\left(z_2-z_1\right)^2}???

???|a|=D_a=\sqrt{(4-0)^2+(-2-0)^2+(3-0)^2}???

???|a|=D_a=\sqrt{16+4+9}???

???|a|=D_a=\sqrt{29}???

and

???|b|=D_b=\sqrt{(1-0)^2+(3-0)^2+(-1-0)^2}???

???|b|=D_b=\sqrt{1+9+1}???

???|b|=D_b=\sqrt{11}???

Plugging everything we’ve calculated into our formula for the angle between two vectors, we get

???\cos{\theta}=\frac{a\cdot{b}}{|a||b|}???

???\cos{\theta}=\frac{-5}{\left|\sqrt{29}\right|\left|\sqrt{11}\right|}???

???\cos{\theta}=\frac{-5}{\left|\sqrt{319}\right|}???

???\theta=106.3^\circ???

 
Krista King.png
 

Get access to the complete Calculus 3 course