Suppose $A$ is fat(number of columns > number of rows) and full row rank. The projection of $z$ onto $\{x\mid Ax = b\}$ is (affine)
$$P(z) = z - A^T(AA^T)^{-1}(Az-b)$$
How to show this?
Note: $A^T(AA^T)^{-1}$ is the pseudo-inverse of $A$
What I am thinking is from:
Least square problem: $$\text{min $\left\|\: Ax-b \,\right\|_2$}$$
The solution for this is $\hat{x} = A^T(AA^T)^{-1}b$. It seems $(Az - b )$ above is the role of $b$ here.Vector projection of $x$ onto $y$: $$p = \frac{x^Ty}{y^Ty}y$$
But I still cannot figure out how to prove the above result.