Thursday, March 17, 2011

Calculate A Vector Dot Product







Vectors are mathematical objects having a size, or magnitude, and a direction. Vectors are useful in physics when describing directional quantities such as velocity, acceleration and force.The dot product of two vectors, also known as their scalar product, is a way of multiplying vectors, arriving at a scalar quantity (in other words having a magnitude but no direction).Vector dot products are defined in general for any number of dimensions.


Instructions








Calculating the dot product, or scalar product, of two vectors


1. Choose if you wish to use trigonometry or algebra. If you know the magnitude of the two vectors and the angle between them, use trigonometry by going to step 2. If you know the components of the vectors, use algebra by going to step 3.


2. Multiply the magnitude of the two vectors by the cosine of the angle theta between them: |X| * |Y| * cos(theta). This is the dot product of the two vectors.


3. Multiply the first components of the two vectors by each other:x_1 * y_1.


4. Multiply the second components of the two vectors by each other: x_2 * y_2and add the product of these to the product of the first components. Repeat this step with the third components, fourth and so on. The overall sum will thus be: (x_1 * y_1) + (x_2 * y_2) + (x_3 * y_3) + ... + (x_n * y_n), where n is the number of dimensions of the two vectors. This overall sum is the dot product of the two vectors.

Tags: product vectors, components vectors, between them, components vectors each, each other, first components