How to Find the Angle Between Two Vectors

How to Find the Angle Between Two Vectors: Video Lesson

Angle Between Two Vectors Calculator

The calculator below calculates the angle between 2D and 3D vectors. Simply enter the components of each vector in the form the 3 by 1 column matrix x y z

How to Find the Angle Between Two Vectors

To find the angle between two vectors:

  1. Find the dot product of the two vectors.
  2. Divide this by the magnitude of the first vector.
  3. Divide this by the magnitude of the second vector.
  4. Take the inverse cosine of this value to obtain the angle.

For example, find the angle between the 2 by 1 column matrix 3 negative 2 and the 2 by 1 column matrix 1 7.

Step 1. Find the dot product of the two vectors

To find the dot product of two vectors, multiply the corresponding components together and add them up.

The dot product of two 2D vectors the 2 by 1 column matrix Row 1: a. sub x Row 2: a. sub y andthe 2 by 1 column matrix Row 1: b sub x Row 2: b sub y is found using a. times b equals a. sub x b sub x plus a. sub y b sub y.

For vectors the 2 by 1 column matrix 3 negative 2 and the 2 by 1 column matrix 1 7, the dot product a. times b equals open paren 3 times 1 close paren plus open paren negative 2 times 7 close paren.

Therefore a. times b equals 3 minus 14

a. times b equals negative 11

how to find the angle between two vectors example

Step 2. Divide this by the magnitude of the first vector

To calculate the magnitude of a vector, use Pythagoras’ Theorem with the 𝑥 and y components of the vector.

The magnitude of any vector is found as follows: the absolute value of a. equals the square root of a. sub x squared plus a. sub y squared.

The magnitude of the vector the 2 by 1 column matrix 3 negative 2 is hence the absolute value of a. equals the square root of 3 squared plus open paren negative 2 close paren squared.

This becomes the absolute value of a. equals the square root of 9 plus 4 which is the absolute value of a. equals the square root of 13.

The magnitude of the first vector, a is the square root of 13.

We divide the dot product previously calculated by this magnitude.

We get the fraction with numerator negative 11 and denominator the square root of 13

Step 3. Divide this by the magnitude of the second vector

The magnitude of the second vector, b is found with the absolute value of b equals the square root of b sub x raised to the 2 power plus b sub y raised to the 2 power.

For the vector the 2 by 1 column matrix 1 7, the magnitude is the absolute value of b equals the square root of 1 squared plus 7 squared.

This becomes the absolute value of b equals the square root of 1 plus 49 which is the absolute value of b equals the square root of 50.

We divide the previous result by this magnitude to get negative 11 over the square root of 13 the square root of 50

Step 4. Take the inverse cosine of this result

The formula to find the angle between two vectors is cosine theta equals the fraction with numerator a. times b and denominator the absolute value of a. times the absolute value of b.

This can be rearranged for theta by taking the inverse of cosine on both sides of the equation.

The angle between two vectors is theta equals the inverse cosine of open paren the fraction with numerator a. times b and denominator the absolute value of a. times the absolute value of b close paren.

As previously calculated:

a. times b equals negative 11

the absolute value of a. equals the square root of 13

the absolute value of b equals the square root of 50

Using a calculator we enter, theta equals the inverse cosine of open paren negative 11 over the square root of 13 the square root of 50 close paren.

This gives us the angle between the two vectors as theta equals 116 degrees.

Angle Between Two Vectors Formula

The formula for the angle between two vectors, a and b is θ=cos-1( a•b/|a||b|). Where vector a is (ax ay) and vector b is (bx by), the dot product a•b=ax bx+ ay by. The magnitude of the vector |a|=√(ax2+ay2) and the magnitude of the vector |b|=√(bx2+by2).

The most common display of the formula for the angle between two vectors is shown below as cosine theta equals open paren the fraction with numerator a. times b and denominator the absolute value of a. times the absolute value of b close paren.

formula for the angle between two vectors

This formula can be rearranged into a more practical formula by taking the inverse cosine of both sides of the equation.

This gives us a direct formula for the angle between two vectors.

The angle between two vectors is theta equals the inverse cosine of open paren the fraction with numerator a. times b and denominator the absolute value of a. times the absolute value of b close paren.

formula for finding the angle between two vectors

We can use this formula to find the angle between the two vectors in 2D.

Find the angle between the vectors the 2 by 1 column matrix 2 5 and the 2 by 1 column matrix negative 4 negative 1.

In these two vectors, ax = 2, ay = 5, bx = -4 and by = -1.

The dot product is found using a. times b equals a. sub x b sub x plus a. sub y b sub y, which for our vectors becomes a. times b equals 2 times negative 4 plus 5 times negative 1 and so a. times b equals negative 13.

The magnitude of each vector is found using Pythagoras’ theorem with the 𝑥 and y components.

For these vectors, the absolute value of a. equals the square root of 2 squared plus 5 squared and so the absolute value of a. equals the square root of 29. the absolute value of b equals the square root of open paren negative 4 close paren squared plus open paren negative 1 close paren squared and so the absolute value of b equals the square root of 17.

