Dot Products and Orthogonality

The dot product multiplies matching components and sums them. For nonzero real vectors, it relates to the cosine of the angle between them.

Source
Anbloq
Language
English
Created
Updated
Chapters
4
Reading time
1 min
In this article4 chapters
  1. Work a cancellation
  2. Check sizes and scale
  3. Distinguish angle sign from vector length
  4. Keep the zero vector out of angle calculations

Work a cancellation

Vectors \((2,1)\) and \((-1,2)\) give dot product \(-2+2=0\), so they are orthogonal. This is the right angle between two vectors that are both nonzero. The matched terms follow paired iteration.

Check sizes and scale

Multiplying one vector by a positive scalar changes the dot product magnitude but not the angle. Normalize appropriately before using a cosine formula, and handle the zero vector separately. See Euclidean norms.[1][2]

Distinguish angle sign from vector length

The dot product of \((2,1)\) and \((-1,3)\) is one. Both vectors are nonzero, so the normalized dot product is \(1/\sqrt{50}\), a positive cosine corresponding to an acute angle. Replacing the second vector by \((1,-2)\) gives dot product zero. See normalizing vectors.

(2,1)·(-1,3) = -2+3 = 1
(2,1)·(1,-2) = 2-2 = 0
Negating a vector reverses the sign of its dot product

Keep the zero vector out of angle calculations

Its dot product is always zero, but division by its norm is undefined. Near orthogonality, choose a scale-aware tolerance and compare with vector normalization and data uncertainty.

References

  1. Tobin A. Driscoll and Richard J. Braun, Fundamentals of Numerical Computation ↩
  2. Nicholas J. Higham, Accuracy and Stability of Numerical Algorithms ↩