What is the formula of angle between?

The calculator below calculates the angle between 2D and 3D vectors. Simply enter the components of each vector in the form

What is the formula of angle between?

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

What is the formula of angle between?
and
What is the formula of angle between?
.

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

What is the formula of angle between?
and
What is the formula of angle between?
is found using
What is the formula of angle between?
.

For vectors and , the dot product

What is the formula of angle between?
.

Therefore

What is the formula of angle between?

What is the formula of angle between?

What is the formula of angle between?

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:

What is the formula of angle between?
.

The magnitude of the vector is hence

What is the formula of angle between?
.

This becomes

What is the formula of angle between?
which is
What is the formula of angle between?
.

The magnitude of the first vector, a is

What is the formula of angle between?
.

We divide the dot product previously calculated by this magnitude.

We get

What is the formula of angle between?

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

The magnitude of the second vector, b is found with

What is the formula of angle between?
.

For the vector , the magnitude is

What is the formula of angle between?
.

This becomes

What is the formula of angle between?
which is
What is the formula of angle between?
.

We divide the previous result by this magnitude to get

What is the formula of angle between?

Step 4. Take the inverse cosine of this result

The formula to find the angle between two vectors is

What is the formula of angle between?
.

This can be rearranged for

What is the formula of angle between?
by taking the inverse of cosine on both sides of the equation.

The angle between two vectors is

What is the formula of angle between?
.

As previously calculated:

What is the formula of angle between?

What is the formula of angle between?

What is the formula of angle between?

Using a calculator we enter,

What is the formula of angle between?
.

This gives us the angle between the two vectors as

What is the formula of angle between?
.

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

What is the formula of angle between?
.

What is the formula of angle between?

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

What is the formula of angle between?
.

What is the formula of angle between?

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

Find the angle between the vectors

What is the formula of angle between?
and
What is the formula of angle between?
.

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

The dot product is found using

What is the formula of angle between?
, which for our vectors becomes
What is the formula of angle between?
and so
What is the formula of angle between?
.

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

For these vectors,

What is the formula of angle between?
and so
What is the formula of angle between?
.
What is the formula of angle between?
and so
What is the formula of angle between?
.

The formula can now be used.

What is the formula of angle between?
and this can be evaluated directly on the calculator to give
What is the formula of angle between?
.

What is the formula of angle between?

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

What is the formula of angle between?
and
What is the formula of angle between?
.

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

For the vector , ax =2, ay = -1 and az = 3.

For the vector , 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,

What is the formula of angle between?
.

For our vectors, this becomes

What is the formula of angle between?
.

This becomes

What is the formula of angle between?
which simplifies to
What is the formula of angle between?
.

What is the formula of angle between?

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,

What is the formula of angle between?
.

For the vector ,

What is the formula of angle between?
. This simplifies to
What is the formula of angle between?
.

For the vector ,

What is the formula of angle between?
. This simplifies to
What is the formula of angle between?
.

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

We get

What is the formula of angle between?
.

Step 4. Use the inverse of cosine on this result

The formula for the angle between two vectors is . 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.

We previously calculated , and .

Therefore

What is the formula of angle between?
.

This can be evaluated on the calculator to give the angle between the two vectors as

What is the formula of angle between?
.

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 .

If

What is the formula of angle between?
, then this formula becomes
What is the formula of angle between?
.

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

What is the formula of angle between?
.

Solving this for the angle we use the inverse cosine of zero,

What is the formula of angle between?
.

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

What is the formula of angle between?

For example, show that

What is the formula of angle between?
and
What is the formula of angle between?
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.

What is the formula of angle between?

The dot product is found using .

In the vectors and , ax = 3, ay = 4, bx = -8 and by = 6.

Therefore the dot product becomes

What is the formula of angle between?
.

Evaluating this we get

What is the formula of angle between?
and so, .

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