I am trying to derive famous Projection operator as a constrained minimization problem for the least square problem. The question is as follows:
Find $x$ minimizing $ (y-x)^T(y-x)$ subject to $x = H\theta$ where $y$, $x$ and $\theta$ are vectors and $H$ are matrix. How can I solve this problem with Lagrange multiplier?
The solution to the problem will be of the form $\hat{x} = Py$ where $P = H(H^TH)^{-1}H^T$ is the classical projection matrix on $H$.
This problem is classical least square estimation. Unconstrained form of this question is follows:
Find $\theta$ minimizing $ (y-H\theta)^T(y-H\theta)$. This is easily found by takind gradient and setting equal to zero. Or by using vector space approach it can easily be shown that the error ($y-H\hat{\theta}$) will be orthogonal to the columns of $H$ or the basis vectors of the subspace $H$.
But my question is I want to reach the well-known projection matrix with the help of Lagrange multiplier for the solution of constrained minimization problem as stated in the first equation.
If the constraint had the form $Cx = c$ instead of $x = H\theta$, it can be solved easily. But, I couldn't find the solution for this form of constraint $x = H\theta$.
Any help will be much appreciated.