Quadratic cost minimization with zero mean constraint

25 Views Asked by At

Given an arbitrary vector $\mathbf{y}\in \mathbb{R}^{n}$, I would like to find $\mathbf{x^*} \in \mathbb{R}^n$ which is $$ \text{argmin}_\mathbf{x} \|\mathbf{x}-\mathbf{y} \|_F^2$$ s.t. $$ \mathbf{x}\cdot \underline{1} = 0$$ where $\underline{1}$ is a vector of 1's with length $n$. How do I solve for $\mathbf{x}^*$?

1

There are 1 best solutions below

0
On BEST ANSWER

Extend $\textbf{1}$ to a basis of $\mathbb{R}^n$, e.g., $\{\textbf{1},\textbf{e}_1,\ldots, \textbf{e}_{n-1}\}$ will do, where $\textbf{e}_i$ is the standard basis vector having $1$ in the $i$-th coordinate, and $0$ elsewhere. Now run Gram-Schmidt orthogonalization on this basis to get a orthogonal basis $\{\textbf{1},\textbf{b}_1,\ldots, \textbf{b}_{n-1}\}$, thus getting the basis, $\{\textbf{b}_1,\ldots, \textbf{b}_{n-1}\}$, of the subspace, $S$, that is orthgonal to $\textbf{1}$. Clearly $\textbf{x}$ belongs to $S$ and is the projection of $\textbf{y}$ onto $S$. Hence, $$\textbf{x}=\frac{\langle\textbf{b}_1, \textbf{y}\rangle}{\|\textbf{b}_1\|^2}\textbf{b}_1+\cdots+\frac{\langle\textbf{b}_{n-1}, \textbf{y}\rangle}{\|\textbf{b}_{n-1}\|^2}\textbf{b}_{n-1}$$