A question about the proof of Schwarz inequality There are many proofs of the Cauchy-Schwarz inequality, here's one of them: Consider the following quadratic polynomial: $$f(x)=\left(\sum_{i=1}^{n} a_i^2  \right)x^2-2\left(\sum_{i=1}^{n} a_ib_i  \right)x+\sum_{i=1}^{n} b_i^2=\sum_{i=1}^{n} (a_ix-b_i)^2.  $$ Since $f(x)\geqslant0$ for all $x\in\Bbb R$, it follows that the discriminant of $f(x)$ is negative, i.e., $$
\left(\sum_{i=1}^{n}a_ib_i\right)^2-\left(\sum_{i=1}^{n}a_i^2\right)\left(\sum_{i=1}^{n}b_i^2\right)\leqslant0
$$
Therefore: $$\left(\sum_{i=1}^{n}a_i^2\right)\left(\sum_{i=1}^{n}b_i^2\right)\geqslant\left(\sum_{i=1}^{n}a_ib_i\right)^2.$$
the question is:
why are we able to say :"Since $f(x)\geqslant0$ for all $x\in\Bbb R$, it follows that the discriminant of $f(x)$ is negative" ??
 A: The discriminant $D=B^2-4AC$ of a quadratic poinomial $Ax^2+Bx+C$  is the thing you take the square root of to find the two roots. Thus


*

*$D>0$ corresponds to two distinct real roots

*$D=0$ corresponds to a double real root

*$D<0$ corresponds to two distinct complex roots.


If $f(x)\ge 0$ for all $x$, there are certainly not two distinct real roots (between which it would have a different sign then outside). We conclude $D\le 0$.

More down-to-earth you might notice that
$$ f(x)=Ax^2+Bx+C=A\left(x+\frac B{2A}\right)^2-\frac{B^2-4AC}{4A}$$
and if $A>0$ this is $\ge -\frac{B^2-4AC}{4A}$ with equality at $x=-\frac B{2A}$, so we better have $ -\frac{B^2-4AC}{4A}\ge0$ if we want $f(x)\ge0$ for all $x$.
A: We are not able to say that the discriminant of $f(x)$ is negative.  Look at exactly what you wrote:"Since $f(x) \ge 0$ for all x∈R, it follows that the discriminant of f(x) is negative, i.e.,  $$\left(\sum_{i=1}^{n}a_ib_i\right)^2-\left(\sum_{i=1}^{n}a_i^2\right)\left(\sum_{i=1}^{n}b_i^2\right)\leqslant0$$.  This inequality does not follow from what you said (i.e. it is not a strict inequality, which your statement implies).  We don't know the discriminant is negative, it could be $0$.  We know it can't be positive, for then the quadratic would have two real roots, but since $f(x) \ge$  $0$ $\forall$ $x$ $ \in \mathbb{R}$, it can have at most 1 real root.
