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.
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.
Multiply the first components of the two vectors by each other: x_1 * y_1.
Multiply the second components of the two vectors by each other: x_2 * y_2 and 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.