# Cauchy–Schwarz Inequality for Negative Numbers

If $a_i, b_i, p_i \ge 0$, we can show by Cauchy–Schwarz inequality that $$\left(\sum_i {a_i p_i}\right)\left(\sum_i {b_i p_i}\right) \ge \left(\sum_i {p_i\sqrt{a_i b_i}} \right)^2.$$ What happens when $p_i$ can take negative values, but $\sum_i {a_i p_i} \ge 0$, and $\sum_i {b_i p_i} \ge 0$. Can we still say that $$\left(\sum_i {a_i p_i}\right)\left(\sum_i {b_i p_i}\right) \ge \left(\sum_i {p_i\sqrt{a_i b_i}} \right)^2?$$ Can any other restrictions on $p_i$ ensure that the above result holds?

• Kindly note that $a_i \ge 0$, and $b_i \ge 0$ $\forall i$, whereas $p_i \ge 0$ for some values of $i$ and $p_i <0$ for others. May 11, 2017 at 18:13

If $a_i,b_i>0$ and $p_i<0~\forall i$ then the following inequality will obviously hold: $$\left(\sum_ia_i|p_i|\right)\left(\sum_ib_i|p_i|\right)\geq\left(\sum_i|p_i|\sqrt{a_ib_i}\right)^2$$ $$\Rightarrow\left(\sum_ia_i(-p_i)\right)\left(\sum_ib_i(-p_i)\right)\geq\left(\sum_i(-p_i)\sqrt{a_ib_i}\right)^2~~~~~~~~~~~~~~~[since ~|p_i|=-p_i]$$ $$or,~\left(-\sum_ia_ip_i\right)\left(-\sum_ib_ip_i\right)\geq\left(-\sum_ip_i\sqrt{a_ib_i}\right)^2$$ $$or,~\left(\sum_ia_ip_i\right)\left(\sum_ib_ip_i\right)\geq\left(\sum_ip_i\sqrt{a_ib_i}\right)^2$$

• this proof will not hold if $p_i>0$ for some $i$
– QED
May 11, 2017 at 18:25
• Yes, I agree that the above proof is valid only if $p_i \le 0$ for all values of $i$. But in the question I asked, $p_i$ can be positive, negative, or zero, but $\sum_i {a_i p_i} \ge 0$, and $\sum_i {b_i p_i} \ge 0$. Would last constraints help to establish the inequality? May 11, 2017 at 18:28
• So the it is not necessary that $a_i,b_i\geq 0~\forall i$? The only constraint is that $\sum a_ip_i,\sum b_ip_i\geq0$?
– QED
May 11, 2017 at 18:31
• $a_i, b_i \ge 0$ for all $i$. Additionally, $\sum_i {a_i p_i} \ge 0$, and $\sum_i {b_i p_i} \ge 0$. May 11, 2017 at 18:39

The inequality would hold whenever $p_ia_i>0,p_ib_i>0~\forall i$. Because then take $\tilde{x}=(\sqrt{a_1p_1},\sqrt{a_2p_2},\cdots,\sqrt{a_np_n})'$ and $$\tilde{y}=(\sqrt{b_1p_1},\sqrt{b_2p_2},\cdots,\sqrt{b_np_n})'$$, then we know $$\tilde{x}.\tilde{y}=||\tilde{x}||.||\tilde{y}||\cos{\theta}\leq||\tilde{x}||.||\tilde{y}||$$ where $\theta$ is the angle between $\tilde{x}$ and $\tilde{y}$

• In the problem, $a_i, b_i \ge 0$, but $p_i$ can take on negative values. So $a_i p_i <0$, and $b_i p_i <0$. May 11, 2017 at 17:50
• In that case its also quite easy...write $p_i$ as $-|p_i|$
– QED
May 11, 2017 at 18:04
• Could you please elaborate how we can use $-|p_i|$ to establish the inequality. May 11, 2017 at 18:15