Jump to content

Dot product

From Simple English Wikipedia, the free encyclopedia

Inmathematics,thedot productis an operation that takes twovectorsas input, and that returns ascalarnumberas output. The number returned is dependent on the length of both vectors, and on theanglebetween them. The name is derived from thecentered dot"·" that is often used to designate this operation.[1]Another name isscalar product.It emphasizes thescalar(rather thanvector) nature of the result.

Inthree-dimensional space,the dot product contrasts with thecross product,which produces a vector as result.

Definition[change|change source]

The dot product of two vectorsa= [a1,a2,...,an] andb= [b1,b2,...,bn] is defined as:[2]

where Σ denotessummation notation(the sum of all the terms) andnis thedimensionof thevector space.

In dimension 2, the dot product of vectors [a,b] and [c,d] is ac + bd. The same way, in a dimension 3, the dot product of vectors [a,b,c] and [d,e,f] is ad + be + cf. For example, the dot product of two three-dimensional vectors [1, 3, −5] and [4, −2, −1] is

Geometric interpretation[change|change source]

AB= |A| |B| cos(θ).
|A| cos(θ) is thescalar projectionofAontoB.

Vector Projection[change|change source]

The dot product of two vectorsaandbcan be interpreted as theproductof two lengths: the length ofaorthogonally projectedontob,and the length ofbitself. This can be written as,where θ (theta) is the angle between the two vectors. In the diagram shown,is the length ofaorthogonally projected ontob,found usingtrigonometry.

The formulacan be used to find certain properties.

Rotation[change|change source]

Arotationof the orthonormal basis in terms of which vectorais represented is obtained with a multiplication ofaby arotation matrixR.Thismatrix multiplicationis just a compact representation of a sequence of dot products.

For instance, let

  • B1= {x,y,z} andB2= {u,v,w} be two differentorthonormal basesof the same spaceR3,withB2obtained by just rotatingB1,
  • a1= (ax,ay,az) represent vectorain terms ofB1,
  • a2= (au,av,aw) represent the same vector in terms of the rotated basisB2,
  • u1,v1,w1be the rotated basis vectorsu,v,wrepresented in terms ofB1.

Then the rotation fromB1toB2is performed as follows:

Notice that the rotation matrixRis assembled by using the rotated basis vectorsu1,v1,w1as its rows, and these vectors are unit vectors. By definition,Ra1consists of a sequence of dot products between each of the three rows ofRand vectora1.Each of these dot products determines a scalar component ofain the direction of a rotated basis vector (see previous section).

Ifa1is arow vector,rather than acolumn vector,thenRmust contain the rotated basis vectors in its columns, and must post-multiplya1:

Physics[change|change source]

Inphysics,magnitude is ascalarin the physical sense, in that it is aphysical quantityindependent of the coordinate system, expressed as theproductof anumerical valueand aphysical unit,not just a number. The dot product is also a scalar in this sense, given by the formula, independent of the coordinate system. For example:

Properties[change|change source]

The following properties hold ifa,b,andcare realvectorsandris ascalar.

The dot product iscommutative:[3]

The dot product isdistributiveover vector addition:

The dot product isbilinear:

When multiplied by a scalar value, dot product satisfies:

(these last two properties follow from the first two).

Two non-zero vectorsaandbareperpendicularif and only ifab= 0.

Unlike multiplication of ordinary numbers, where ifab=ac,thenbalways equalscunlessais zero, the dot product does not obey thecancellation law:

Ifab=acanda0,then we can write:a• (bc) = 0 by thedistributive law;the result above says this just means thatais perpendicular to (bc), which still allows (bc) ≠0,and thereforebc.

Provided that the basis is orthonormal, the dot product is invariant under isometric changes of the basis: rotations, reflections, and combinations, keeping the origin fixed. The above mentioned geometric interpretation relies on this property. In other words, for an orthonormal space with any number of dimensions, the dot product is invariant under acoordinate transformationbased on anorthogonal matrix.This corresponds to the following two conditions:

  • The new basis is again orthonormal (that is, orthonormal expressed in the old one).
  • The new base vectors have the same length as the old ones (that is, unit length in terms of the old basis).

Ifaandbare functions, then the derivative ofabisa'b+ab'.

Triple product expansion[change|change source]

This is a very useful identity (also known asLagrange's formula) involving the dot- andcross-products.It is written as

which iseasier to rememberas "BAC minus CAB", keeping in mind which vectors are dotted together. This formula is commonly used to simplify vector calculations inphysics.

Proof of the geometric interpretation[change|change source]

Consider the element ofRn

Repeated application of thePythagorean theoremyields for its length |v|

But this is the same as

so we conclude that taking the dot product of a vectorvwith itself yields the squared length of the vector.

Lemma1

Now consider two vectorsaandbextending from the origin, separated by an angle θ. A third vectorcmay be defined as

creating a triangle with sidesa,b,andc.According to thelaw of cosines,we have

Substituting dot products for the squared lengths according to Lemma 1, we get

(1)

But ascab,we also have

,

which, according to thedistributive law,expands to

(2)

Merging the twoccequations,(1)and(2),we obtain

Subtractingaa+bbfrom both sides and dividing by −2 leaves

Q.E.D.

Generalization[change|change source]

Theinner productgeneralizes the dot product toabstract vector spacesand is usually denoted by.[1]Due to the geometric interpretation of the dot product, thenorm||a|| of a vectorain such aninner product spaceis defined as

such that it generalizes length, and the angle θ between two vectorsaandbby

In particular, two vectors are consideredorthogonalif their inner product is zero

For vectors with complex entries, using the given definition of the dot product would lead to quite different geometric properties. For instance, the dot product of a vector with itself can be an arbitrary complex number, and can be zero without the vector being the zero vector; this in turn would have severe consequences for notions like length and angle. Many geometric properties can be salvaged, at the cost of giving up the symmetric and bilinear properties of the scalar product, by alternatively defining

wherebiis thecomplex conjugateofbi.Then the scalar product of any vector with itself is a non-negative real number, and it is nonzero except for the zero vector. However, this scalar product is not linear inb(but ratherconjugate linear), and the scalar product is not symmetric either, since

.

This type of scalar product is nevertheless quite useful, and leads to the notions ofHermitian formand of generalinner product spaces.

TheFrobenius inner productgeneralizes the dot product to matrices. It is defined as the sum of the products of the corresponding components of two matrices having the same size.

Generalization to tensors[change|change source]

The dot product between atensorof order n and a tensor of order m is a tensor of order n+m-2. The dot product is worked out by multiplying and summing across a single index in both tensors. Ifandare two tensors with element representationandthe elements of the dot productare given by

This definition naturally reduces to the standard vector dot product when applied to vectors, and matrix multiplication when applied to matrices.

Occasionally, a double dot product is used to represent multiplying and summing across two indices. The double dot product between two 2nd order tensors is a scalar.

Related pages[change|change source]

References[change|change source]

  1. 1.01.1"Comprehensive List of Algebra Symbols".Math Vault.2020-03-25.Retrieved2020-09-06.
  2. Weisstein, Eric W."Dot Product".mathworld.wolfram.Retrieved2020-09-06.
  3. Nykamp, Duane."The dot product".Math Insight.RetrievedSeptember 6,2020.

Other websites[change|change source]