GEOMETRYAnglesMathematics Calculator
📐

Find the Angle Between Two Vectors — Dot Product & Magnitude

Calculate the angle between two vectors in 2D or 3D using the dot product formula θ = arccos((a·b)/(|a||b|)). Results in degrees or radians with step-by-step solutions.

Concept Fundamentals
θ = arccos(a·b/|a||b|)
Angle formula
a·b = aₓbₓ + aᵧbᵧ
Dot product (2D)
|v| = √(vₓ² + vᵧ² + vᵤ²)
Magnitude
a·b = |a||b|
Parallel (0°)

Did our AI summary help? Let us know.

θ = arccos((v₁·v₂)/(|v₁||v₂|)) — angle from dot product and magnitudes Parallel vectors: θ = 0°, dot product = |v₁||v₂| Perpendicular vectors: θ = 90°, dot product = 0 Scaling vectors does not change the angle — only direction matters Cosine similarity in ML is exactly cos(θ) between feature vectors

Key quantities
θ = arccos(a·b/|a||b|)
Angle formula
Key relation
a·b = aₓbₓ + aᵧbᵧ
Dot product (2D)
Key relation
|v| = √(vₓ² + vᵧ² + vᵤ²)
Magnitude
Key relation
a·b = |a||b|
Parallel (0°)
Key relation

Ready to run the numbers?

Why: Vector angles are fundamental in physics (work, force projection), computer graphics, machine learning (cosine similarity), and navigation. The dot product reveals how aligned two directions are.

How: The calculator computes dot product a·b, magnitudes |a| and |b|, then θ = arccos((a·b)/(|a||b|)). Works in 2D or 3D. cos θ is clamped to [-1,1] for numerical stability.

θ = arccos((v₁·v₂)/(|v₁||v₂|)) — angle from dot product and magnitudesParallel vectors: θ = 0°, dot product = |v₁||v₂|

Run the calculator when you are ready.

Angle Between Vectors CalculatorEnter vector components and get the angle, dot product, and magnitudes
θ = arccos(a·b / |a||b|)

Angle Between Vectors — 2D & 3D

Enter vector components and get the angle, dot product, and magnitudes. Works in degrees or radians.

↗ Sample Examples — Click to Load

Settings

Vector Components

Vector 1

Vector 2

vector_angle.sh
CALCULATED
$ angle_vectors --v1=(1,0) --v2=(0,1)
Angle
90°
degrees
|v₁|
1
|v₂|
1
v₁·v₂
0
Share:
Angle Between Vectors
θ = 90°
|v₁| = 1|v₂| = 1v₁·v₂ = 0
numbervibe.com/calculators/mathematics/angle/angle-between-vectors

Magnitudes & Dot Product

Angle in 180°

Vector Properties Radar

Step-by-Step Breakdown

INPUT
Vector 1
(1, 0)
INPUT
Vector 2
(0, 1)
MAGNITUDES
|v₁|
1
√(1² + 0²) = 1
MAGNITUDES
|v₂|
1
√(0² + 1²) = 1
DOT PRODUCT
v₁·v₂
0
1×0 + 0×1 = 0
ANGLE
cos(θ)
0
0 / (1 × 1)
RESULT
θ
90°
arccos(0)

For educational and informational purposes only. Verify with a qualified professional.

🧮 Fascinating Math Facts

📐

Cosine similarity in ML is exactly cos(θ) between feature vectors — used in recommendation systems and NLP

— Khan Academy

Work W = F·d = |F||d|cos θ — the dot product gives the component of force along displacement

— MIT 18.022

🎯

Orthogonal vectors (θ=90°) have dot product zero — basis vectors in coordinate systems

— Wolfram MathWorld

🔄

The formula works in any dimension — 2D, 3D, or n-dimensional vectors

— Linear Algebra

Key Takeaways

  • θ = arccos((v₁·v₂) / (|v₁||v₂|)) — angle from dot product and magnitudes
  • Dot product: v₁·v₂ = aₓbₓ + aᵧbᵧ (+ aᵤbᵤ in 3D)
  • Magnitude: |v| = √(vₓ² + vᵧ² + vᵤ²)
  • Angle is always 0°–180° — parallel (0°), perpendicular (90°), opposite (180°)
  • Scaling vectors does not change the angle — only direction matters

Did You Know?

📐Cosine similarity in ML is exactly cos(θ) between feature vectors — used in recommendation systems and NLPSource: Khan Academy
Work W = F·d = |F||d|cos θ — the dot product gives the component of force along displacementSource: MIT 18.022
🎯Orthogonal vectors (θ=90°) have dot product zero — basis vectors in coordinate systemsSource: Wolfram MathWorld
🔄The formula works in any dimension — 2D, 3D, or n-dimensional vectorsSource: Linear Algebra

How It Works

From a·b = |a||b|cos θ, solve for θ = arccos((a·b)/(|a||b|)).

Step 1: Dot Product

2D: aₓbₓ + aᵧbᵧ. 3D: add aᵤbᵤ.

Step 2: Magnitudes

|v| = √(vₓ² + vᵧ²) or √(vₓ² + vᵧ² + vᵤ²).

Step 3: cos θ

cos θ = (a·b) / (|a||b|). Clamp to [-1,1] for floating-point safety.

Step 4: θ

θ = arccos(...). Result in radians; multiply by 180/π for degrees.

Expert Tips

Zero Vector

If either vector has zero magnitude, the angle is undefined. The calculator will show an error.

Unit Vectors

For unit vectors (|v|=1), cos θ = v₁·v₂. The dot product directly gives cos of the angle.

Parallel vs Perpendicular

Parallel: dot product = |v₁||v₂| (θ=0°). Perpendicular: dot product = 0 (θ=90°).

Projection

proj_b(a) = (a·b/|b|²)b. The scalar (a·b)/|b| is |a|cos θ — component of a along b.

This Calculator vs Alternatives

FeatureThis CalculatorManual
2D & 3DBoth supportedManual formula
Degrees/RadiansToggle outputConvert manually
Step-by-stepYesNo

Frequently Asked Questions

Can the angle exceed 180°?

No. The angle between vectors is defined as the smaller angle, always 0°–180°.

What if a vector has zero magnitude?

The angle is undefined. Division by zero would occur. The calculator shows an error.

Does scaling change the angle?

No. θ depends only on direction. Multiplying a vector by a scalar does not change its direction.

How is this related to cosine similarity?

Cosine similarity = cos θ = (a·b)/(|a||b|). Same formula, used in ML for text/document similarity.

What about the cross product?

|a×b| = |a||b|sin θ. Dot product uses cos, cross product uses sin. Cross product is a vector; dot product is scalar.

Why clamp cos θ to [-1,1]?

Floating-point errors can produce values slightly outside [-1,1]. arccos requires input in that range.

Vector Angles by the Numbers

Parallel
90°
Perpendicular
180°
Opposite
a·b
Dot product

Disclaimer: This calculator uses the standard dot product formula θ = arccos((a·b)/(|a||b|)). Results are for educational and general use. Zero vectors produce an error. For critical applications, verify with domain-specific tools.

👈 START HERE
⬅️Jump in and explore the concept!
AI

Related Calculators