Enter the x,y, and z coordinates of two different vectors a and b to calculate the dot product.

Dot Product Formula

The following formula is used by the calculator above to calculate the dot product between two equal length vectors.

dot product formula

Where n is the total number of spaces, or numbers, in the vector and a and b are vectors or sequences of equal length. This can also be calculated geometrically with the following equation.

{\displaystyle \mathbf {a} \cdot \mathbf {b} =\|\mathbf {a} \|\ \|\mathbf {b} \|\cos \theta ,}

Where a and b are vectors of equal length, ‖a‖ and ‖b‖  are the magnitudes of vectors a and b, and θ is the angle between a and b.

Dot Product Definition

A dot product, also known as a scalar product, is an algebraic operation between two sequences of numbers that returns a single number. In most cases, these sequences are represented by vectors. However, the dot product can be calculated through any two sequences of equal length.

In mathematical terms, the dot product between two equal-length sequences is the sum of the products of the corresponding entries of those two sequences. It can also be calculated geometrically through a formula involving the magnitudes of two vectors and the angle between them.

How to calculate a dot product

The following example is a step-by-step guide of how to calculate the dot product of two equal-length sequences of numbers.

  1. First, we must determine the sequence or vector length and values. We will look at two vectors a and b of 3 spaces. That is each will have an x,y, and z coordinate. For this example, we will assume the values of [1,2.3] and [4,5,6] respectively.
  2. Next, we want to calculate the products of each corresponding space/coordinate. For x, this would be 1*4=4. For y this would be 2*5=10. For z this would be 3*6=18.
  3. Finally, we must sum all of those products together, so 4+10+18= 32.
  4. The dot product between vectors a and b in this example is 32.


What is a dot product?

A dot product is a magnitude value of two sequences of numbers.