Dot Product
Dot Product
In two dimensions, (ai + bj)•(ci + dj) = ac + bd. In three dimensions, (ai + bj + ck)•(di + ej + fk) = ad + be + cf. In either case, u • v = |u| |v| cos θ, where θ is the angle between the vectors.
See also
Cross product, triple product, cosine
Key Formula
u⋅v=u1v1+u2v2+u3v3=∣u∣∣v∣cosθ
Where:
- u,v = The two vectors being multiplied
- u1,u2,u3 = Components of vector u
- v1,v2,v3 = Components of vector v
- ∣u∣,∣v∣ = Magnitudes (lengths) of the two vectors
- θ = Angle between the two vectors (0° to 180°)
Worked Example
Problem: Find the dot product of u = (3, −2, 5) and v = (4, 6, 1), then use it to find the angle between the two vectors.
Step 1: Multiply corresponding components and add them together.
u⋅v=(3)(4)+(−2)(6)+(5)(1)=12−12+5=5
Step 2: Find the magnitude of each vector.
∣u∣=32+(−2)2+52=38,∣v∣=42+62+12=53
Step 3: Use the geometric formula to solve for the angle θ.
cosθ=∣u∣∣v∣u⋅v=38⋅535=20145≈0.1114
Step 4: Take the inverse cosine to find the angle.
θ=cos−1(0.1114)≈83.6°
Answer: The dot product is 5, and the angle between the vectors is approximately 83.6°.
Another Example
Problem: Determine whether the vectors a = (2, 6) and b = (9, −3) are perpendicular.
Step 1: Compute the dot product of the two vectors.
a⋅b=(2)(9)+(6)(−3)=18−18=0
Step 2: Since the dot product equals zero, cos θ = 0, which means θ = 90°. The vectors are perpendicular.
Answer: Yes, the vectors are perpendicular because their dot product is 0.
Frequently Asked Questions
What does it mean when the dot product is zero?
A dot product of zero means the two vectors are perpendicular (orthogonal) — they meet at a 90° angle. This follows directly from the formula: since cos 90° = 0, the entire product becomes zero regardless of the vectors' magnitudes.
What is the difference between the dot product and the cross product?
The dot product returns a scalar (a single number) and measures how parallel two vectors are. The cross product returns a new vector that is perpendicular to both original vectors and measures how perpendicular they are. The dot product uses cosine of the angle; the cross product uses sine.
Dot Product vs. Cross Product
The dot product produces a scalar and equals |u||v| cos θ. The cross product produces a vector and has magnitude |u||v| sin θ. The dot product is defined for vectors in any number of dimensions, while the cross product (as a vector) is defined only in three dimensions. Use the dot product to find angles or projections; use the cross product to find a direction perpendicular to a plane or to compute area.
Why It Matters
The dot product is essential for finding the angle between two vectors, which arises constantly in physics and engineering. It is used to calculate work (force dotted with displacement), to project one vector onto another, and to test whether two directions are perpendicular. In computer graphics, dot products determine how light reflects off surfaces.
Common Mistakes
Mistake: Thinking the dot product produces a vector.
Correction: The dot product always produces a scalar (a number), not a vector. If you need a vector result, you may be looking for the cross product instead.
Mistake: Forgetting to include the negative sign on components when multiplying.
Correction: Pay careful attention to signs. For example, if one component is −2 and the other is 6, their product is −12, not 12. A sign error will give you the wrong dot product and the wrong angle.
Related Terms
- Vector — The objects the dot product operates on
- Cross Product — Vector-valued product of two vectors
- Triple (Scalar) Product — Dot product combined with a cross product
- Cosine — Trig function used in the geometric formula
- Angle — Found between vectors using the dot product
- Two Dimensions — Dot product with two-component vectors
- Three Dimensions — Dot product with three-component vectors
