# 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

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

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.

1. Dot product of two vectors is commutative i.e. b = b.a = ab cos θ.
2. If b = 0then 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.
3. Also we know that using scalar product of vectors (pa) . (qb) = (pb) . (qa) = pq a.b
4. The dot product of a vector to itself is the magnitude squared of the vector i.e. a.a = a.a  cos 0 = a2
5. The dot product follows the distributive law also i.e. (b + c) = a.b + a.c
6. In terms of orthogonal coordinates for mutually perpendicular vectors it is seen that i . i = j . j = k . k = 1.
7. In terms of unit vectors if a= a1i + a2j + a3k and b = b1i + b2j + b3k then,

a . b = (a1i + a2j + a3k) . (b1^i+b2^j+b3^k)

= a1b1 + a2b2 + a3b3 = abcosθ