Dot Product Calculator tool

Dot Product Calculator

The dot product multiplies matching components of two vectors and adds the results.

What is a dot product calculator?

A dot product calculator multiplies matching components of two vectors and adds the products to return a scalar a·b. It also finds vector lengths and the cosine of the angle between them. Switch between 2D and 3D and type components separated by commas. Perpendicular vectors show cos θ = 0 when the dot product vanishes.

How to use the Dot Product Calculator

  1. Pick 2D or 3D dimension.
  2. Type vector a components separated by commas.
  3. Type vector b with the same component count.
  4. Read a·b, |a|, |b|, and cos θ in results.
  5. A dot product of zero means perpendicular vectors.
  6. Switch dimension before typing three-component vectors.

About this calculator

The dot product multiplies matching components of two vectors and adds the results. For (3,4)·(1,0) you get 3. The result is a single number — a scalar — not another vector.

The calculator also finds |a| and |b| and cos θ. When the dot product is zero, the vectors are perpendicular.

Dot products appear in work, projections, and lighting models. For matrix operations try the [[matrix]] calculator. For triangle side lengths use the [[pythagorean]] calculator. For slope between points see the [[slope]] calculator.

Formula for the dot product

a·b = a₁b₁ + a₂b₂ (+ a₃b₃ in 3D)
cos θ = (a·b) ÷ (|a||b|)
  • a·b is a scalar, not a vector
  • |a| is the length √(a₁² + a₂² + …)
  • θ is the angle between a and b when both are non-zero

Dot product example: (3,4)·(1,0) and 3D check

In 2D, set a = 3, 4 and b = 1, 0. Compute 3×1 + 4×0 = 3. Lengths: |a| = 5 and |b| = 1, so cos θ = 3/5 = 0.6.

Switch to 3D with a = 1, 2, 3 and b = 0, 1, 0. Dot product is 1×0 + 2×1 + 3×0 = 2. Vectors (1,0) and (0,1) in 2D give dot 0, showing a right angle.

Work example for physics: force (5,0) N and displacement (3,4) m give dot 15 J if units align. Enter those vectors to read a·b = 15 and cos θ = 15/(5×5) = 0.6.

Let a = 2, 3 and b = 4, 5 in 2D. Dot product 2×4 + 3×5 = 8 + 15 = 23. Lengths |a| = √13 and |b| = √41, so cos θ = 23/√533 ≈ 0.997.

Perpendicular test: a = 3, 4 and b = 4, −3 give 12 − 12 = 0, so cos θ = 0. Enter those pairs to match 23 and 0 on the result card.

Work done sketch: constant force 6, 0 N through displacement 2, 5 m gives dot 12 J when units align along the x-axis.

Projection check: unit vector along (1,0) dotted with (5,12) returns 5, the x-component alone. That matches the formula a·b = |a||b| cos θ when θ is measured from the x-axis.

Obtuse angle sample: a = −1, 2 and b = 3, 1 give dot −1, so cos θ is negative and the angle exceeds 90°. Enter those components to see a negative dot product on the card.

Common uses

  • Check whether two vectors are perpendicular (dot = 0)
  • Find cos θ for physics work W = F·d problems
  • Compute projections in linear algebra homework
  • Compare 2D and 3D vector alignment quickly

Frequently asked questions

What is (3,4)·(1,0)?

3. Only the x-components contribute: 3×1 + 4×0 = 3.

When is the dot product zero?

When vectors are orthogonal — perpendicular in 2D/3D. Example: (1,0)·(0,1) = 0.

How do I enter 3D vectors?

Switch to 3D and type three comma-separated numbers, e.g. 1, 2, 3 for each vector.

Is dot product the same as cross product?

No. Dot product returns a scalar; cross product (3D only) returns a vector perpendicular to both inputs.

Related calculators

Maintained by J Jaya Prakash · Last updated: October 2026