# Algebraic Inequality with dot product

I encountered the following inequality in a paper I was reading: $$\left(\sum_{i=1}^d a_ib_i\right)^2 \leq \left(\sum_{i=1}^d b_i \right) \left( \sum _{i=1}^d a_i^2 b_i\right)$$

I am unable to prove it (or find a counterexample for that matter). Hints would suffice on how to proceed.

• Hint: Cauchy-Schwarz. – max_zorn Feb 15 '18 at 22:26
• Do all the $b_i$ have the same sign? – Arnaud D. Feb 15 '18 at 22:31
• @max_zorn: if the $b_i$ are all nonnegative, then this is an easy consequence of C-S: one can use $ab=\sqrt{b}\cdot (a\sqrt{b})$. Otherwise, how do you use C-S? – Jack Feb 15 '18 at 22:32
• @max_zorn only for $b_i$ positive? – user Feb 15 '18 at 22:32
• @gimusi The original post left out this important assumption indeed... – max_zorn Feb 15 '18 at 22:42

The inequality doesn't hold for all $a_i$ and $b_i$, unless either $b_i\ge0$, for all $i$, or $b_i\le0$, for all $i$.

We can obviously disregard terms $b_i=0$, that don't contribute to either side.

The case $d=1$ is obvious. Assume then $d>1$ and that there are positive and negative $b_i$.

Assume, without loss of generality, $b_1<0$ and $b_2>0$. We can choose $a_i=0$ for $i=3,\dots,d$.

If $\sum_i b_i>0$, set $a_1=1$ and choose $a_2$ such that $a_2^2b_2<-b_1$. Then $$\sum_{i=1}^da_i^2b_i<0$$ and the inequality doesn't hold.

If $\sum_i b_i<0$, set $a_2=1$ and choose $a_1$ such that $-a_1^2b_1<b_2$. Then $$\sum_{i=1}^da_i^2b_i>0$$ and the inequality doesn't hold.

If $b_i\le0$, for all $i$, we can substitute $b_i$ with $-b_i$ and the terms in the left-hand and right-hand sides wouldn't change. Thus it is not restrictive to assume $b_i\ge0$, for all $i$.

Applying Cauchy-Schwarz to $(a_1\sqrt{b_1},\dots,a_d\sqrt{b_d})$ and $(\sqrt{b_1},\dots,\sqrt{b_n})$ proves the inequality.

COUNTEREXAMPLE

take $d=2,$

$$a_1 = 2, a_2 = 1$$ $$b_1 = 1, b_2 = -3,$$ $$\sum b_i = -2,$$ $$\sum a_i^2 b_i = 1$$ but $$\left(\sum_{i=1}^d a_ib_i\right)^2 \geq 0$$