I have been studying projection from Strang's linear algebra book. The projection part is here.
The projection $p$ onto a line is given below.
The line from $b$ to $p$ is perpendicular to the vector $a$. This is the dotted line marked $e=b-p$ for the error of the above figure.
I have two questions:
(1) how this error($e=b-p$) is calculated?
(2) and why this error $e$ belong to orthogonal complement of Subspace ,$S^\perp$ (when we are talking about projection onto any subspace $S$) ?
