Dot Product Calculator

Calculate A · B vector dot product

CalculatorsFreeNo Signup
4.6(235 reviews)
All Tools

Loading tool...

About Dot Product Calculator

A dot product calculator that computes A · B for 2D or 3D vectors. Shows the scalar result, angle between vectors, scalar and vector projections, and checks if vectors are parallel, perpendicular, or neither. All calculations are client-side. Essential for physics (work = F·d), machine learning (similarity), and computer graphics (shading).

Dot Product Calculator Features

  • 2D & 3D
  • Angle
  • Projections
  • Parallel check
  • Perpendicular check
The dot product A · B = a₁b₁ + a₂b₂ + a₃b₃ produces a scalar. It equals |A||B|cos(θ) where θ is the angle between vectors. If A·B = 0, vectors are perpendicular. Dot product measures how much two vectors 'align' and is used in physics (work), ML (cosine similarity), and graphics (Lambertian shading).

How to Use

Enter two vectors:

  • 2D: (a₁, a₂) and (b₁, b₂)
  • 3D: (a₁, a₂, a₃) and (b₁, b₂, b₃)
  • Result: Scalar value computed

Formula

  • A · B = Σ(aᵢ × bᵢ)
  • A · B = |A||B|cos(θ)
  • θ = arccos(A·B / (|A||B|))

Projections

Scalar projection of A onto B: comp_B(A) = A·B/|B|. Vector projection: proj_B(A) = (A·B/|B|²) × B. This decomposes A into parallel and perpendicular components relative to B.

Step-by-Step Instructions

  1. 1Select 2D or 3D mode.
  2. 2Enter Vector A components.
  3. 3Enter Vector B components.
  4. 4View the dot product scalar.
  5. 5Check the angle and projections.

Dot Product Calculator — Frequently Asked Questions

What does a dot product of zero mean?+

The vectors are perpendicular (orthogonal). They form a 90° angle. This is a key test in linear algebra and physics.

How is dot product used in machine learning?+

Cosine similarity = A·B/(|A||B|) measures how similar two vectors are, used in text analysis, recommendation systems, and word embeddings.

What's the difference between dot product and cross product?+

Dot product: scalar result, measures alignment, cos(θ). Cross product: vector result, perpendicular to both inputs, sin(θ). Dot works in any dimension; cross only in 3D.

Share this tool: