2D & 3D Vector Angle Engine

Select dimension mode and enter vector parameters.

Vector u

Vector v

Vector Angle Output

Angle Between Vectors θ θ = 62.19° (1.0855 rad)
Angle Between Vectors (θ) 62.19° (1.0855 rad)
Cosine Value cos(θ) cos(θ) = 0.4665
Angle Classification Acute Angle (θ < 90°)
Supplementary Angle (180° - θ) 117.81°
Vector Magnitudes ||u|| = 3.7417, ||v|| = 4.5826
Dot Product u · v u · v = 8

Quick Summary

Our angle between vectors calculator 2D 3D dot product degrees radians steps tool calculates the minimal enclosed angle $\theta$ ($0^\circ \le \theta \le 180^\circ$) between two vectors using the arccos dot product formula ($\theta = \arccos\left(\frac{\mathbf{u} \cdot \mathbf{v}}{\|\mathbf{u}\| \|\mathbf{v}\|}\right)$).

How It Works: Dot Product Angle Derivation

The angle between two non-zero vectors is derived from the geometric definition of the scalar dot product:
1. **Dot Product Step:** Multiply matching components and sum: $\mathbf{u} \cdot \mathbf{v} = u_x v_x + u_y v_y + u_z v_z$.
2. **Magnitudes Step:** Compute Euclidean lengths $\|\mathbf{u}\| = \sqrt{u_x^2 + u_y^2 + u_z^2}$ and $\|\mathbf{v}\| = \sqrt{v_x^2 + v_y^2 + v_z^2}$.
3. **Cosine Division Step:** Compute $\cos\theta = \frac{\mathbf{u} \cdot \mathbf{v}}{\|\mathbf{u}\| \|\mathbf{v}\|}$.
4. **Arccos Inversion Step:** Evaluate $\theta = \arccos(\cos\theta)$ in radians and convert to degrees ($\theta^\circ = \theta^{rad} \times \180 / \pi$).
5. **Angle Classification:** Acute ($0^\circ < \theta < 90^\circ$), Right / Orthogonal ($\theta = 90^\circ$), Obtuse ($90^\circ < \theta < 180^\circ$), Parallel ($\theta = 0^\circ$), or Anti-Parallel ($\theta = 180^\circ$).

Formula Explanation

Your vector angle calculations follow classical scalar product identities:

\theta = \arccos\left(\frac{\mathbf{u} \cdot \mathbf{v}}{\|\mathbf{u}\| \|\mathbf{v}\|}\right) = \arccos\left(\u_x v_x + u_y v_y + u_z v_z / \sqrt{u_x^2 + u_y^2 + u_z^2 \sqrt{v_x^2 + v_y^2 + v_z^2}}\right)
\cos\theta = \frac{\mathbf{u} \cdot \mathbf{v}}{\|\mathbf{u}\| \|\mathbf{v}\|}, \quad \sin\theta = \frac{\|\mathbf{u} \times \mathbf{v}\|}{\|\mathbf{u}\| \|\mathbf{v}\|}

Step-by-Step Worked Example

Here is a detailed 5-step breakdown for 3D vectors $\mathbf{u} = \langle 1, 2, 3 \rangle$ and $\mathbf{v} = \langle 4, -1, 2 \rangle$:

  1. Step 1 (Compute Dot Product u · v): $\mathbf{u} \cdot \mathbf{v} = (1)(4) + (2)(-1) + (3)(2) = 4 - 2 + 6 = \mathbf{8}$.
  2. Step 2 (Compute Magnitude ||u||): $\|\mathbf{u}\| = \sqrt{1^2 + 2^2 + 3^2} = \sqrt{1 + 4 + 9} = \sqrt{14} \approx \mathbf{3.7417}$.
  3. Step 3 (Compute Magnitude ||v||): $\|\mathbf{v}\| = \sqrt{4^2 + (-1)^2 + 2^2} = \sqrt{16 + 1 + 4} = \sqrt{21} \approx \mathbf{4.5826}$.
  4. Step 4 (Compute Cosine Value): $\cos\theta = \8 / 3.7417 \times 4.5826 = \8 / 17.1464 \approx \mathbf{0.4665}$.
  5. Step 5 (Compute Arccos Inversion): $\theta = \arccos(0.4665) \approx \mathbf{1.0855 \text{ rad}} = \mathbf{62.19^\circ}$, delivering **θ = 62.19° (1.0855 rad)**!

Calculation Examples: Real-World Scenario Comparison

Compare vector inputs, dot products, vector angles in degrees and radians, and angle classifications:

Vector u Vector v Angle θ (Degrees) Angle θ (Radians) Angle Classification
⟨1, 2, 3⟩ ⟨4, -1, 2⟩ 62.19° 1.0855 rad Acute Angle (θ < 90°)
⟨3, 4⟩ (2D) ⟨-4, 3⟩ (2D) 90.00° 1.5708 rad (π/2) Orthogonal / Perpendicular
⟨2, 4, 6⟩ ⟨1, 2, 3⟩ 0.00° 0.0000 rad Parallel / Collinear
⟨5, 0⟩ ⟨-5, 0⟩ 180.00° 3.1416 rad (π) Anti-Parallel

Benefits of Using the Angle Between Vectors Calculator

Utilizing this calculator provides essential machine learning cosine similarity, physics work efficiency, and 3D graphics shading advantages:

  • Machine Learning Cosine Similarity: Measures exact angular distance between high-dimensional document feature embedding vectors.
  • Physics Force Efficiency Angle: Calculates inclination angle $\theta$ to determine how much applied force acts along displacement ($F \cos\theta$).
  • 3D Graphics Lighting (Phong & Lambert Shading): Computes light incidence angle $\theta$ between surface normal and light direction.
  • Prevents Rounding & Domain Errors: Automatically clamps floating-point $\cos\theta$ values into $[-1, 1]$ before evaluating `arccos`.

Frequently Asked Questions (FAQ)

What is the angle between two vectors?

The angle between two vectors is the shortest enclosed angle θ formed at their common initial origin point, ranging from 0° to 180° (0 to π radians).

What is the formula for the angle between two vectors?

θ = arccos((u · v) / (||u|| * ||v||)).

Can the angle between two vectors be negative?

NO. The standard geometric angle between two vectors is ALWAYS defined as positive, between 0° and 180°.

What does an angle of 90° (or π/2 rad) mean?

An angle of 90° means the vectors are orthogonal (perpendicular) to each other, and their dot product is 0.

What does an angle of 0° mean?

An angle of 0° means the vectors are parallel and point in the exact same direction.

What does an angle of 180° mean?

An angle of 180° means the vectors are anti-parallel and point in exact opposite directions.

How do you calculate the angle between two 2D vectors?

θ = arccos((ux*vx + uy*vy) / (sqrt(ux^2 + uy^2) * sqrt(vx^2 + vy^2))).

How do you calculate the angle between two 3D vectors?

θ = arccos((ux*vx + uy*vy + uz*vz) / (sqrt(ux^2 + uy^2 + uz^2) * sqrt(vx^2 + vy^2 + vz^2))).

Can you find the angle between vectors using the cross product?

YES. θ = asin(||u × v|| / (||u|| * ||v||)), though arccos dot product is preferred because asin cannot distinguish between acute and obtuse angles.

What is a supplementary vector angle?

The supplementary angle is 180° - θ (or π - θ rad), representing the exterior linear pair angle.