Angle Between Vectors Calculator 📐

Calculate the angle between two vectors in 2D or 3D space using vector mathematics

Vector Fundamentals

What is a Vector?

A vector is a mathematical object that has both magnitude (length) and direction. In 3D space, vectors are represented by three components: (x,y,z)(x, y, z).

Vector Angle Definition

The angle between two vectors is the smallest angle formed at their point of intersection when their tails are placed together. This angle always ranges between 00^\circ and 180180^\circ.

Dot Product Formula

AB=ABcosθ\mathbf{A} \cdot \mathbf{B} = \|\mathbf{A}\| \|\mathbf{B}\| \cos\theta

The dot product relates the magnitudes of two vectors and the cosine of the angle between them. Rearranging this gives us the angle formula:

θ=cos1(ABAB)\theta = \cos^{-1}\left(\frac{\mathbf{A} \cdot \mathbf{B}}{\|\mathbf{A}\| \|\mathbf{B}\|}\right)
Special Vector Cases

Parallel Vectors

θ=0\theta = 0^\circ

Vectors point in exactly the same direction. Their dot product equals the product of their magnitudes: AB=AB\mathbf{A} \cdot \mathbf{B} = \|\mathbf{A}\| \|\mathbf{B}\|.

Perpendicular Vectors

θ=90\theta = 90^\circ

Vectors are orthogonal (at right angles). Their dot product is zero:AB=0\mathbf{A} \cdot \mathbf{B} = 0.

Opposite Vectors

θ=180\theta = 180^\circ

Vectors point in exactly opposite directions. Their dot product equals the negative product of their magnitudes: AB=AB\mathbf{A} \cdot \mathbf{B} = -\|\mathbf{A}\| \|\mathbf{B}\|.

Vector Inputs

Calculation Steps

1. Compute dot product: 1×0+0×1+0×01 \times 0 + 0 \times 1 + 0 \times 0

2. Compute magnitudes: 12+02+02\sqrt{1^2 + 0^2 + 0^2} and 02+12+02\sqrt{0^2 + 1^2 + 0^2}

3. Calculate angle: cos1(dot productproduct of magnitudes)\cos^{-1}\left(\frac{\text{dot product}}{\text{product of magnitudes}}\right)

Angle Result
90.0090.00^\circ
The vectors are perpendicular (at right angles)
AB
Practical Applications
  • Physics: Calculating angles between force vectors, determining work done (work = force • displacement)
  • Computer Graphics: Determining lighting angles (Lamberts cosine law), surface normals, and reflection vectors
  • Robotics: Calculating joint angles and movement vectors for robotic arm positioning
  • Navigation: Determining angles between GPS coordinates or flight paths in 3D space
  • Machine Learning: Measuring similarity between feature vectors using cosine similarity