Dot Product Calculator

Calculate the dot product of two vectors with magnitude and angle between them

Home Categories Math Dot Product Calculator
A Vector A
·
B Vector B

Dot Product (A · B)

Relationship

|A| (Magnitude)

Length of Vector A

|B| (Magnitude)

Length of Vector B

Scalar Projection

A projected onto B

Vector Projection of A onto B

Component of A in the direction of B

Component Contributions

X×X
Y×Y
Z×Z

Formula Used

A · B = A₁B₁ + A₂B₂ + A₃B₃

The result is a scalar value representing the projection of one vector onto another

If you like this calculator

Please help us by sharing it with your fellow students or colleagues!

Share this Calculator

About Dot Product Calculator

What is the Dot Product?

The dot product (also called the scalar product or inner product) is a fundamental operation between two vectors that produces a scalar value. Unlike the cross product which gives a vector result, the dot product returns a single number that represents the geometric relationship between two vectors.

Dot Product Formula

For two vectors a = (a₁, a₂, a₃) and b = (b₁, b₂, b₃), the dot product is:

a · b = a₁b₁ + a₂b₂ + a₃b₃

Alternatively, using the geometric definition:

a · b = |a| × |b| × cos(θ)

Where θ is the angle between the two vectors.

Finding the Angle Between Vectors

The dot product is commonly used to find the angle between two vectors:

cos(θ) = (a · b) / (|a| × |b|)

θ = arccos((a · b) / (|a| × |b|))

How to Use This Calculator

  1. Enter Vector A Components: Input the x, y, and z values for the first vector.
  2. Enter Vector B Components: Input the x, y, and z values for the second vector.
  3. View Results: The calculator instantly shows the dot product, magnitudes, angle between vectors, and projections.

Properties of the Dot Product

  • Commutative: a · b = b · a
  • Distributive: a · (b + c) = a · b + a · c
  • Scalar Multiplication: (ka) · b = k(a · b)
  • Orthogonal Vectors: If a · b = 0, the vectors are perpendicular (90°)
  • Parallel Vectors: If a · b = |a||b|, the vectors point in the same direction (0°)
  • Anti-parallel Vectors: If a · b = -|a||b|, the vectors point in opposite directions (180°)

Applications of the Dot Product

  • Physics: Calculating work done (W = F · d)
  • Computer Graphics: Lighting calculations and shading
  • Machine Learning: Similarity measures and cosine similarity
  • Projection: Finding the component of one vector along another
  • Angle Detection: Determining if vectors are parallel, perpendicular, or at an angle

Scalar and Vector Projection

The scalar projection of a onto b is:

projₛ(a onto b) = (a · b) / |b|

The vector projection of a onto b is:

projᵥ(a onto b) = ((a · b) / |b|²) × b

Frequently Asked Questions

What does a zero dot product mean?

A dot product of zero indicates the two vectors are perpendicular (orthogonal) to each other, meaning they meet at a 90° angle.

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

The dot product produces a scalar (single number) and measures how much vectors point in the same direction. The cross product produces a vector perpendicular to both inputs and measures the area of the parallelogram they form.

Can I use the dot product with 2D vectors?

Yes! Simply use a · b = a₁b₁ + a₂b₂. This calculator supports both 2D (leave z as 0) and 3D vectors.

How do I know if vectors point in the same direction?

If the dot product is positive, they generally point in the same direction (angle < 90°). If negative, they point in opposite directions (angle > 90°).

Understanding Your Results

Dot Product (Scalar Result)

The primary result is a single number. A positive value means vectors point in the same general direction, while a negative value means they point away from each other.

Angle Between Vectors

This tells you exactly how much the vectors diverge. 0° means they are identical in direction, 90° means they are perfectly perpendicular, and 180° means they point in opposite directions.

Projections

The scalar projection tells you the "length" of Vector A that lies along Vector B. The vector projection provides this as an actual vector in 3D space.

Important Limitations

  • This calculator assumes standard Euclidean space.
  • Floating point precision may result in very small non-zero values for theoretically zero results.
  • Vectors must have the same number of components (3D in this tool).

Disclaimer: This calculator is for educational and informational purposes. While highly accurate for mathematical calculations, it should not be the sole basis for critical engineering or scientific decisions without verification.