Dot Product [source]

Drag the green and blue lines.
This browser doesn't support the canvas element :-(
Blue Dot Green
(Length of Green) squared
= Red Length relative to green
= 0
Check out the Vector section and these per-pixel rendered lines in this page's source.