Orthogonality · Definition

Dot product

linear algebraorthogonality

Before you start you need to know

It is the operation that turns two vectors into a number, and through it the geometry of the plane (lengths, angles, perpendicularity) carries over to every \(\mathbb{R}^n\).

Definition

The dot product of two vectors in \(\mathbb{R}^n\) is the number obtained by multiplying their coordinates one by one and adding the results.

\[u\cdot v=u_1v_1+u_2v_2+\dots+u_nv_n\]

The dot product is symmetric, \(u\cdot v=v\cdot u\), and linear in each slot: \((cu+w)\cdot v=c\,(u\cdot v)+w\cdot v\). Moreover \(u\cdot u=u_1^2+\dots+u_n^2\) is never negative and is zero only when \(u=0\). With these rules it behaves like an ordinary product, except that the result is a scalar rather than a vector.

A guiding example: \((1,2,3)\cdot(4,-5,6)=4-10+18=12\). In the plane, \(u\cdot v=\|u\|\|v\|\cos\theta\), where \(\theta\) is the angle between the vectors; the sign of the product therefore tells whether they form an acute angle (positive), a right angle (zero) or an obtuse one (negative). This geometric reading extends to \(\mathbb{R}^n\) and underlies the next two concepts.

Writing vectors as columns, the dot product is the matrix product \(u^{T}v\). Each entry of a matrix product is in fact the dot product of a row with a column. A common mistake is to believe that \(u\cdot v=0\) forces one of them to be zero: it is enough that they be perpendicular, like \((1,0)\) and \((0,1)\). Nor can a factor be «cancelled»: \(u\cdot v=u\cdot w\) only says that \(v-w\) is perpendicular to \(u\).

Think about it

Why does \(u\cdot u=0\) imply \(u=0\)?

Because \(u\cdot u\) is a sum of squares of real numbers; each term is nonnegative and the sum is zero only if all of them are, that is, if every coordinate is zero.

What sign does \(u\cdot v\) have if the angle between the vectors is 120°?

Negative, since \(\cos 120^\circ=-\tfrac12<0\) and the lengths are positive.

Exercises 10

References

  • Gilbert Strang, Introduction to Linear Algebra, 6th edition, Wellesley-Cambridge Press, 2023. §1.2
  • Sheldon Axler, Linear Algebra Done Right, 4th edition, Springer, 2024. §6.A