Most of us also learned in our trigonometry classes that the cosine of 90 degrees is 0.0. Since, by definition , the value of the dot product of two vectors is the product of the lengths of the vectors multiplied by the cosine of the angle between them , and the angle must be 90 degrees for two vectors to be perpendicular, then the dot product ofperpendicular vectors must be zero as stated by the fourth property in the above list of properties .
An infinite number of perpendicular vectors
By observing Figure 8 , it shouldn't be too much of a stretch for you to recognize that there are an infinite number of different vectors that couldreplace the magenta vector in Figure 8 and be perpendicular to the black vector. However, since we are discussing the 2D case here, all of those vectors must liein the same plane and must have the same orientation (or the reverse orientation) as the magenta vector. In other words, all of the vectors in the infinite set of vectors that are perpendicular to the black vector mustlie on the line defined by the magenta vector, pointing in either the samedirection or in the opposite direction. However, those vectors can be any length and still lie on that same line.
A general formulation of 2D vector perpendicularity
By performing some algebraic manipulations on the earlier 2D formulation of the dot product, we can formulate the equations shown in Figure 9 that define the infinite set of perpendicular vectors described above.
Figure 9 . A general formulation of 2D vector perpendicularity. |
---|
dot product = x1*x2 + y1*y2
If the two vectors are perpendicular:x1*x2 + y1*y2 = 0.0
x1*x2 = -y1*y2x2 = -y1*y2/x1 |
As you can see from Figure 9 , we can assume any values for y1, y2, and x1 and compute a value for x2 that will cause the two vectors to beperpendicular.
A very interesting case
One very interesting 2D case is the case shown in Figure 8 . In this case, I initially specified one of the vectors to be given by the coordinatevalues (50,100). Then I assumed that y2 is equal to x1 and computed the value for x2. The result is that the required value of x2 is the negativeof the value of y1.
Thus, in the 2D case, we can easily define two vectors that are perpendicular by
- swapping the coordinate values between two vectors and
- negating one of the coordinate values in the second vector
The actual direction that the second vector points will depend on which value you negate in the second vector.
Another interesting 2D case of perpendicular vectors
Another interesting 2D case is shown in Figure 10 .
Figure 10 Another interesting 2D case of perpendicular vectors.
In Figure 10 , I assumed the same coordinate values for the black vector as in Figure 8 . Then I assumed that the values of the y-coordinates for both vectors are the same. Using those values along with the equation in Figure 8 , I manually computed a required value of -200 for the x-coordinate of the magenta vector. I entered that value into the field labeled VectorBx = in Figure 10 and clicked the OK button.
And the result was...