# Dot product of two vectors

**Dot product**of two vectors a and b is a scalar quantity equal to the product of magnitudes of vectors multiplied by the cosine of the angle between vectors:

a · b = |a| · |b| cos α

**Dot product**of two vectors a and b is a scalar quantity equal to the sum of pairwise products of coordinate vectors a and b.

**Dot product**is also call

*scalar product*or

*inner product*.

## Dot product - formulas

### Dot product formula for plane problems

In the case of the plane problem the dot product of vectors a = {a_{x} ; a_{y}} and b = {b_{x} ; b_{y}} can be found by using the following formula:

_{x}· b

_{x}+ a

_{y}· b

_{y}

### Dot product formula for spatial problems

In the case of the spatial problem the dot product of vectors a = {a_{x} ; a_{y} ; a_{z}} and b = {b_{x} ; b_{y} ; b_{z}} can be found by using the following formula:

_{x}· b

_{x}+ a

_{y}· b

_{y}+ a

_{z}· b

_{z}

### Dot product formula for n dimensional space problems

In the case of the n dimensional space problem the dot product of vectors a = {a_{1} ; a_{2} ; ... ; a_{n}} and b = {b_{1} ; b_{2} ; ... ; b_{n}} can be found by using the following formula:

_{1}· b

_{1}+ a

_{2}· b

_{2}+ ... + a

_{n}· b

_{n}

## Properties of dot product of vectors

- The dot product of a vector with itself is always greater than zero or equal to zero:
a · a ≥ 0

- The dot product of a vector with itself is zero if and only if the vector is the zero vector:
a · a = 0 <=> a = 0

- The dot product of a vector with itself is equal to the square of its magnitude:
a · a = |a|

^{2} - The dot product operation is communicative:
a · b = b · a

- If the dot product of two not zero vectors is is zero, then these vectors are orthogonal:
a ≠ 0, b ≠ 0, a · b = 0 <=> a ┴ b

- (αa) · b = α(a · b)
- The dot product operation is distributive:
(a + b) · c = a · c + b · c

## Dot product - example

### Examples of calculation of the dot product of vectors for plane problems

**Solution:** a · b = 1 · 4 + 2 · 8 = 4 + 16 = 20.

**Solution:** a · b = |a| · |b| cos α = 3 · 6 · cos 60˚ = 9.

**Solution:**

= 5 |a|

^{2}+ 12 a · b - 9 |b|

^{2}= 5 · 3

^{2}+ 12 · 3 · 2 · cos 60˚ - 9 · 2

^{2}= 45 +36 -36 = 45.

### Examples of calculation of the dot product of vectors for spatial problems

**Solution:** a · b = 1 · 4 + 2 · 8 + (-5) · 1 = 4 + 16 - 5 = 15.

### Examples of calculation of the dot product of vectors for n dimensional space problems

**Solution:** a · b = 1 · 4 + 2 · 8 + (-5) · 1 + 2 · (-2) = 4 + 16 - 5 -4 = 11.

*Add the comment*