In
mathematics, the
dot product or
scalar product (sometimes
inner product in the context of
Euclidean space, or rarely
projection product for emphasizing the
geometric significance), is an algebraic operation that takes two equal-length sequences of numbers (usually
coordinate vectors) and returns a single number. This operation can be defined either algebraically or geometrically. Algebraically, it is the sum of the
products of the corresponding entries of the two sequences of numbers. Geometrically, it is the product of the Euclidean magnitudes of the two vectors and the
cosine of the angle between them. The name "dot product" is derived from the
centered dot "
· " that is often used to designate this operation; the alternative name "scalar product" emphasizes that the result is a
scalar (rather than a
vector).