Dot (Scalar) Product

Definition

The dot product, also known as the scalar product, is a fundamental operation, in the field of Mathematics, Physics, and Engineering, that measures how closely two vectors align. The dot product can be defined either algebraically or geometrically.

Algebraically, the dot product is the sum of the products of the corresponding entries of the two sequences of numbers. That is, if we have two vectors a=[a1,a2,,an] and b=[b1,b2,,bn], specified with respect to an orthonormal basis, then the dot product is defined as:

(1)ab=i=1naibi=a1b1+a2b2++anbn

Where denotes summation and n is the dimension of the vector space.

Example

The dot product of vectors [1,3,5] and [4,2,1], in a three-dimensional space, is:

[1,3,5][4,2,1]=(1×4)+(3×2)+(5×1)=46+5=3

If the vectors are identified with column vectors, the dot product is the matrix product ab=aTb, where aT represents the transpose of a.

This matrix multiplication results in the same calculation as the prior equation.

Geometrically, the dot product of two vectors a and b is based on the notion of distance (magnitude) of vectors and the angle between them, and is defined by:

(2)ab=|a||b|cosϕ

where ϕ is the angle between vectors a and b.

Info

The dot product is defined as the product of either vector with the scalar projection of the other onto it. In other words,

ab=|a|ba=|b|ab

where, ba is the projection of b onto a, and ab is the projection of a onto b,

ba=|b|cosϕab=|a|cosϕ

We can then use this to derive (2)

In particular, if the vectors a and b are orthogonal, that is ϕ=90, then cos90=0, which implies that,

ab=0

On the other extreme, if they are codirectional, that is ϕ=0, then cos0=1, which implies that,

ab=|a||b|

which also suggests that the dot product of a vector a with itself is

aa=|a|2

And,

|a|=aa