Numford
Vectors

Angle between two vectors

The angle between 3i + 4j and 4i + 3j is 16.26°.

Vectors

Drag the glowing tips, or type values. Angles are measured from the x axis, and θ is the angle from A to B. Pick a result card to see it built in the picture.

Angle between16.26°cos θ = A·B / AB
Unit vectors0.6i + 0.8jB = 0.8i + 0.6j

Vector A of size 5 and vector B of size 5 with 16.26 degrees between them. The resultant is 9.9, 8.13 degrees from A. The dot product is 24 and the cross product has size 7.

A B
Show the formulas
Resultant
R = √(A² + B² + 2AB cos θ) = √(5² + 5² + 2 × 5 × 5 × cos 16.26°) = 9.9
Direction
tan β = B sin θ / (A + B cos θ) = 5 × sin 16.26° / (5 + 5 × cos 16.26°), so β = 8.13° from A
Difference
|A - B| = √(A² + B² - 2AB cos θ) = √(5² + 5² - 2 × 5 × 5 × cos 16.26°) = 1.41
Dot product
A·B = AB cos θ = 5 × 5 × cos 16.26° = 24
Cross product
|A×B| = AB sin θ = 5 × 5 × sin 16.26° = 7
Components
A·B = AxBx + AyBy + AzBz = 3 × 4 + 4 × 3 + 0 × 0 = 24
Determinant
A×B = (AyBz - AzBy) i + (AzBx - AxBz) j + (AxBy - AyBx) k = -7k
Unit vector
 = A / |A| = 0.6i + 0.8j
Working

Step by step

  1. Given A = 3i + 4j and B = 4i + 3j.
  2. A·B = AxBx + AyBy + AzBz = 3 × 4 + 4 × 3 + 0 × 0 = 24
  3. |A| = 5 and |B| = 5.
  4. cos θ = A·B / (|A||B|) = 24 / (5 × 5) = 0.96
  5. θ = cos⁻¹(0.96) = 16.26°
Derivation

Why it works

  1. The dot product has two forms: AB cos θ and AxBx + AyBy + AzBz.
  2. Set them equal: AB cos θ = AxBx + AyBy + AzBz.
  3. Divide by AB to get cos θ = (AxBx + AyBy + AzBz) / (AB).
  4. The magnitudes are A = √(Ax² + Ay² + Az²) and B = √(Bx² + By² + Bz²).
  5. Take the inverse cosine of the result to get the angle between 0° and 180°.
Questions

Angle between two vectors: quick answers

How do you find the angle between two vectors?

Use cos θ = A·B / (|A||B|), where A·B = AxBx + AyBy + AzBz, then take the inverse cosine.

What is the angle between 3i + 4j and 4i + 3j?

The dot product is 24 and the magnitudes are 5 and 5, so cos θ = 0.96 and θ = 16.26°.

What does a negative dot product tell you?

The angle is more than 90 degrees. A zero dot product means exactly 90 degrees.

Try your own vectors