Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let $K$ be the closed convex set of $\mathbb{R}^N$ defined as the intersection of:

  • the first orthant $\mathbb{R^+}^N$
  • the hyperplane $\text{Ker}(\phi)$ where $\phi(x)= 1-\langle x,n\rangle$ with $n$ a unitary vector

We can express the projection onto $\text{Ker}(\phi)$ as:

$$ p:x \mapsto x + \left(1-\langle x,n\rangle\right) n$$

Can we similarly express the projection onto $K$? For instance, in the simpler case where $\forall i, n_i=\frac{1}{\sqrt{N}}$.

Edit: The following is wrong, I keep it so that the comment of joriki can be understood.

Composing projections onto the orthant and the hyperplane might work, since the projection onto the hyperplane maps the orthant to K.

share|cite|improve this question
"since the projection onto the hyperplane maps the orthant to $K$": Are you assuming that $n$ has positive components? If not, this is not true (as can easily be seen in two dimensions). – joriki Oct 26 '12 at 15:55
You are right ! – Wok Oct 26 '12 at 16:20
I was thinking of the case where all components of n are equal to 1. But my statement can be wrong even if n has positive components. – Wok Oct 26 '12 at 16:27
In fact, I was thinking of a scaling with the origin as a center, in which case, the orthant is mapped to K∪{0}. But the statement is wrong with the projection described above. – Wok Oct 29 '12 at 12:41
Related: – Wok Oct 29 '12 at 12:43
up vote 0 down vote accepted

As explained in an answer to another question, the article Projection Onto A Simplex by Yunmei Chen and Xiaojing Ye provides a relevant answer. There is even a piece of code in Matlab.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.