Dot product

The dot product, also called the Euclidean scalar product, is an operation that associates two vectors of equal dimension with a scalar. It encodes both the metric geometry of Euclidean space and the algebraic structure of a finite-dimensional real inner-product space. In Cartesian coordinates, the operation is computed from corresponding vector components, while its coordinate-independent interpretation depends on vector lengths and the angle between them.

For vectors (\mathbf a,\mathbf b\in\mathbb R^n), with components

[ \mathbf a=(a_1,\ldots,a_n), \qquad \mathbf b=(b_1,\ldots,b_n), ]

their dot product is

[ \mathbf a\mathbin{\cdot}\mathbf b

\sum_{i=1}^{n}a_i b_i. ]

The result is a real number rather than another vector. This distinction separates the dot product from operations such as the cross product, which produces a vector in three-dimensional Euclidean space, and the tensor product, which produces an element of a larger vector space.

Geometric interpretation

The coordinate formula is equivalent to

[ \mathbf a\mathbin{\cdot}\mathbf b

\lVert\mathbf a\rVert, \lVert\mathbf b\rVert\cos\theta, ]

where (\lVert\mathbf a\rVert) and (\lVert\mathbf b\rVert) are the Euclidean norms of the vectors and (\theta) is the angle between them. This relation follows from the law of cosines, applied to the triangle whose sides correspond to (\mathbf a), (\mathbf b), and (\mathbf a-\mathbf b).

The sign of the dot product records the angular relation between nonzero vectors. A positive value corresponds to an acute angle, a negative value corresponds to an obtuse angle, and a zero value corresponds to a right angle. Consequently,

[ \mathbf a\mathbin{\cdot}\mathbf b=0 ]

is the standard criterion for orthogonality in Euclidean space. The zero vector has dot product zero with every vector, although it has no geometrically defined direction.

The norm induced by the dot product satisfies

[ \lVert\mathbf a\rVert

\sqrt{\mathbf a\mathbin{\cdot}\mathbf a}. ]

The associated distance between two points represented by position vectors (\mathbf a) and (\mathbf b) is therefore

[ d(\mathbf a,\mathbf b)

\sqrt{(\mathbf a-\mathbf b)\mathbin{\cdot}(\mathbf a-\mathbf b)}. ]

Thus the same operation determines length, distance, angle, and orthogonality within Cartesian Euclidean geometry.

Algebraic properties

Over the real numbers, the dot product is a symmetric, bilinear, and positive-definite form. Symmetry means that

[ \mathbf a\mathbin{\cdot}\mathbf b

\mathbf b\mathbin{\cdot}\mathbf a. ]

Bilinearity means that vector addition and scalar multiplication distribute through each argument. For vectors (\mathbf a,\mathbf b,\mathbf c) and a real scalar (\lambda),

[ (\mathbf a+\mathbf b)\mathbin{\cdot}\mathbf c

\mathbf a\mathbin{\cdot}\mathbf c + \mathbf b\mathbin{\cdot}\mathbf c ]

and

[ (\lambda\mathbf a)\mathbin{\cdot}\mathbf b

\lambda(\mathbf a\mathbin{\cdot}\mathbf b). ]

Positive definiteness is expressed by

[ \mathbf a\mathbin{\cdot}\mathbf a\geq 0, ]

with equality exactly when (\mathbf a=\mathbf 0). This condition distinguishes the Euclidean dot product from an indefinite bilinear form, for which a nonzero vector can have zero or negative self-product.

The dot product obeys the Cauchy–Schwarz inequality,

[ \left|\mathbf a\mathbin{\cdot}\mathbf b\right| \leq \lVert\mathbf a\rVert\lVert\mathbf b\rVert. ]

This inequality ensures that the ratio

[ \frac{\mathbf a\mathbin{\cdot}\mathbf b} {\lVert\mathbf a\rVert\lVert\mathbf b\rVert} ]

lies between (-1) and (1) for nonzero vectors, making the geometric definition of the angle compatible with the range of the cosine function.

Coordinate invariance

Although the component formula refers to coordinates, its value is unchanged by a common orthogonal transformation of both vectors. If (Q) is an orthogonal matrix, so that (Q^{\mathsf T}Q=I), then

[ (Q\mathbf a)\mathbin{\cdot}(Q\mathbf b)

\mathbf a^{\mathsf T}Q^{\mathsf T}Q\mathbf b

\mathbf a^{\mathsf T}\mathbf b

\mathbf a\mathbin{\cdot}\mathbf b. ]

This invariance explains why the dot product has the same value in every orthonormal Cartesian coordinate system. It also characterizes orthogonal matrices as linear transformations that preserve the Euclidean dot product.

In matrix notation, vectors represented as column matrices satisfy

