Vector Multiplication: Dot Product vs Cross Product
Vector multiplication takes two distinct forms. The dot product (scalar product), written as a · b, returns a single number reflecting alignment between vectors. By contrast, the cross product, denoted a × b, yields a new vector perpendicular to both inputs. This fundamental difference makes them useful for different tasks: dot products reveal how parallel two directions are, while cross products find perpendicular directions and areas.
- Dot product output: A scalar (single number)
- Cross product output: A vector (direction and magnitude)
- Dot product sign: Positive when vectors align, negative when opposed, zero when perpendicular
Computing the Dot Product
For two 3D vectors a and b, multiply each corresponding component and sum the results. You can also compute it from magnitude and angle data using the geometric interpretation.
a · b = a₁b₁ + a₂b₂ + a₃b₃
a · b = |a| × |b| × cos(α)
|a| = √(a₁² + a₂² + a₃²)
|b| = √(b₁² + b₂² + b₃²)
a₁, a₂, a₃— Components of the first vectorb₁, b₂, b₃— Components of the second vector|a|, |b|— Magnitudes (lengths) of each vectorα— Angle between the two vectorscos(α)— Cosine of the angle, which relates component and geometric forms
Working Through an Example
Suppose a = [4, 5, −3] and b = [1, −2, −2]. Calculate step-by-step:
- First components: 4 × 1 = 4
- Second components: 5 × (−2) = −10
- Third components: (−3) × (−2) = 6
- Sum: 4 + (−10) + 6 = 0
A dot product of zero means the vectors are perpendicular—they meet at a right angle. Finding the angle from this result: cos(α) = 0 ÷ (|a| × |b|) = 0, so α = 90°.
Geometric Interpretation and Real-World Applications
Geometrically, the dot product measures projection: it tells you the length of one vector's shadow cast onto another, scaled by the second vector's magnitude. This insight powers countless applications:
- Physics: Work = force · displacement; power = force · velocity
- Graphics: Determining surface brightness (light · surface normal)
- Machine learning: Similarity scores between high-dimensional data points
- Navigation: Verifying if a course correction moves toward or away from a goal
The dot product also reveals the law of cosines: c² = a² + b² − 2|a||b|cos(α), which relates the sides and angles of any triangle.
Common Pitfalls and Practical Notes
Avoid these frequent errors when computing or interpreting dot products.
- Confusing dot and cross products — The dot product yields a scalar; the cross product yields a vector. If your result is a single number, you computed a dot product correctly. If you expect a direction, you likely need the cross product instead.
- Forgetting vector orientation in magnitude calculations — The magnitude formula √(x² + y² + z²) treats all components as positive, even negative input values. Squaring eliminates the sign; this is correct and intentional.
- Assuming non-zero angle when dot product is zero — A dot product of exactly zero does not mean the vectors are nearly perpendicular—it means they are exactly perpendicular (90°). Use this test to check orthogonality efficiently.
- Misinterpreting sign in geometric context — A negative dot product arises when the angle between vectors exceeds 90°. This happens whenever one vector points more than 90° away from the other, and it's mathematically valid.