The dot product of two vectors (a,b) and (x,y) is defined to be[an error occurred while processing this directive]
ax + by. This number will be zero if and only if the two vectors are perpendicular. We can see this using slopes. If the first vector lies along the y-axis, so a = 0, then ax + by = 0only if by = 0, so either b = 0and (a,b) = (0,0), or y = 0and (x,y) lies along the x-axis. Thus the two vectors have dot product 0 if, and only if, they are perpendicular.
Next, if neither vector has slope 0, the vectors (a,b) and (x,y) will be perpendicular if and only if their slopes are negative reciprocals, i.e. if
(b/a)(y/x) = -1= by/ax, so -ax = byand ax + by = 0.
Geometrically, we know that two vectors are perpendicular if the Pythagorean Theorem holds, i.e. the square of the length of (a,b) plus the square of the length of (x,y) equals the square of the length of
(a,b)-(x,y) = (a-x,b-y). This means that a2 + b2 + x2 + y2= (a-x)2 + (b-y)2= a2 - 2ax + x2 - 2by + y2. From this it follows that 0 = -2ax - 2by, so ax + by = 0.