How does one project a vector onto a subset of a subspace?

294 Views Asked by At

In particular, I am interested projecting a vector $y$ onto $H = \{x : x^{T}e = 0, x\geq 0 \}$, where $e = [1,1,1]^{T}$.

I know that $\hat{y} = UU^{T}y$, where $Col(U) = Span(u_{1},u_{2}), u_{i}^{T}e = 0$ is the projection of $y$ onto $\{x : x^{T}e = 0 \}$, but how would I then go about enforcing the non-negativity constraints?

EDIT:

In light of Paul's answer I realize the space $H$ I gave was somewhat trivial. The better question is: How to project $y$ onto $H' = \{x : x^{T}e = 1, x\geq 0 \}$?

EDIT(2):

I realized that the above problem can be formulated as the following minimization problem:

$ \min_{x} (y-x)^{T}(y-x) : e^{T}x = 1 , x \geq 0$,

which is a simple quadratic programming problem that can be solved by setting up a linear system as explained here: https://en.wikipedia.org/wiki/Quadratic_programming

1

There are 1 best solutions below

3
On

The projection of $y$ onto the vector $e$ is given by $$y_e=\frac{y \cdot e}{e \cdot e}e$$ The projection of $y$ onto the space perpendicular to $e$ is then simply $y_{e^\perp}=y-y_e$.