Projections, visually

Find the closest point to b in a line or a plane. This is the geometry behind least squares.

bgiven vector (target y)
aspans a line (feature column x)
pprojection: the part of b in span(a) (fit ŷ)
eerror: the part of b not in span(a) (residual)
Drag the tips of a and b