Deriving projection operator for an affine set

Given an affine set $Ax=b$, the Projection operator to this set is $$P(z) = z - A^{T}(AA^{T})^{-1}(Az-b)$$ which is also affine.

How is this derived?

1 Answer

$P(z)$ solves the problem $$\min \|z -x\|^2$$ subject to the constraint $$Ax=b.$$ The KKT system is a necessary and sufficient optimality condition (why?): $$Ax = b, \ A^T\mu = x-z.$$ Multiply the second equation by $A$, assume $(AA^T)^{-1}$ being invertible, then solve for $\mu$, then solve for $z$.

• Thanks for the reply. KKT is necessary and sufficient because strong duality obtains. – haripkannan May 16 '14 at 0:50