Dot Product Calculator

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

What is a dot product?

A dot product, also known as a scalar product, is an algebraic operation between two sequences of numbers that a 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 magnitudes of two vectors and the angle between them.

Dot Product Formula

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

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.

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.

%d bloggers like this: