Angle Between Two Vectors Calculator

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

Angle Between Two Vectors Calculator

What is the Angle Between Two Vectors?

The angle between two vectors is like measuring how far apart two arrows are pointing. Imagine you're holding two sticks in your hands, pointing in different directions. The space between these sticks is the angle we're talking about!

How to Calculate the Angle Between Two Vectors

To find the angle between two vectors, we use a special math trick called the dot product. It's like a secret handshake between the vectors that tells us how similar they are. The more similar they are, the smaller the angle between them!

Formula

If we have two vectors \(\vec{a} = (a_x, a_y)\) and \(\vec{b} = (b_x, b_y)\), 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, and \(|\vec{a}|\) and \(|\vec{b}|\) are the magnitudes (lengths) of the vectors.

Calculation Steps

  1. Calculate the dot product: \(\vec{a} \cdot \vec{b} = a_x b_x + a_y b_y\)
  2. Find the magnitudes: \(|\vec{a}| = \sqrt{a_x^2 + a_y^2}\) and \(|\vec{b}| = \sqrt{b_x^2 + b_y^2}\)
  3. Divide the dot product by the product of magnitudes
  4. Take the arccos (inverse cosine) of the result
  5. Convert to degrees if needed (multiply by 180/π)

Example

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

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

So, the angle between \(\vec{a}\) and \(\vec{b}\) is approximately 5.89°

Visual Representation

a b θ

This picture shows vectors \(\vec{a}\) (red) and \(\vec{b}\) (blue), and the angle θ (green) between them.