In mathematics, the

**dot product**is a binary operation which takes two vectorss and returns a scalar quantity. It is also known as the

**inner product**or

**scalar product**.

It is defined as:

**a**and

**b**are both unit vectors (ie of length 1), the dot product simply gives the cosine of the angle between them. Thus, given two vectors, the angle between them can be found by rearranging the above formula:

**b**is a unit vector, then the dot product gives the projection of

**a**in direction

**b**. In mechanics, this gives the component of a force in that direction.

Work is the dot product of force and displacement.

## Properties

The definition has the following consequences:- the dot product is commutative, i.e.
**a**·**b**=**b**·**a**. - two non-zero vectors
**a**and**b**are perpendicular if and only if**a**·**b**= 0 - the dot product is bilinear, i.e.
**a**·(*r***b**+**c**) =*r*(**a**·**b**) + (**a**·**c**)

From these it follows directly that the dot product of two vectors **a** = [*a*_{1} *a*_{2} *a*_{3}] and **b** = [*b*_{1} *b*_{2} *b*_{3}] given in coordinates can be computed particularly easily:

**a**·**b**= a_{1}b_{1}+ a_{2}b_{2}+ a_{3}b_{3}

**a**·**b**=**a****b**^{T}

**b**

^{T}denotes the transpose of the matrix

**b**.

The dot product satisfies all the axioms of an inner product. In an abstract vector space, the notion of angle between the elements of the space can be *defined* in terms of the inner product.

## Proof that the two forms of definition are equivalent

;Consider a vector :**v** =v_{1}**i** + v_{2}**j** + v_{3}**k**.
;Repeated application of the Pythagorean theorem determines that :v^{2} =(v_{1}^{2} + v_{2}^{2} + v_{3}^{2}).
;which is the same formula for the dot product of the vector **v** with itself, thus :**v**·**v** = v^{2}.

;Now consider two vectors **a** and **b** from the origin and separated by an angle θ. A third vector **c** may be defined as :**c** = **a**-**b**.
;Using the law of cosines, we have :c^{2} = a^{2} + b^{2} - 2.a.b.cos(θ).
;And substituting the dot product for the squared lengths, we get :**c**·**c** = **a**·**a** + **b**·**b** - 2.a.b.cos(θ).
;But as **c** = **a** - **b**, we also have : **c**·**c** = (**a** - **b**)·(**a** - **b**).
;which expands to :**c**·**c** = **a**·**a** + **b**·**b** - 2.**a**·**b**.
;Then merging the two **c**·**c** equations we obtain :**a**·**a** + **b**·**b** - 2.**a**·**b** = **a**·**a** + **b**·**b** - 2.a.b.cos(θ).
;Subtracting **a**·**a** + **b**·**b** from both sides leaves :- 2.**a**·**b** = - 2.a.b.cos(θ).
;And dividing by -2 derives the final :**a**·**b** = a.b.cos(θ).

*See also:* Cross product