Angle Between Vectors Notes

Published on: September 29, 2026

These Angle Between Vectors Notes explain how to find the angle separating two vectors in three dimensions, with the working shown line by line. The dot product divided by the two lengths gives the cosine of that angle, because the dot product already measures how much the vectors agree. Taking the inverse cosine turns that ratio back into an angle. Following the same pattern every time keeps the lengths and the dot product in their right places.

x y z θ A ⟨a₁, a₂, a₃⟩ B ⟨b₁, b₂, b₃⟩

Enter the components of \(\vec{A}\) and \(\vec{B}\).

Step-by-step method

  1. Set up the problem.
  2. Write the formula.
  3. Substitute the vectors into the formula.
  4. Work out the dot product and the two magnitudes.
  5. Work out the angle.

Formula: Angle Between Vectors Formula

This formula gives the angle between two vectors. Divide the dot product by both magnitudes, then take the inverse cosine.

\(\theta = \cos^{-1}\left(\frac{\vec{A} \cdot \vec{B}}{|\vec{A}|\,|\vec{B}|}\right)\)

Useful Tips to Remember

The angle between two vectors is always between \(0^{\circ}\) and \(180^{\circ}\). A dot product of 0 means the angle is exactly \(90^{\circ}\). Work out the dot product and both magnitudes separately before dividing, and keep them exact until the last step. Make sure your calculator is in degree mode when taking the inverse cosine.

Required knowledge

Where Is the Angle Between Vectors Used?

The angle between two vectors tells you how far apart two directions are, which matters in physics, engineering and computing. Engineers use it to find the angle between forces or between members of a frame. In robotics, it sets how far a joint must turn to point an arm in a new direction. Graphics software uses it for viewing angles and reflections, and in text search the cosine of this angle is the standard way to measure how similar two documents are.

  • Angles between forces and structural members
  • Turning angles for robot joints
  • Viewing and reflection angles in graphics
  • Cosine similarity in text search
  • Checking whether two directions are perpendicular

Angle Between Vectors Practice Problems

Example 1 finds the angle between \(\langle 1, 0, 0 \rangle\) and \(\langle 0, 1, 0 \rangle\), which is a right angle, and Example 2 uses \(\langle 1, 2, 3 \rangle\) and \(\langle 4, 5, 6 \rangle\), which gives a rounded answer. Examples 3 and 4 give you two more problems of the same kind to try. Work through the dot product and magnitudes yourself, then compare.

The worked examples below go through the same pattern from start to finish, so you can compare every step with your own working. Try each problem on paper first, then open the example and check your working one step at a time, so you can see exactly which step went wrong if your answer does not match. Use them to check your answers and to understand why each step works.

See Example 1 Hide Example 1

Problem

\(\vec{A} = \left\langle 1,\; 0,\; 0 \right\rangle,\; \vec{B} = \left\langle 0,\; 1,\; 0 \right\rangle\)

Approach

Step-by-step method

  1. Set up the problem.
  2. Write the formula.
  3. Substitute the vectors into the formula.
  4. Work out the dot product and the two magnitudes.
  5. Work out the angle.

Formula

Formula: Angle Between Vectors Formula

This formula gives the angle between two vectors. Divide the dot product by both magnitudes, then take the inverse cosine.

\(\theta = \cos^{-1}\left(\frac{\vec{A} \cdot \vec{B}}{|\vec{A}|\,|\vec{B}|}\right)\)

Step 1

Step 1 - Set up the problem.

In this problem: We are finding the angle between \(\vec{A} = \left\langle 1,\; 0,\; 0 \right\rangle\) and \(\vec{B} = \left\langle 0,\; 1,\; 0 \right\rangle\).

\(\vec{A} = \left\langle 1,\; 0,\; 0 \right\rangle,\; \vec{B} = \left\langle 0,\; 1,\; 0 \right\rangle\)
x y z θ A ⟨1, 0, 0⟩ B ⟨0, 1, 0⟩

Step 2

Step 2 - Write the formula.

In this problem: The cosine of the angle between two vectors is their dot product divided by the product of their magnitudes, so the inverse cosine of that fraction gives the angle.

\(\theta = \cos^{-1}\left(\frac{\vec{A} \cdot \vec{B}}{|\vec{A}|\,|\vec{B}|}\right)\)

Step 3

Step 3 - Substitute the vectors into the formula.

