3D Vector Angle Calculator: Find Angle Between Vectors a and b

Vector \(\vec{a}\)
Vector \(\vec{b}\)

3D Vector Angle Calculator: Find Angle Between Vectors a and b

What is a 3D Vector Angle?

Imagine you're in a big room holding two magic wands. These wands are our 3D vectors! The 3D vector angle is like the space between your wands when you point them in different directions. It tells us how far apart the wands are pointing in the room.

How to Calculate the 3D Vector Angle

To find the angle between our magic wands (3D vectors), we use a special math trick called the dot product. It's like asking our wands how much they agree with each other. The more they agree, the smaller the angle between them!

Formula

If we have two 3D vectors \(\vec{a} = (a_x, a_y, a_z)\) and \(\vec{b} = (b_x, b_y, b_z)\), the angle \(\theta\) between them is:

\[ \theta = \arccos\left(\frac{\vec{a} \cdot \vec{b}}{|\vec{a}||\vec{b}|}\right) \]

Where:

  • \(\vec{a} \cdot \vec{b}\) is the dot product of our vectors
  • \(|\vec{a}|\) is how long vector \(\vec{a}\) is (its magnitude)
  • \(|\vec{b}|\) is how long vector \(\vec{b}\) is (its magnitude)
  • \(\arccos\) is the inverse cosine function

Calculation Steps

  1. Find the dot product: \(\vec{a} \cdot \vec{b} = a_x b_x + a_y b_y + a_z b_z\)
  2. Calculate the magnitudes: \(|\vec{a}| = \sqrt{a_x^2 + a_y^2 + a_z^2}\) and \(|\vec{b}| = \sqrt{b_x^2 + b_y^2 + b_z^2}\)
  3. Divide the dot product by the product of magnitudes
  4. Use a calculator to find the arccos (inverse cosine) of the result
  5. If you want the answer in degrees, multiply by 180/π

Example

Let's find the angle between two magic wands: \(\vec{a} = (1, 2, 2)\) and \(\vec{b} = (3, 1, 1)\)

  1. Dot product: \(\vec{a} \cdot \vec{b} = (1 \times 3) + (2 \times 1) + (2 \times 1) = 3 + 2 + 2 = 7\)
  2. Magnitudes: \(|\vec{a}| = \sqrt{1^2 + 2^2 + 2^2} = 3\) and \(|\vec{b}| = \sqrt{3^2 + 1^2 + 1^2} = \sqrt{11}\)
  3. \(\frac{\vec{a} \cdot \vec{b}}{|\vec{a}||\vec{b}|} = \frac{7}{3\sqrt{11}} \approx 0.7025\)
  4. \(\theta = \arccos(0.7025) \approx 0.7855\) radians
  5. In degrees: \(0.7855 \times \frac{180}{\pi} \approx 45.00°\)

So, the angle between our magic wands \(\vec{a}\) and \(\vec{b}\) is about 45°!

Visual Representation

a b θ

This picture shows our magic wands \(\vec{a}\) (red) and \(\vec{b}\) (blue), and the angle θ (green) between them in 3D space.