# Dot Product in Three Dimensions

Geometrically, we know that two vectors are perpendicular if the
Pythagorean Theorem holds, i.e. the square of the length of
(*a*,*b*,*c*) plus the square of the length of
(*x*,*y*,*z*) equals the square of the length of
(*a*,*b*,*c*) -
(*x*,*y*,*z*) = (*a*-*x*,*b*-*y*,*c*-*z*). This means that *a*^{2} + *b*^{2} +
*c*^{2} + *x*^{2}
+ *y*^{2} + *z*^{2} = (*a*-*x*)^{2} +
(*b*-*y*)^{2} + (*c*-*z*)^{2} = *a*^{2} - 2*ax* +
*x*^{2} + *b*^{2}
- 2*by* +
*y*^{2} + *c*^{2}
- 2*cz* +
*z*^{2}. From this it follows that 0 = -2*ax* - 2*by*
- 2*cz*, so *ax* + *by* + *cz* =
0. Thus two vectors in **R**^{3} are perpendicular if and only if
their dot product is zero.

[an error occurred while processing this directive]