In this problem: Replacing \(\vec{A}\) and \(\vec{B}\) in \(\theta = \cos^{-1}\left(\frac{\vec{A} \cdot \vec{B}}{|\vec{A}|\,|\vec{B}|}\right)\) gives \(\theta = \cos^{-1}\left(\frac{\left\langle 1,\; 0,\; 0 \right\rangle \cdot \left\langle 0,\; 1,\; 0 \right\rangle}{|\left\langle 1,\; 0,\; 0 \right\rangle|\,|\left\langle 0,\; 1,\; 0 \right\rangle|}\right)\).

\(\theta = \cos^{-1}\left(\frac{\left\langle 1,\; 0,\; 0 \right\rangle \cdot \left\langle 0,\; 1,\; 0 \right\rangle}{|\left\langle 1,\; 0,\; 0 \right\rangle|\,|\left\langle 0,\; 1,\; 0 \right\rangle|}\right)\)

Step 4

Step 4 - Work out the dot product and the two magnitudes.

In this problem: The fraction needs the dot product and the magnitudes of both vectors, so each one is worked out in turn.

\(\vec{A} = \left\langle 1,\; 0,\; 0 \right\rangle,\; \vec{B} = \left\langle 0,\; 1,\; 0 \right\rangle\)

Step 4a

Step 4a - Work out the dot product.

In this problem: The dot product is worked out from the components, covered in the Dot Product Calculator. Multiplying the matching components gives \(1 \times 0 = 0\), \(0 \times 1 = 0\) and \(0 \times 0 = 0\). Adding the three products gives \(0 + 0 + 0 = 0\).

\(\vec{A} \cdot \vec{B} = 1 \times 0 + 0 \times 1 + 0 \times 0 = 0\)

Step 4b

Step 4b - Work out the magnitude of A.

In this problem: The magnitude of \(\vec{A}\) is worked out from its components, covered in the Magnitude of a Vector Calculator. Squaring the components gives \(1^{2} = 1\), \(0^{2} = 0\) and \(0^{2} = 0\). Adding the squares gives \(1 + 0 + 0 = 1\). Taking the square root gives \(\sqrt{1} = 1\).

\(|\vec{A}| = \sqrt{1^{2} + 0^{2} + 0^{2}} = 1\)

Step 4c

Step 4c - Work out the magnitude of B.

In this problem: The magnitude of \(\vec{B}\) is worked out in the same way. Squaring the components gives \(0^{2} = 0\), \(1^{2} = 1\) and \(0^{2} = 0\). Adding the squares gives \(0 + 1 + 0 = 1\). Taking the square root gives \(\sqrt{1} = 1\).

\(|\vec{B}| = \sqrt{0^{2} + 1^{2} + 0^{2}} = 1\)

Step 5

Step 5 - Work out the angle.

In this problem: Putting the three values back in gives \(\theta = \cos^{-1}\left(\frac{0}{1 \times 1}\right)\). The fraction works out to \(\frac{0}{1 \times 1} = 0\), and taking the inverse cosine gives \(\theta = 90^{\circ}\).

\(\theta = \cos^{-1}\left(\frac{0}{1 \times 1}\right) = 90^{\circ}\)

Final Answer

\(\theta = 90^{\circ}\)
See Example 2 Hide Example 2

Problem

\(\vec{A} = \left\langle 1,\; 2,\; 3 \right\rangle,\; \vec{B} = \left\langle 4,\; 5,\; 6 \right\rangle\)

Approach

Step-by-step method

  1. Set up the problem.
  2. Write the formula.
  3. Substitute the vectors into the formula.
  4. Work out the dot product and the two magnitudes.
  5. Work out the angle.

Formula

Formula: Angle Between Vectors Formula

This formula gives the angle between two vectors. Divide the dot product by both magnitudes, then take the inverse cosine.

\(\theta = \cos^{-1}\left(\frac{\vec{A} \cdot \vec{B}}{|\vec{A}|\,|\vec{B}|}\right)\)

Step 1

Step 1 - Set up the problem.

In this problem: We are finding the angle between \(\vec{A} = \left\langle 1,\; 2,\; 3 \right\rangle\) and \(\vec{B} = \left\langle 4,\; 5,\; 6 \right\rangle\).

\(\vec{A} = \left\langle 1,\; 2,\; 3 \right\rangle,\; \vec{B} = \left\langle 4,\; 5,\; 6 \right\rangle\)
x y z θ A ⟨1, 2, 3⟩ B ⟨4, 5, 6⟩

Step 2

Step 2 - Write the formula.

In this problem: The cosine of the angle between two vectors is their dot product divided by the product of their magnitudes, so the inverse cosine of that fraction gives the angle.

\(\theta = \cos^{-1}\left(\frac{\vec{A} \cdot \vec{B}}{|\vec{A}|\,|\vec{B}|}\right)\)

