Dot product

The dot product of two vectors returns a number that happens to be scalar. It is a representation of how two vectors are associated with each other.

Geometrically, the dot product of two vectors x and y would be as follows:

x . y= ||x|| ||y|| cosθ

θ is the angle between the vector x and y.

However, algebraically, we get the following:

Geometrically, we get the following:

θ=β-α

cosθ=cos(β-α)

cosθ = cosβ cosα + sinβ sinα

cosθ = (x1/||x||) (y1/||y||) + (x2/||x||) (y2/||y||)

||x||||y|| cosθ= x1 y+ x2y2

x . y = x1 y+ x2y2