Slopes of Perpendicular Lines
You may recall this from past math classes:
If two lines are perpendicular, then the product of their slopes is -1.
This is another way to look at what goes on when you make a normal vector
to a given 2D vector by swapping elements and negating one:
- If v = ( x, y )T
- Then v' = ( -y, x )T is orthogonal,
- because ( x, y)T · ( -y, x ) is -xy + yx = 0.
- The slope of ( x, y )T is y/x.
- The slope of ( -y, x )T is -x/y.
- The product of the slopes is y/x * -x/y = -(xy)/(xy) = -1