Lably
Skip to content

Dot product

Algebraic operation on coordinate vectors

  • 10 min read
  • 6 chapters
  • 1 lab on Lably

Learn it on Lably

Algebraically, the dot product is the sum of the products of the corresponding entries of the two sequences of numbers. Geometrically, the scalar product of two vectors is the product of their lengths and the cosine of the angle between them. These definitions are equivalent when using Cartesian coordinates. In modern geometry, Euclidean spaces are often defined by used vector spaces. In this case, the scalar product is used for defining lengths (the length of a vector is the square root of the scalar product of the vector by itself) and angles (the cosine of the angle between two vectors is the quotient of their scalar product by the product of their lengths).

The name "dot product" is derived from the dot operator " ⋅ " that is often used to designate this operation; the alternative name "scalar product" emphasizes that the result is a scalar, rather than a vector (as with the vector product in three-dimensional space).

Definition

The dot product may be defined algebraically or geometrically. The geometric definition is based on the notions of angle and distance (magnitude) of vectors. The equivalence of these two definitions relies on having a Cartesian coordinate system for Euclidean space.

In modern presentations of Euclidean geometry, the points of space are defined in terms of their Cartesian coordinates, and Euclidean space itself is commonly identified with the real coordinate space Rn. In such a presentation, the notions of length and angle are defined by means of the dot product. The length of a vector is defined as the square root of the dot product of the vector by itself, and the cosine of the (non oriented) angle between two vectors of length one is defined as their dot product. So the equivalence of the two definitions of the dot product is a part of the equivalence of the classical and the modern formulations of Euclidean geometry.

Coordinate definition

The dot product of two vectors a=[a1,a2,⋯,an] and b=[b1,b2,⋯,bn], specified with respect to an orthonormal basis, is defined, in summation notation, as:

a⋅b=∑i=1naibi=a1b1+a2b2+⋯+anbn

where n is the dimension of the vector space. For instance, in three-dimensional space, the dot product of vectors [1,3,−5] and [4,−2,−1] is:

[1,3,−5]⋅[4,−2,−1]=(1×4)+(3×−2)+(−5×−1)=4−6+5=3

If vectors are identified with column vectors, the dot product can also be written as a matrix product a⋅b=aTb, where aT denotes the transpose of a.

Expressing the above example in this way, a 1 × 3 matrix (row vector) is multiplied by a 3 × 1 matrix (column vector) to get a 1 × 1 matrix that is identified with its unique entry: [13−5][4−2−1]=[3]

Likewise, the dot product of the vector [1,3,−5] with itself is: [1,3,−5]⋅[1,3,−5]=(1×1)+(3×3)+(−5×−5)=1+9+25=35

Geometric definition

In Euclidean space, a Euclidean vector is a geometric object that possesses both a magnitude and a direction. A vector can be pictured as an arrow. Its magnitude is its length, and its direction is the direction to which the arrow points. The magnitude of a vector a is denoted by ‖a‖. The dot product of two Euclidean vectors a and b is defined by a⋅b=‖a‖‖b‖cos⁡θ, where θ is the angle between a and b.

In particular, if the vectors a and b are orthogonal (i.e., their angle is π2 or 90∘), then cos⁡π2=0, which implies that a⋅b=0. At the other extreme, if they are codirectional, then the angle between them is zero with cos⁡0=1 and a⋅b=‖a‖‖b‖ This implies that the dot product of a vector a with itself is a⋅a=‖a‖2, which gives ‖a‖=a⋅a, the formula for the Euclidean length of the vector.

Scalar projection and first properties

The scalar projection (or scalar component) of a Euclidean vector a in the direction of a Euclidean vector b is given by ab=‖a‖cos⁡θ, where θ is the angle between a and b.

In terms of the geometric definition of the dot product, this can be rewritten as ab=a⋅b^, where b^=b/‖b‖ is the unit vector in the direction of b.

The dot product is thus characterized geometrically by a⋅b=ab‖b‖=ba‖a‖. The dot product, defined in this manner, is homogeneous under scaling in each variable, meaning that for any scalar α, (αa)⋅b=α(a⋅b)=a⋅(αb). It also satisfies the distributive law, meaning that a⋅(b+c)=a⋅b+a⋅c.

These properties may be summarized by saying that the dot product is a bilinear form. Moreover, this bilinear form is positive definite, which means that a⋅a is never negative, and is zero if and only if a=0, the zero vector.

Equivalence of the definitions

If e1,⋯,en are the standard basis vectors in Rn, then we may write a=[a1,…,an]=∑iaieib=[b1,…,bn]=∑ibiei. The vectors ei are an orthonormal basis, which means that they have unit length and are at right angles to each other. Since these vectors have unit length, ei⋅ei=1 and since they form right angles with each other, if i≠j, ei⋅ej=0. Thus in general, we can say that: ei⋅ej=δij, where δij is the Kronecker delta.

Also, by the geometric definition, for any vector ei and a vector a, we note that a⋅ei=‖a‖‖ei‖cos⁡θi=‖a‖cos⁡θi=ai, where ai is the component of vector a in the direction of ei. The last step in the equality can be seen from the figure.

Now applying the distributivity of the geometric version of the dot product gives a⋅b=a⋅∑ibiei=∑ibi(a⋅ei)=∑ibiai=∑iaibi, which is precisely the algebraic definition of the dot product. So the geometric dot product equals the algebraic dot product.

Sign in to keep reading

5 more chapters are free with a Lably account.

More in Algebra