The dot product of two vectors produces a number which represents how aligned the vectors are with each other. The dot product of and can be interpretted as projecting onto the line formed by and multiplying the length of the projected vector by the length of .
Algebraically, the dot product of two vectors is given by the product of their components.
When the two vectors point in the same direction, the dot product is positive.
When the two vectors are perpendicular, the dot product is zero.
When the two vectors point in opposite directions, the dot product is negative.
Sometimes, we define the dot product of two vectors in terms of their magnitudes and the angle between them.
The cross product operates on two vectors and produces another vector as a result.
The magnitude (or length) of a vector gives a scalar representation of its size, irrespective of its direction.