# Dot product of vectors: Explained with formula and examples

## The dot product or scalar product of two vectors is the product of the magnitudes of the two vectors and the cosine of the angle between them. The dot product of vectors a and b can be calculated by using the following formula.

The dot product or scalar product of two vectors is the product of the magnitudes of the two vectors and the cosine of the angle between them. The dot product of vectors **a** and **b** can be calculated by using the following formula.

## Dot product formula

**(a _{i }a_{j} a_{k}) ∙ (b_{i} b_{j} b_{k}) = (a_{i} ∙ b_{i} + a_{j} ∙ b_{j} + a_{k} ∙ b_{k})**

In this formula,

* i, j,* and *k* refer to *x, y,* and *z* coordinates on the Cartesian plane.

## Finding dot product of two vectors

You can use the dot product calculator or dot product formula to calculate the dot product of two vectors.

To find the dot (scalar) product of two vectors **a** and **b**, multiply the vectors like coordinates and then add the products together as shown in the above equation.

Multiply the **x** coordinates of both vectors, then add the result to the product of the **y** coordinates. If we have vectors in three-dimensional space, we’ll add the product of the **z** coordinates too.

Here, we will go through few examples to understand the calculation of dot product.

Suppose,

### Example 1

Vector a = (6i, 8j, 4k)

Vector b = (9i, 3j, 5k)

Place the values in the dot product formula.

*(ai aj ak) *∙* (bi bj bk) = (ai *∙* bi + aj *∙* bj + ak *∙* bk)*

(6 8 4) ∙ (9 3 5) = (6 ∙ 9 + 8 ∙ 3 + 4 ∙ 5)

(6 8 4) ∙ (9 3 5) = (54 + 24 + 20)

= 98

### Example 2

Vector a = (2.3i, 0.9j, 5.2k)

Vector b = (0.01i, 9.027j, 0.0034k)

Place the values in the dot product equation.

*(ai aj ak) *∙* (bi bj bk) = (ai *∙* bi + aj *∙* bj + ak *∙* bk)*

(2.3 0.9 5.2) ∙ (0.01 9.027 0.0034) = (2.3 ∙ 0.01 + 0.9 ∙ 9.027 + 5.2 ∙ 0.0034)

(2.3 0.9 5.2) ∙ (0.01 9.027 0.0034) = (0.023 + 8.1243 + 0.01768)

= 8.2

### Example 3

Vector a = (78i, 034j, 90k)

Vector b = (-67i, 45j, 98k)

Place the values in the formula.

*(ai aj ak) *∙* (bi bj bk) = (ai *∙* bi + aj *∙* bj + ak *∙* bk)*

(78 34 90) ∙ (-67 45 98) = (78 ∙ -67 + 34 ∙ 45 + 90 ∙ 98)

(78 34 90) ∙ (-67 45 98) = (-5226 + 1530 + 8820)

= 5124

## Properties of the dot product

The followings are the properties of dot product.

- Dot product of two vectors is commutative i.e.
**b = b.a**= ab cos θ. - If
**b = 0**then it can be seen that either**b**or**a**is zero or cos θ = 0 ⇒θ = π/2. It suggests that either of the vectors is zero or they are perpendicular to each other. - Also we know that using scalar product of vectors (pa) . (qb) = (pb) . (qa) = pq a.b
- The dot product of a vector to itself is the magnitude squared of the vector i.e. a.a = a.a cos 0 = a
^{2} - The dot product follows the distributive law also i.e.
**(b + c) = a.b + a.c** - In terms of orthogonal coordinates for mutually perpendicular vectors it is seen that i . i = j . j = k . k = 1.
- In terms of unit vectors if a= a
_{1}i + a_{2}j + a_{3}k and b = b_{1}i + b_{2}j + b_{3}k then,

a . b = (a_{1}i + a_{2}j + a_{3}k) . (b1^i+b2^j+b3^k)

= a_{1}b_{1} + a_{2}b_{2} + a_{3}b_{3} = abcosθ