notesonly.in

One notebook for every subject — open it anywhere.

Log in

Dot Scalar Product: Concepts, Formulas and Examples

The dot product (scalar product) multiplies two vectors to give a single number, not a vector. It is defined as a·b = |a||b|cosθ, where θ is the angle between them; in coordinates it is the sum of matching-component products: a·b = a1b1 + a2b2 + a3b3. The dot product measures how much two vectors point in the same direction.

This matters because it answers two questions simply: what is the angle between two vectors, and how much of one vector lies along another. Work done by a force, angles in geometry, and lighting in 3D graphics all run on the dot product.

Key Concepts

  • Geometric meaning: a·b = |a||b|cosθ — the magnitude of a times the projection of b onto a's direction.
  • Sign tells the angle: a·b > 0 means acute (roughly aligned); a·b = 0 means perpendicular; a·b < 0 means obtuse (roughly opposed).
  • Perpendicularity test: for non-zero vectors, a·b = 0 exactly when a and b are perpendicular.
  • Self dot product: a·a = |a|², so dotting a vector with itself gives the square of its magnitude.
  • Projection: the signed length of a's projection on b is (a·b)/|b|; the vector projection is ((a·b)/|b|²)b.
  • Properties: commutative (a·b = b·a), distributive (a·(b+c) = a·b + a·c); î·î = ĵ·ĵ = k̂·k̂ = 1, while î·ĵ = ĵ·k̂ = k̂·î = 0.

Formulas

  • Two forms: a·b = |a||b|cosθ = a1b1 + a2b2 + a3b3. The scalar result takes the product of the units — force (N) times displacement (m) gives work in joules.
  • Angle: cosθ = (a·b)/(|a||b|) for non-zero a, b; θ = arccos of that value, between 0° and 180°.
  • Projection of a on b: (a·b)/|b|. Limit: b must be non-zero — there is no direction to project onto otherwise.

Worked Example

Let a = 2î + 3ĵ − k̂ and b = î − 2ĵ + 4k̂. Find a·b, the angle between them, and the projection of a onto b.

  1. a·b = (2)(1) + (3)(−2) + (−1)(4) = 2 − 6 − 4 = −8.
  2. |a| = √14 ≈ 3.742; |b| = √(1 + 4 + 16) = √21 ≈ 4.583.
  3. cosθ = −8/(√14 × √21) = −8/√294 ≈ −8/17.146 ≈ −0.4666.
  4. θ = arccos(−0.4666) ≈ 117.8° — obtuse, agreeing with the negative dot product.
  5. Projection of a on b: −8/√21 ≈ −1.75. The negative sign means it points opposite to b.
  6. Sanity check: a·a = 4 + 9 + 1 = 14 = |a|². Consistent.

Common Misconceptions

  • "The dot product is a vector." No — it is a scalar. The product of two vectors that returns a vector is the cross product, a separate operation.
  • "a·b = 0 means a vector is zero." For non-zero vectors it is exactly the perpendicularity test — î·ĵ = 0 with neither vector zero.
  • "a·b always equals |a||b|." Only for parallel, same-directed vectors (cosθ = 1). Dropping the cosθ factor is the most common slip.

Real-World Applications

  • Physics — work: W = F·d. Only the force component along the displacement does work; perpendicular force does zero work.
  • Computer graphics: surface brightness follows (surface normal)·(light direction) — facing surfaces score near 1, turned-away ones near 0.
  • Data science: cosine similarity (a·b)/(|a||b|) measures how alike two vectors are, powering search and recommendations.

To recap: the dot product a·b = |a||b|cosθ = a1b1 + a2b2 + a3b3 is a scalar measuring alignment — positive for acute angles, zero for perpendicular vectors, negative for obtuse ones. The example gave a·b = −8, an angle of about 117.8°, and a projection near −1.75. With the dot product you can find angles and projections without drawing a single triangle.