Calculateus

Dot Product Calculator

Calculate the dot product of two vectors and the angle between them.

Result

Dot Product
11
Angle Between Vectors
10.3°

A dot product of zero means the vectors are perpendicular (90°).

About the Dot Product Calculator

The dot product combines two vectors into a single number that reveals both how strongly they align and, from that, the angle between them. Our Dot Product Calculator computes it for 2D or 3D vectors and reports that angle directly.

How It Works

The calculator multiplies each pair of matching components together and sums the results to find the dot product, then uses that value together with each vector's magnitude to solve for the angle between them via the inverse cosine function.

A · B = AₓBₓ + AᵧBᵧ + A_zB_z cos(θ) = (A · B) ÷ (|A| × |B|)

Formula & Methodology

Multiplying matching components and summing captures how much the two vectors point in the same direction - components pointing the same way contribute positively, components pointing opposite ways contribute negatively, and perpendicular components contribute nothing. Dividing the dot product by the product of both vectors' magnitudes normalizes that raw alignment measure into cos(θ), a value between −1 and 1 that depends only on direction, not length - taking the inverse cosine then recovers the actual angle between the two vectors.

Step-by-Step: Calculating It By Hand

  1. 1Multiply each vector's x-components together, y-components together, and (for 3D) z-components together.
  2. 2Sum those products to get the dot product.
  3. 3Calculate the magnitude of each vector separately using the square-root-of-sum-of-squares formula.
  4. 4Divide the dot product by the product of the two magnitudes, then take the inverse cosine to find the angle.

Examples

Positive dot product

Vectors (3, 4) and (1, 2) have a dot product of 3×1 + 4×2 = 11, and an angle between them of about 10.3°.

Perpendicular vectors

Vectors (1, 0) and (0, 1) have a dot product of exactly 0, confirming they're perpendicular.

Advantages

  • Calculates dot product and the angle between vectors in one step
  • Works for both 2D vectors (leaving z at 0) and full 3D vectors
  • Removes the need to manually apply inverse cosine after finding magnitudes
  • Immediately flags perpendicular vectors via a zero dot product

Common Mistakes

  • Confusing dot product (returns a single number) with cross product (returns a vector)
  • Forgetting to normalize by both magnitudes before taking the inverse cosine
  • Misreading a negative dot product as an error rather than an indication of an obtuse angle
  • Not accounting for the z-component when working with genuinely 3D vectors

Edge Cases to Watch For

  • A dot product of exactly zero means the two vectors are perpendicular (90° apart), regardless of their individual magnitudes.
  • A dot product that's negative means the angle between the vectors exceeds 90° - they point in generally opposite directions.
  • If either vector has zero magnitude (all components zero), the angle calculation is undefined, since there's no meaningful direction to compare.
  • The dot product for 2D vectors is just this same formula with the z-component omitted (or treated as zero).

Common Use Cases

  • Physics problems involving work, projections, or force components
  • Finding the angle between two directions in 2D or 3D space
  • Computer graphics calculations involving lighting and surface angles
  • Linear algebra and vector calculus coursework
Written & fact-checked by the Calculateus TeamLast updated August 5, 2026How we verify our formulas

Frequently asked questions

What does a negative dot product mean?

It means the angle between the vectors is greater than 90° - they're pointing in generally opposite directions. A positive dot product means the angle is less than 90°, and zero means they're exactly perpendicular.

Conclusion

The dot product's single-number result packs in both alignment and angle information, making it one of the most frequently used vector operations across physics and graphics. Our Cross Product Calculator covers the complementary 3D operation that instead returns a full perpendicular vector.