The formula theta equals the inverse cosine of open paren the fraction with numerator a. times b and denominator the absolute value of a. times the absolute value of b close paren can now be used.

theta equals the inverse cosine of open paren 13 over the square root of 29 the square root of 17 close paren and this can be evaluated directly on the calculator to give theta equals 126 degrees.

example of finding the angle between two vectors in 2D

How to Find the Angle Between Two Vectors in 3D

To find the angle between two vectors in 3D:

  1. Find the dot product of the vectors.
  2. Divide the dot product by the magnitude of each vector.
  3. Use the inverse of cosine on this result.

For example, find the angle between the 3 by 1 column matrix 2 negative 1 3 and the 3 by 1 column matrix 2 0 1.

These vectors contain components in 3 dimensions, 𝑥, y and z.

For the vector the 3 by 1 column matrix 2 negative 1 3, ax =2, ay = -1 and az = 3.

For the vector the 3 by 1 column matrix 2 0 1, bx =2, by = 0 and bz = 1.

Step 1. Find the dot product of the vectors

To find the dot product of two vectors, multiply the corresponding components of each vector and add the results.

For a vector in 3D, a. times b equals a. sub x b sub x plus a. sub y b sub y plus a. sub z b sub z.

For our vectors, this becomes a. times b equals 2 times 2 plus negative 1 times 0 plus 3 times 1.

This becomes a. times b equals 4 plus 0 plus 3 which simplifies to a. times b equals 7.

how to find the angle between two vectors in 3d

Step 2. Divide this dot product by the magnitude of the two vectors

To find the magnitude of a vector in 3D, use Pythagoras’ theorem. For example, the absolute value of a. equals the square root of a. sub x raised to the 2 power plus a. sub y raised to the 2 power plus a. sub z raised to the 2 power.

For the vector the 3 by 1 column matrix 2 negative 1 3, the absolute value of a. equals the square root of 2 squared plus open paren negative 1 close paren squared plus 3 squared. This simplifies to the absolute value of a. equals the square root of 14.

For the vector the 3 by 1 column matrix 2 0 1, the absolute value of b equals the square root of 2 squared plus 0 squared plus 1 squared. This simplifies to the absolute value of b equals the square root of 5.

We divide the dot product found in step 1 by both of these magnitudes.

We get 7 over the square root of 14 the square root of 5.

Step 4. Use the inverse of cosine on this result

The formula for the angle between two vectors is cosine theta equals the fraction with numerator a. times b and denominator the absolute value of a. times the absolute value of b. This formula can be used for vectors in 2D or 3D.

To rearrange this formula for the angle, we take the inverse cosine of both sides.

theta equals the inverse cosine of open paren the fraction with numerator a. times b and denominator the absolute value of a. times the absolute value of b close paren

We previously calculated a. times b equals 7, the absolute value of a. equals the square root of 14 and the absolute value of b equals the square root of 5.

Therefore theta equals the inverse cosine of open paren 7 over the square root of 14 the square root of 5 close paren.

This can be evaluated on the calculator to give the angle between the two vectors as theta equals 33.2 degrees.

What does the sign of cosθ tell us about the vectors?

If the value of cosθ is positive, the angle between the vectors is acute. If the value of cosθ is negative, the angle between the vectors is obtuse.

How to Decide if Two Vectors are Perpendicular

Two vectors are perpendicular if their dot product is equal to zero. For two vectors (ax ay) and (bx by), the dot product is given by a•b = ax bx + ay by. If ax bx+ ay by = 0, the two vectors are perpendicular. This means that they meet at right angles.

The formula for the angle between two vectors is given by cosine theta equals open paren the fraction with numerator a. times b and denominator the absolute value of a. times the absolute value of b close paren.

If a. times b equals 0, then this formula becomes cosine theta equals open paren 0 over the absolute value of a. times the absolute value of b close paren.

If the numerator of a fraction is zero, then the whole fraction is worth zero. Therefore the formula becomes cosine theta equals 0.

Solving this for the angle we use the inverse cosine of zero, theta equals the inverse cosine of 0.

The inverse cosine of zero is 90°.

Therefore if the dot product of two vectors is zero, the angle between the two vectors will always result in 90°.

two vectors are perpendicular if their dot product is equal to zero

For example, show that the 2 by 1 column matrix 3 4 and the 2 by 1 column matrix negative 8 6 are perpendicular.

If two vectors are perpendicular, this means that they meet at right angles.

To show that two vectors are perpendicular, calculate the dot product. If the dot product of the two vectors is zero, the vectors are perpendicular.

If the dot product is any other number other than zero, the vectors are not perpendicular.

example of how to show that two vectors are perpendicular

The dot product is found using a. times b equals a. sub x b sub x plus a. sub y b sub y.

In the vectors the 2 by 1 column matrix 3 4 and the 2 by 1 column matrix negative 8 6, ax = 3, ay = 4, bx = -8 and by = 6.

Therefore the dot product becomes a. times b equals 3 times negative 8 plus 4 times 6 .

Evaluating this we get a. times b equals negative 24 plus 24 and so, a. times b equals 0.

The dot product is zero and so, the vectors are perpendicular.