📐

Angle Between Vectors

2D & 3D Vector Calculator
u =
v =
Angle (θ)
(0 radians)
Dot Product: 0
Magnitude A (|u|): 0
Magnitude B (|v|): 0

The Geometry of Direction

In physics and engineering, a Vector is an object that has both magnitude (length) and direction. You can imagine it as an arrow pointing in space.

Finding the angle between two vectors helps us understand how they relate to each other. Are they pointing the same way? Are they opposing? Are they perpendicular?

The Formula: The Dot Product

We don't use a protractor to measure vectors; we use algebra. The formula relies on the Dot Product rule.

$\cos(\theta) = \frac{\vec{u} \cdot \vec{v}}{|\vec{u}| \times |\vec{v}|}$
  • $\vec{u} \cdot \vec{v}$: The Dot Product. (Calculated as $x_1x_2 + y_1y_2 + z_1z_2$).
  • $|\vec{u}|$: The Magnitude (Length) of Vector u.
  • $|\vec{v}|$: The Magnitude (Length) of Vector v.
  • $\theta$: The angle between them.

Once you calculate the cosine of the angle, you simply take the inverse cosine ($\arccos$) to find the angle itself.

Understanding the Results

The angle ($\theta$) tells you the relationship between the two forces or directions.

Angle Relationship Dot Product
Parallel (Same Direction) Positive (Max)
90° Perpendicular (Orthogonal) Zero (0)
180° Anti-Parallel (Opposite) Negative (Min)
0° < θ < 90° Acute Angle Positive
90° < θ < 180° Obtuse Angle Negative
Important Note: This calculation always finds the shortest angle between the vectors, meaning the result will always be between 0° and 180°. It assumes the vectors start from the same origin point.

Real World Applications

1. Video Game Development (Field of View)

How does a game know if an enemy can "see" you? Developers use the Dot Product.

They create a vector for the enemy's facing direction, and a vector pointing to the player. If the angle between them is less than 45° (the field of view cone), the enemy "sees" the player and attacks.

2. Physics (Work)

In physics, Work is defined as Force applied over a Distance. However, only the force applied in the direction of movement counts.

If you pull a sled with a rope at an angle, only part of your force moves the sled forward. Calculating the angle allows you to find the "Effective Force."

3. Structural Engineering

When designing trusses for bridges or roofs, engineers must calculate the angles between beams to determine how load forces (compression and tension) are distributed throughout the structure.