Enter numbers separated by commas or spaces (for example: 1, 2, 3 or 1 2 3).
What is the dot product?
The dot product (also called the scalar product) is a way to multiply two vectors and get a single number. If two vectors have the same dimension, the dot product tells you how much one vector points in the same direction as the other.
a · b = a1b1 + a2b2 + a3b3 + ... + anbn
How this dot product calculator works
This calculator takes two input vectors, multiplies matching components, and then adds those products together. It also reports helpful geometric information:
- Dot product value (a single scalar)
- Magnitude of each vector
- Angle between vectors (in degrees, when possible)
Step-by-step example
Suppose you enter A = [1, 2, 3] and B = [4, 5, 6]. The dot product is:
(1×4) + (2×5) + (3×6) = 4 + 10 + 18 = 32
So, A · B = 32.
Geometric meaning
The dot product is tied to the angle between vectors:
a · b = |a||b|cos(θ)
From this relationship:
- If the dot product is positive, vectors point in a generally similar direction.
- If it is zero, vectors are perpendicular (orthogonal).
- If it is negative, vectors point in generally opposite directions.
Why dot products matter
1) Physics
Work done by a force is a dot product: Work = Force · Displacement. Only the component of force in the direction of movement contributes to work.
2) Computer graphics
Dot products are used for lighting calculations, shading, reflections, and determining whether surfaces face toward or away from a light source.
3) Machine learning and data science
Similarity measures, linear models, projections, and attention mechanisms all rely heavily on dot products.
Common input mistakes to avoid
- Using vectors with different dimensions (e.g., 3D with 4D).
- Entering non-numeric values.
- Forgetting separators between numbers.
- Using empty inputs.
Quick interpretation guide
- Large positive value: strong alignment.
- Near zero: almost perpendicular.
- Large negative value: strong opposition in direction.
Final thoughts
The dot product is one of the most practical vector operations in mathematics, engineering, and computing. Use the calculator above to check homework, verify vector operations, or quickly analyze direction and similarity.