Dot Product Formula
This formula calculates the dot product of two vectors. Geometrically, the result can be interpretted as projecting the second vector onto the line of the first vector and then multiplying the positive or negative magnitude of the projected vector with the magnitude of the first vector.
Expression | Description |
---|---|
The first vector. | |
The second vector. | |
The summation operator. | |
The -th element of the first vector. | |
The -th element of the second vector. |
The dot product of two vectors is calculated by summing together the product of corresponding elements. For example, the dot product of two vectors is calculated like this:
Geometrically, the dot product is interpretted as projecting the second vector onto the line of the first vector and then multiplying the positive or negative magnitude of the projected vector with the magnitude of the first vector.
In this case, because the projected vector points in the opposite direction, the sign is negative. When the vectors point in the same direction, the dot product is positive.
And, when the vectors are perpendicular, the dot product is zero.
The dot product can be geometrically interpreted as the magnitude of the two vectors multiplied by the cosine of the angle between them.