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" ??