Step 3

Step 3 - Substitute the vectors into the formula.

In this problem: Replacing \(\vec{A}\) and \(\vec{B}\) in \(\theta = \cos^{-1}\left(\frac{\vec{A} \cdot \vec{B}}{|\vec{A}|\,|\vec{B}|}\right)\) gives \(\theta = \cos^{-1}\left(\frac{\left\langle 1,\; 2,\; 3 \right\rangle \cdot \left\langle 4,\; 5,\; 6 \right\rangle}{|\left\langle 1,\; 2,\; 3 \right\rangle|\,|\left\langle 4,\; 5,\; 6 \right\rangle|}\right)\).

\(\theta = \cos^{-1}\left(\frac{\left\langle 1,\; 2,\; 3 \right\rangle \cdot \left\langle 4,\; 5,\; 6 \right\rangle}{|\left\langle 1,\; 2,\; 3 \right\rangle|\,|\left\langle 4,\; 5,\; 6 \right\rangle|}\right)\)

Step 4

Step 4 - Work out the dot product and the two magnitudes.

In this problem: The fraction needs the dot product and the magnitudes of both vectors, so each one is worked out in turn.

\(\vec{A} = \left\langle 1,\; 2,\; 3 \right\rangle,\; \vec{B} = \left\langle 4,\; 5,\; 6 \right\rangle\)

Step 4a

Step 4a - Work out the dot product.

In this problem: The dot product is worked out from the components, covered in the Dot Product Calculator. Multiplying the matching components gives \(1 \times 4 = 4\), \(2 \times 5 = 10\) and \(3 \times 6 = 18\). Adding the three products gives \(4 + 10 + 18 = 32\).

\(\vec{A} \cdot \vec{B} = 1 \times 4 + 2 \times 5 + 3 \times 6 = 32\)

Step 4b

Step 4b - Work out the magnitude of A.

In this problem: The magnitude of \(\vec{A}\) is worked out from its components, covered in the Magnitude of a Vector Calculator. Squaring the components gives \(1^{2} = 1\), \(2^{2} = 4\) and \(3^{2} = 9\). Adding the squares gives \(1 + 4 + 9 = 14\). Taking the square root gives \(\sqrt{14} \approx 3.74\).

\(|\vec{A}| = \sqrt{1^{2} + 2^{2} + 3^{2}} = \sqrt{14} \approx 3.74\)

Step 4c

Step 4c - Work out the magnitude of B.

In this problem: The magnitude of \(\vec{B}\) is worked out in the same way. Squaring the components gives \(4^{2} = 16\), \(5^{2} = 25\) and \(6^{2} = 36\). Adding the squares gives \(16 + 25 + 36 = 77\). Taking the square root gives \(\sqrt{77} \approx 8.77\).

\(|\vec{B}| = \sqrt{4^{2} + 5^{2} + 6^{2}} = \sqrt{77} \approx 8.77\)

Step 5

Step 5 - Work out the angle.

In this problem: Putting the three values back in gives \(\theta = \cos^{-1}\left(\frac{32}{\sqrt{14} \times \sqrt{77}}\right)\). The fraction works out to \(\frac{32}{\sqrt{14} \times \sqrt{77}} \approx 0.9746\), and taking the inverse cosine gives \(\theta \approx 12.93^{\circ}\).

\(\theta = \cos^{-1}\left(\frac{32}{\sqrt{14} \times \sqrt{77}}\right) \approx 12.93^{\circ}\)

Final Answer

\(\theta \approx 12.93^{\circ}\)
See Example 3 Hide Example 3

Problem

\(\vec{A} = \left\langle 2,\; 1,\; 2 \right\rangle,\; \vec{B} = \left\langle 1,\; 0,\; 1 \right\rangle\)

Approach

Step-by-step method

  1. Set up the problem.
  2. Write the formula.
  3. Substitute the vectors into the formula.
  4. Work out the dot product and the two magnitudes.
  5. Work out the angle.

Formula

Formula: Angle Between Vectors Formula

This formula gives the angle between two vectors. Divide the dot product by both magnitudes, then take the inverse cosine.

\(\theta = \cos^{-1}\left(\frac{\vec{A} \cdot \vec{B}}{|\vec{A}|\,|\vec{B}|}\right)\)

Step 1

Step 1 - Set up the problem.

In this problem: We are finding the angle between \(\vec{A} = \left\langle 2,\; 1,\; 2 \right\rangle\) and \(\vec{B} = \left\langle 1,\; 0,\; 1 \right\rangle\).

