Suppose $\mathbf{a} = (a_{0}, \dots, a_{N-1})$ and $\mathbf{b} = (b_{0}, \dots, b_{N-1})$ with $a_{i}\geq0$, $b_{i}\geq 0$. I would like to minimize
$$-\sum_{i=0}^{N-1}a_{i}b_{i}$$
subject to
$$\sum_{i=0}^{N-1}b_{i} = 1.$$ The Lagrangian function is
$$L(\mathbf{a}, \mathbf{b}, \lambda) = -\sum_{i=0}^{N-1}a_{i}b_{i} + \lambda\Bigg(\sum_{i=0}^{N-1}b_{i} -1\Bigg).$$ I assume I should be looking next the necessary conditions
$$\frac{\partial L}{\partial \lambda} = 0,$$ $$\frac{\partial L}{\partial a_{i}} = 0$$ $$\frac{\partial L}{\partial b_{i}} = 0$$
for every $i$ but I don't know how to actually proceed from here. I will get a big system of equations with large $N$.
What I am trying to do is that I have a set of related real-world measurements $a_{i}$. I would like to find weights $b_{i}$ that maximize the sum of products $a_{i}b_{i}$. The sum of $b_{i}$ must be one, to avoid the thing going to infinity ($a$ is fixed in the beginning).
Intuitively, I think setting $b_{i} = 1/N$ for each $i$ gets me somewhere (mean) but not necessarily at the optimal point.
The Lagrangian tells you that there is no interior critical point unless all the $a_i$ are equal. Thus, in general, the minimum will be on the boundary. In fact, it is in a corner.
Without loss of generality, let $a_0=\max\limits_{0\le i\le N-1}a_i$. Then $$ \begin{align} -\sum_{i=0}^{N-1}a_ib_i &=-a_0\sum_{i=0}^{N-1}b_i+\sum_{i=0}^{N-1}(a_0-a_i)b_i\\ &\ge-a_0\sum_{i=0}^{N-1}b_i\\[6pt] &=-a_0 \end{align} $$ and you can get the sum to be $-a_0$ by setting $b_0=1$ and $b_i=0$ for $i\gt0$.
Thus, you want to put all the weight on the largest $a_i$.