What is a dot product?
The dot product is one of two ways to “multiply” two vectors together. The result of a dot product is a SINGLE NUMBER, not a vector. The dot product is the sum of the products of the corresponding pairs of values in the two vectors. In other words, if you have two vectors [1 2 3] and [4 5 6], their dot product is (1*4 + 2*5 + 3*6) = (4 + 10 + 18) = 32. What is this good for? Dot products are good ways of comparing how “similar” the directions of two vectors are. If two vectors point in the exact same direction, their dot product is simply the product of the lengths of the vectors. If two vectors are exactly perpendicular, their dot products will be zero. Somewhere in between will produce dot products along the spectrum.