\(\vec{A} = \left\langle 2,\; 1,\; 2 \right\rangle,\; \vec{B} = \left\langle 1,\; 0,\; 1 \right\rangle\)
x y z θ A ⟨2, 1, 2⟩ B ⟨1, 0, 1⟩

Step 2

Step 2 - Write the formula.

In this problem: The cosine of the angle between two vectors is their dot product divided by the product of their magnitudes, so the inverse cosine of that fraction gives the angle.

\(\theta = \cos^{-1}\left(\frac{\vec{A} \cdot \vec{B}}{|\vec{A}|\,|\vec{B}|}\right)\)

Step 3

Step 3 - Substitute the vectors into the formula.

In this problem: Replacing \(\vec{A}\) and \(\vec{B}\) in \(\theta = \cos^{-1}\left(\frac{\vec{A} \cdot \vec{B}}{|\vec{A}|\,|\vec{B}|}\right)\) gives \(\theta = \cos^{-1}\left(\frac{\left\langle 2,\; 1,\; 2 \right\rangle \cdot \left\langle 1,\; 0,\; 1 \right\rangle}{|\left\langle 2,\; 1,\; 2 \right\rangle|\,|\left\langle 1,\; 0,\; 1 \right\rangle|}\right)\).

\(\theta = \cos^{-1}\left(\frac{\left\langle 2,\; 1,\; 2 \right\rangle \cdot \left\langle 1,\; 0,\; 1 \right\rangle}{|\left\langle 2,\; 1,\; 2 \right\rangle|\,|\left\langle 1,\; 0,\; 1 \right\rangle|}\right)\)

Step 4

Step 4 - Work out the dot product and the two magnitudes.

In this problem: The fraction needs the dot product and the magnitudes of both vectors, so each one is worked out in turn.

\(\vec{A} = \left\langle 2,\; 1,\; 2 \right\rangle,\; \vec{B} = \left\langle 1,\; 0,\; 1 \right\rangle\)

Step 4a

Step 4a - Work out the dot product.

In this problem: The dot product is worked out from the components, covered in the Dot Product Calculator. Multiplying the matching components gives \(2 \times 1 = 2\), \(1 \times 0 = 0\) and \(2 \times 1 = 2\). Adding the three products gives \(2 + 0 + 2 = 4\).

\(\vec{A} \cdot \vec{B} = 2 \times 1 + 1 \times 0 + 2 \times 1 = 4\)

Step 4b

Step 4b - Work out the magnitude of A.

In this problem: The magnitude of \(\vec{A}\) is worked out from its components, covered in the Magnitude of a Vector Calculator. Squaring the components gives \(2^{2} = 4\), \(1^{2} = 1\) and \(2^{2} = 4\). Adding the squares gives \(4 + 1 + 4 = 9\). Taking the square root gives \(\sqrt{9} = 3\).

\(|\vec{A}| = \sqrt{2^{2} + 1^{2} + 2^{2}} = 3\)

Step 4c

Step 4c - Work out the magnitude of B.

In this problem: The magnitude of \(\vec{B}\) is worked out in the same way. Squaring the components gives \(1^{2} = 1\), \(0^{2} = 0\) and \(1^{2} = 1\). Adding the squares gives \(1 + 0 + 1 = 2\). Taking the square root gives \(\sqrt{2} \approx 1.41\).

\(|\vec{B}| = \sqrt{1^{2} + 0^{2} + 1^{2}} = \sqrt{2} \approx 1.41\)

Step 5

Step 5 - Work out the angle.

In this problem: Putting the three values back in gives \(\theta = \cos^{-1}\left(\frac{4}{3 \times \sqrt{2}}\right)\). The fraction works out to \(\frac{4}{3 \times \sqrt{2}} \approx 0.9428\), and taking the inverse cosine gives \(\theta \approx 19.47^{\circ}\).

\(\theta = \cos^{-1}\left(\frac{4}{3 \times \sqrt{2}}\right) \approx 19.47^{\circ}\)

Final Answer

\(\theta \approx 19.47^{\circ}\)
See Example 4 Hide Example 4

Problem

\(\vec{A} = \left\langle 3,\; -1,\; 2 \right\rangle,\; \vec{B} = \left\langle 1,\; 4,\; 0 \right\rangle\)

Approach

Step-by-step method

  1. Set up the problem.
  2. Write the formula.
  3. Substitute the vectors into the formula.
  4. Work out the dot product and the two magnitudes.
  5. Work out the angle.

Formula

Formula: Angle Between Vectors Formula

This formula gives the angle between two vectors. Divide the dot product by both magnitudes, then take the inverse cosine.

