Key takeaways
- a · b = a₁b₁ + a₂b₂ + a₃b₃: multiply matching parts and add.
- The answer is a single number, not a vector.
- Positive means roughly the same direction, 0 means perpendicular, negative means roughly opposite.
- cos θ = (a · b) ÷ (|a| × |b|) gives the angle between two vectors.
In this guide
What is the dot product?
A vector is a list of numbers that describes a direction and a size, like (1, 2, 3). The dot product of two vectors multiplies their matching parts and adds the results. It is also called the scalar product, because the answer is a plain number (a scalar).
Why does the dot product matter?
The dot product measures how much two vectors agree in direction. That single idea powers a lot: finding angles, checking for right angles, working out physical work, and comparing how similar two lists of numbers are.
Quantities (2, 3, 1) and prices (4, 5, 10): the dot product is 2 × 4 + 3 × 5 + 1 × 10 = 33. That is simply your total bill.
The formula
| Symbol | What it means | Example |
|---|---|---|
| a = (a₁, a₂, a₃) | The first vector | (2, 3, 1) |
| b = (b₁, b₂, b₃) | The second vector | (4, 5, 10) |
| a₁b₁ | First components multiplied | 2 × 4 = 8 |
| a · b | The dot product (a number) | 33 |
There is also a geometric form: a · b = |a| × |b| × cos θ, where θ is the angle between the vectors. For 2D vectors, set a₃ and b₃ to 0.
How to calculate the dot product step by step
- 1Multiply the first components. a₁ × b₁.
- 2Multiply the second components. a₂ × b₂.
- 3Multiply the third components. a₃ × b₃.
- 4Add the three products. The total is a · b.
Now enter your own two vectors in the calculator below.
Try it yourself
Pre-filled with the example — change any value.
Common mistakes to avoid
- Multiplying the wrong components. Always pair first with first, second with second, third with third.
- Sign errors with negatives.
(−2) × 3 = −6. - Thinking 0 means an error. A dot product of 0 means the vectors are perpendicular.
Tips and tricks
| Dot product | Angle between vectors |
|---|---|
| Positive | Less than 90° |
| Zero | Exactly 90° |
| Negative | More than 90° |
- Perpendicular test: (1, 2, 0) · (2, −1, 0) =
2 − 2 = 0, so they meet at a right angle. - Lengths come from the vector magnitude calculator. A vector dotted with itself gives its length squared.
Where you'll use it in real life
- Physics: work done is force · distance.
- Shopping and business: a bill is quantities · prices.
- 3D games: lighting depends on the dot product of the light direction and the surface direction.
- Machine learning: measuring how similar two lists of numbers are.
Quick summary
The dot product multiplies matching components of two vectors and adds them, giving one number. Its sign tells you the rough direction, and with the lengths it gives the exact angle. Use the calculator above to find any dot product with every step shown.
Worked example
At a stall you buy 2 notebooks, 3 pens and 1 bag. They cost $4, $5 and $10 each. The quantity vector is (2, 3, 1) and the price vector is (4, 5, 10), so their dot product is your total bill.
- 01a · b = a₁b₁ + a₂b₂ + a₃b₃
- 02= (2)(4) + (3)(5) + (1)(10)
- 03= 8 + 15 + 10
- 04a · b = 33
These numbers are pre-filled in the calculator above.
Frequently asked questions
What does a dot product of 0 mean?
The two vectors are perpendicular, meaning they meet at a right angle (90°), as long as neither vector is zero.
What is the difference between dot product and cross product?
The dot product gives a single number that measures how aligned two vectors are. The cross product gives a new vector at right angles to both.
How do I find the angle between two vectors?
Use cos θ = (a · b) ÷ (|a| × |b|), then take the inverse cosine of the result.


