Perp Dot Product — Definition, Formula & Example
The perp dot product is a single number computed from two 2D vectors. Its sign tells you whether the second vector turns left (counterclockwise) or right (clockwise) from the first, and its absolute value equals the area of the parallelogram the two vectors span.
For and in , let be rotated counterclockwise. The perp dot product is the scalar . It equals , where is the signed angle from to , measured counterclockwise. It is anticommutative: . It also equals the -component of the cross product .
Key Formula
Where:
- = The vector a rotated 90° counterclockwise, equal to
- = Components of the first vector a
- = Components of the second vector b
- = Signed angle from a to b, positive when measured counterclockwise
Worked Example
Problem: Let a = (4, 1) and b = (2, 3). Find the perp dot product . Use it to decide whether b lies counterclockwise or clockwise from a, and find the area of the parallelogram the vectors span.
Step 1: Rotate a by 90° counterclockwise. Swap the components and negate the new first one.
Step 2: Take the ordinary dot product of with . You get the same result from the shortcut .
Step 3: Read the result. The value is positive, so sin θ > 0 and b is counterclockwise from a. The absolute value is the parallelogram's area. Reversing the order flips the sign.
Answer: . Because the value is positive, b lies counterclockwise from a. The parallelogram spanned by a and b has an area of 10 square units.
Why It Matters
In computer graphics and game programming, the sign of the perp dot product tells you whether a point lies to the left or right of a line. It is also the core step in segment-intersection tests and in finding polygon orientation. The shoelace formula gives a polygon's area as half the sum of the perp dot products of consecutive vertices.
Common Mistakes
Mistake: Writing , or using the clockwise rotation , and then reading the sign as usual.
Correction: Either change flips the sign and reverses your left/right conclusion. Use and compute . Keep the order fixed, because .