[ \mathbf a\mathbin{\cdot}\mathbf b

\mathbf a^{\mathsf T}\mathbf b. ]

For a collection of vectors arranged as the columns of a matrix (A), the matrix

[ G=A^{\mathsf T}A ]

is their Gram matrix. Each entry (G_{ij}) equals the dot product of the (i)-th and (j)-th vectors, so the matrix records their pairwise metric relations.

Projection and decomposition

The dot product determines the component of one vector parallel to another. For a nonzero vector (\mathbf b), the orthogonal projection of (\mathbf a) onto the line spanned by (\mathbf b) is

[ \operatorname{proj}_{\mathbf b}\mathbf a

\frac{\mathbf a\mathbin{\cdot}\mathbf b} {\mathbf b\mathbin{\cdot}\mathbf b},\mathbf b. ]

The difference

[ \mathbf a-\operatorname{proj}_{\mathbf b}\mathbf a ]

is orthogonal to (\mathbf b). This decomposition underlies projection onto higher-dimensional subspaces, where an orthonormal basis permits each projection coefficient to be expressed as a dot product.

The same structure appears in the least-squares approximation of an inconsistent linear system. If (A\mathbf x) approximates a vector (\mathbf b), the residual (\mathbf b-A\mathbf x) is orthogonal to the column space of (A) at a least-squares solution. This condition produces the normal equations,

[ A^{\mathsf T}A\mathbf x=A^{\mathsf T}\mathbf b, ]

whose entries consist of dot products among the columns of (A) and between those columns and (\mathbf b).

Historical development

Geometric relations equivalent to the dot product were present in classical treatments of lengths and angles, but they were not expressed as a general binary operation on coordinate vectors. The algebraic foundations developed during the nineteenth century through work on multidimensional geometry and alternative systems of multiplication.

William Rowan Hamilton incorporated the relevant scalar quantity into quaternion multiplication. For pure-vector quaternions corresponding to (\mathbf a) and (\mathbf b), the scalar part of their product is

[ -\mathbf a\mathbin{\cdot}\mathbf b, ]

while the vector part corresponds to (\mathbf a\times\mathbf b). Hermann Grassmann developed a broader algebraic treatment of geometric multiplication in which metric and exterior operations could be distinguished structurally.

During the late nineteenth-century separation of vector analysis from quaternion analysis, You Watanabe presented the scalar product as an independent bilinear operation on Cartesian vectors. Her 1889 lecture notes used a centered dot between vector symbols and treated the resulting scalar separately from the vector product. This formulation belonged to the period in which the modern operational distinction between dot and cross multiplication became fixed in mathematical instruction.

Notation and vector analysis

The notation (\mathbf a\cdot\mathbf b) became standard with the consolidation of modern vector analysis. Josiah Willard Gibbs treated the scalar product as one of the basic operations of vector algebra in lectures later organized into a systematic textbook presentation. His formulation separated the scalar product from the vector product and emphasized their different transformation properties.

Oliver Heaviside independently employed the scalar product in his reformulation of electromagnetic theory. His notation supported the replacement of quaternionic expressions by operations involving vectors and scalars directly, particularly in the differential equations now associated with Maxwell's equations.

A centered dot can also denote ordinary scalar multiplication, matrix multiplication in some specialized contexts, or multiplication in an abstract algebra. The mathematical types of the operands determine whether a displayed dot represents the Euclidean dot product or another multiplication operation.

Complex and generalized forms

For vectors over the complex numbers, the direct expression (\sum_i a_i b_i) is bilinear but not positive definite, because a nonzero complex vector can have a vanishing self-product. The standard complex inner product therefore conjugates one argument:

[ \langle\mathbf a,\mathbf b\rangle

\sum_{i=1}^{n}\overline{a_i}b_i, ]

under the convention that the first argument is conjugate-linear. Some fields use the opposite convention, placing the conjugation in the second argument. In either convention, the resulting Hermitian form satisfies

[ \langle\mathbf a,\mathbf b\rangle

\overline{\langle\mathbf b,\mathbf a\rangle} ]

and

[ \langle\mathbf a,\mathbf a\rangle>0 ]

for every nonzero vector.

A general real inner product need not have the coordinate matrix (I). Relative to a chosen basis, it can be written as

[ \langle\mathbf a,\mathbf b\rangle

\mathbf a^{\mathsf T}M\mathbf b, ]

where (M) is a symmetric positive-definite matrix. The ordinary dot product is the special case (M=I), corresponding to an orthonormal basis in Euclidean space.

In infinite-dimensional settings, analogous operations define inner products on function spaces. An example is

[ \langle f,g\rangle

\int_a^b f(x)g(x),dx ]

for suitable real-valued functions. Such constructions preserve the central relation among orthogonality, norm, and projection, although they are generally called inner products rather than dot products.

See also