Dot Product Formula- Vector Multiplication Explained
What Is the Dot Product?
The dot product (also called the scalar product) takes two vectors and spits out a single number. That's it. No angles, no cross products, just multiplication and addition.
You use it when you need to know how much one vector points in the direction of another. That's the core idea. Everything else builds from there.
The Two Formulas You Need to Know
There are two ways to calculate the dot product. Pick the one that fits your situation.
Formula 1: Component Form
If you have the components of both vectors, multiply matching components and add them up:
a · b = a₁b₁ + a₂b₂ + ... + aₙbₙ
For 2D vectors a = ⟨a₁, a₂⟩ and b = ⟨b₁, b₂⟩:
a · b = a₁b₁ + a₂b₂
Formula 2: Geometric Form
If you know the magnitudes and the angle between them:
a · b = |a| |b| cos(θ)
The angle θ is the smallest angle between the two vectors when placed tail-to-tail.
How to Calculate It: Step-by-Step
Let's say you have u = ⟨3, 4⟩ and v = ⟨2, 1⟩.
Step 1: Write down the components. u has (3, 4), v has (2, 1).
Step 2: Multiply matching components. 3 × 2 = 6, and 4 × 1 = 4.
Step 3: Add the results. 6 + 4 = 10.
Your dot product is 10. That's the whole process.
What the Result Tells You
The dot product sign matters:
- Positive → vectors point in roughly the same direction (angle < 90°)
- Zero → vectors are perpendicular (orthogonal)
- Negative → vectors point in opposite directions (angle > 90°)
That's useful. The sign alone tells you the geometric relationship between vectors.
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)
- Self-dot product: a · a = |a|²
These properties make algebraic manipulation straightforward. You can rearrange dot product expressions like regular multiplication in most cases.
Finding the Angle Between Vectors
Rearrange the geometric formula to solve for the angle:
cos(θ) = (a · b) / (|a| |b|)
Then use inverse cosine to get θ. This only works when the result is between -1 and 1, which it always will be for valid vectors.
Dot Product vs Cross Product
Don't confuse these. They do different things.
| Feature | Dot Product | Cross Product |
|---|---|---|
| Result | Scalar (number) | Vector |
| Works in | Any dimension | 3D only |
| Measures | Alignment/direction agreement | Area of parallelogram/perpendicular direction |
If you need a number describing how much vectors align, use dot product. If you need a perpendicular vector or area, use cross product.
Where the Dot Product Shows Up
Physics uses it constantly. Work = F · d is just force dotted with displacement. The component of force in the direction of motion gives you the work done.
Computer graphics use dot products for lighting calculations. The angle between a light vector and a surface normal determines brightness.
Machine learning uses dot products in neural networks. Each neuron computes a weighted sum, which is a dot product, then applies an activation function.
Projection problems rely on dot products. Projecting vector a onto vector b involves (a · b) / |b|.
Common Mistakes to Avoid
- Multiplying wrong components together — match a₁ with b₁, a₂ with b₂, not a₁ with b₂
- Forgetting to take the square root when finding magnitudes for the geometric formula
- Confusing dot product with cross product — check what result type you need
- Using degrees in calculators when the formula expects radians (or vice versa)
Getting Started: Practice Problem
Find the dot product of a = ⟨1, 2, 3⟩ and b = ⟨4, -5, 6⟩.
Solution: (1 × 4) + (2 × -5) + (3 × 6) = 4 - 10 + 18 = 12.
The dot product is 12. Positive, so the vectors point more in the same direction than opposite.
Now find the angle between them. First find the magnitudes: |a| = √(1+4+9) = √14 ≈ 3.74, |b| = √(16+25+36) = √77 ≈ 8.77.
cos(θ) = 12 / (3.74 × 8.77) = 12 / 32.8 ≈ 0.366.
θ = cos⁻¹(0.366) ≈ 68.5°.
That's your angle between the vectors.
The Bottom Line
The dot product formula is straightforward: multiply matching components, add them up. That's all most problems need.
The geometric form becomes essential when you don't have components or need to find an angle. Both formulas give the same result — use whichever is faster.
Master these two forms and the properties, and you'll handle dot products in physics, graphics, and math without breaking a sweat.