TITLE: Seems familiar: find $\max \sum_{i=1}^n\sum_{i=1}^n a_{ij}x_iy_j$ s.t. $x_1+\cdots+x_n=y_1+\cdots+y_n=1$
QUESTION [1 upvotes]: Given $a_{ij}\ge 0$. Find $$\max \sum_{i=1}^n\sum_{j=1}^n a_{ij}x_iy_j$$ 
s.t. $x_1+\cdots+x_n=y_1+\cdots+y_n=1, x_i\ge 0, y_i\ge 0\ \forall i$.

REPLY [1 votes]: The $x_i$'s and $y_i$'s can be thought as weights (since they are positive and some up to $1$). In other words they "average" the elements $a_{ij}$. Moreover $$\sum_{i=1}^n\sum_{j=1}^n a_{ij}x_iy_j=x^TAy$$ where $A=(a_{ij})_{i,j=1,\dots,n}$. So, just choose the maximal element $a_{i^*j^*}$ and put all the weight on it by picking $$(x_1,\dots,x_n)=δ_{i^*}, \quad (y_1,\dots,y_n)=δ_{j^*}$$
{"set_name": "stack_exchange", "score": 1, "question_id": 1721653}