\(\theta = \cos^{-1}\left(\frac{\vec{A} \cdot \vec{B}}{|\vec{A}|\,|\vec{B}|}\right)\)

Step 1

Step 1 - Set up the problem.

In this problem: We are finding the angle between \(\vec{A} = \left\langle 3,\; -1,\; 2 \right\rangle\) and \(\vec{B} = \left\langle 1,\; 4,\; 0 \right\rangle\).

\(\vec{A} = \left\langle 3,\; -1,\; 2 \right\rangle,\; \vec{B} = \left\langle 1,\; 4,\; 0 \right\rangle\)
x y z θ A ⟨3, −1, 2⟩ B ⟨1, 4, 0⟩

Step 2

Step 2 - Write the formula.

In this problem: The cosine of the angle between two vectors is their dot product divided by the product of their magnitudes, so the inverse cosine of that fraction gives the angle.

\(\theta = \cos^{-1}\left(\frac{\vec{A} \cdot \vec{B}}{|\vec{A}|\,|\vec{B}|}\right)\)

Step 3

Step 3 - Substitute the vectors into the formula.

In this problem: Replacing \(\vec{A}\) and \(\vec{B}\) in \(\theta = \cos^{-1}\left(\frac{\vec{A} \cdot \vec{B}}{|\vec{A}|\,|\vec{B}|}\right)\) gives \(\theta = \cos^{-1}\left(\frac{\left\langle 3,\; -1,\; 2 \right\rangle \cdot \left\langle 1,\; 4,\; 0 \right\rangle}{|\left\langle 3,\; -1,\; 2 \right\rangle|\,|\left\langle 1,\; 4,\; 0 \right\rangle|}\right)\).

\(\theta = \cos^{-1}\left(\frac{\left\langle 3,\; -1,\; 2 \right\rangle \cdot \left\langle 1,\; 4,\; 0 \right\rangle}{|\left\langle 3,\; -1,\; 2 \right\rangle|\,|\left\langle 1,\; 4,\; 0 \right\rangle|}\right)\)

Step 4

Step 4 - Work out the dot product and the two magnitudes.

In this problem: The fraction needs the dot product and the magnitudes of both vectors, so each one is worked out in turn.

\(\vec{A} = \left\langle 3,\; -1,\; 2 \right\rangle,\; \vec{B} = \left\langle 1,\; 4,\; 0 \right\rangle\)

Step 4a

Step 4a - Work out the dot product.

In this problem: The dot product is worked out from the components, covered in the Dot Product Calculator. Multiplying the matching components gives \(3 \times 1 = 3\), \(\left(-1\right) \times 4 = -4\) and \(2 \times 0 = 0\). Adding the three products gives \(3 - 4 + 0 = -1\).

\(\vec{A} \cdot \vec{B} = 3 \times 1 + \left(-1\right) \times 4 + 2 \times 0 = -1\)

Step 4b

Step 4b - Work out the magnitude of A.

In this problem: The magnitude of \(\vec{A}\) is worked out from its components, covered in the Magnitude of a Vector Calculator. Squaring the components gives \(3^{2} = 9\), \(\left(-1\right)^{2} = 1\) and \(2^{2} = 4\). Adding the squares gives \(9 + 1 + 4 = 14\). Taking the square root gives \(\sqrt{14} \approx 3.74\).

\(|\vec{A}| = \sqrt{3^{2} + \left(-1\right)^{2} + 2^{2}} = \sqrt{14} \approx 3.74\)

Step 4c

Step 4c - Work out the magnitude of B.

In this problem: The magnitude of \(\vec{B}\) is worked out in the same way. Squaring the components gives \(1^{2} = 1\), \(4^{2} = 16\) and \(0^{2} = 0\). Adding the squares gives \(1 + 16 + 0 = 17\). Taking the square root gives \(\sqrt{17} \approx 4.12\).

\(|\vec{B}| = \sqrt{1^{2} + 4^{2} + 0^{2}} = \sqrt{17} \approx 4.12\)

Step 5

Step 5 - Work out the angle.

In this problem: Putting the three values back in gives \(\theta = \cos^{-1}\left(\frac{-1}{\sqrt{14} \times \sqrt{17}}\right)\). The fraction works out to \(\frac{-1}{\sqrt{14} \times \sqrt{17}} \approx -0.0648\), and taking the inverse cosine gives \(\theta \approx 93.72^{\circ}\).

\(\theta = \cos^{-1}\left(\frac{-1}{\sqrt{14} \times \sqrt{17}}\right) \approx 93.72^{\circ}\)

Final Answer

\(\theta \approx 93.72^{\circ}\)

Calculator and Practice Mode