I have to solve the following least square problem:
$$\hat{x} = \arg \min_{x \in S} \|Ax - b\|^2$$
If $S = \mathbb{R}^n$, then the solution is given by
$$\hat{x} = (A^TA)^{-1}A^Tb$$
supposing that $(A^TA)^{-1}$ exists.
What if $$S = \left\{x \in \mathbb{R}^n : \sum_{i=1}^n x_i = 1, x_i \in [0, 1] ~\forall i \in \{1, \ldots, n\}\right\}?$$
** Addition **
$\|\cdot\|$ is the euclidean norm (2-norm)
$A \in \mathbb{R}^{n\times n}$ and $b \in \mathbb{R}^n$