As you can see, the value of the dot product of the two vectors shown in Figure 3 is 6000 and the angle between the vectors is 49.3987 degrees. You will learn how those values were computed shortly.
Major properties of the dot product
Here are some of the major properties of the dot product of two vectors:
- The dot product of two vectors with the same orientation is the product of their lengths.
- The length of a vector is the square root of the dot product of the vector with itself.
- The dot product of two vectors having opposite orientations is the negative of the product of their lengths.
- The dot product of perpendicular vectors is zero.
- The angle between two vectors is the same as the angle between normalized versions of the vectors, which is equal to the arc cosine of thedot product of the normalized vectors.
As you will see later, these properties apply to both 2D and 3D vectors. In many cases, they also apply to vectors having more than three dimensions aswell.
Dot product of two vectors with the same orientation in 2D
Figure 4 illustrates the first property in the above list: The dot product of two vectors with the same orientation is the product of theirlengths.
Figure 4 Dot product of two vectors with the same orientation in 2D.
You may recall from some earlier experience that when a right triangle has sides with lengths of 30 and 40, the length of the hypotenuse is 50. Thatis the case for the magenta vector shown in Figure 4 . Similarly, when the sides of the triangle are 60 and 80, the length of the hypotenuse is 100, as isthe case for the black vector in Figure 4 .
From the property given above, we know that the dot product of the black and magenta vectors shown in Figure 4 is 5000, which agrees with the value shown in the Dot Prod output field in Figure 4 .
Dot product of two vectors with the same orientation in 3D
Figure 5 shows the dot product of two vectors with the same orientation in 3D. The image in Figure 5 was produced by the program named DotProd3D02 .
Figure 5 Dot product of two vectors with the same orientation in 3D.
Manually calculate the value of the dot product
You may need to get your calculator out to manually compute the lengths of the two vectors in Figure 5 . Computing the lengths as the square root of the sum of the squares of the three components of each vector gives me thefollowing lengths:
- Black length = 141.42
- Magenta length = 70.71
Rounding the product of the two lengths gives the dot product value of 10000, which matches the value shown in the bottom left output field in Figure 5 .
The length of a vector
Figure 6 illustrates the second property in the above list : The length of a vector is the square root of the dot product of the vector with itself.
Figure 6 Dot product of a 3D vector with an identical vector.
Figure 6 displays two vectors having the same coordinate values as the black vector in Figure 5 . (The black vector is hidden by the magenta vector in Figure 6 .) Because these two vectors have identical coordinate values, the dot product of these two vectors is the same as the dot product ofeither vector with itself.