Let $u$ and $v$ be column vectors of size $n \gg 1$ (not both zero), and consider the matrix $A:=uu^T+vv^T$
Question
What is an analytic formula for $\arg\max_{\|z\|_\infty \le 1}z^TAz=\arg\max_{\|z\|_\infty \le 1}(z^Tu)^2 + (z^Tv)^2$ ?
Observations
- In the constraint, if we replace $\|\cdot\|_\infty$ with $\|\cdot\|_2$, then the question corresponds to finding the leading eigenvector of $A$ and was asked an answered in this thread Analytic formula for leading eigenvector of $uu^T + vv^T$?.
- In the special case where $u=0$, the problem reduces to $\arg\max_{\|z\|_\infty \le }|z^Tv|^2$, which is solved by taking $z_j= \operatorname{sign}(v_j)$ for all $j$.