Dot Product Calculator
Enter two vectors with values separated by commas or spaces. Example: 3, 4, -2
The dot product is one of the most useful operations in linear algebra, geometry, physics, machine learning, and computer graphics. This page gives you a fast way to compute it and understand what the result means.
What Is a Dot Product?
The dot product takes two vectors of equal length and returns a single number (a scalar). If you have vectors A = (a1, a2, ... an) and B = (b1, b2, ... bn), then:
A · B = a1b1 + a2b2 + ... + anbn
This is why it is sometimes called the scalar product: the output is a number, not a vector.
Geometric Interpretation
The dot product also connects to the angle between vectors:
A · B = |A||B|cos(θ)
- If the dot product is positive, the angle is acute (less than 90°).
- If the dot product is zero, vectors are orthogonal (perpendicular).
- If the dot product is negative, the angle is obtuse (greater than 90°).
How to Use This Dot Calculator
- Enter the first vector in Vector A.
- Enter the second vector in Vector B.
- Pick decimal precision for the output.
- Click Calculate Dot Product.
The tool returns:
- Dot product value
- Magnitude of each vector
- Cosine of the angle between vectors
- Angle in degrees (when defined)
- Interpretation (acute, orthogonal, obtuse, or undefined)
Worked Examples
2D Example
Let A = (2, 5) and B = (4, -1).
A · B = (2×4) + (5×-1) = 8 - 5 = 3
The result is positive, so the vectors point in roughly similar directions.
3D Example
Let A = (1, 2, 3) and B = (4, 5, 6).
A · B = (1×4) + (2×5) + (3×6) = 4 + 10 + 18 = 32
This larger positive value indicates significant directional alignment.
Common Real-World Uses
- Physics: Work = force · displacement.
- Computer graphics: Lighting calculations and surface orientation.
- Machine learning: Similarity scoring in high-dimensional data.
- Signal processing: Correlation and projections.
- Navigation and robotics: Direction checks and motion planning.
Frequent Mistakes to Avoid
- Using vectors with different dimensions.
- Forgetting negative signs during multiplication.
- Confusing dot product with cross product.
- Trying to compute angle when one vector is the zero vector.
Quick FAQ
Can the vectors contain decimals?
Yes. This calculator supports integers and decimal values.
Can I separate values with spaces instead of commas?
Yes. Both commas and spaces are accepted.
What happens with a zero vector?
The dot product still computes, but the angle is undefined because division by zero magnitude is not possible.
Use this tool whenever you need fast, reliable vector math without manual errors.