I was reading a proof of the Cauchy-Schwarz inequality (elementary form). However, I was unable to understand some part of it. Here is the proof:
Proof: Consider the following quadratic polynomial $$f(x)=\sum_ {i=1}^ n (a_ix-b_i)^2=(\sum_ {i=1}^ n a_i^2)x^2-2(\sum_ {i=1}^ n a_ib_i)x+\sum_ {i=1}^ n b_i^2$$ $\color{red}{\textrm{Since $f(x) \geq 0$ for any $x \in \mathbb{R}$, it follows that the discriminant of $f(x)$ is negative or zero}}$, i.e., $$4(\sum_ {i=1}^ n a_ib_i)^2-4(\sum_ {i=1}^ n a_i^2)(\sum_ {i=1}^ n b_i^2) \leq 0$$ This follows the desired inequality. $\blacksquare$
I am unable to understand the red part. I understand that $f(x) \geq 0$ for any $x \in \mathbb{R}$. But how does this imply that the discriminant is negative or zero?
See
$f(x)=\sum_ {i=1}^ n (a_ix-b_i)^2$
Clearly $f(x)$ will be non-negative as it is sum of squares of real some real numbers
Therefore we can write $f(x)\geq 0$
Now let's turn to otgere form of $f(x)$
$f(x)=(\sum_ {i=1}^ n a_i^2)x^2-2(\sum_ {i=1}^ n a_ib_i)x+\sum_ {i=1}^ n b_i^2$
Clearly this is a quadratic equation (assuming at least when $a_i\neq 0$)
Now coefficient of $x^2$ is $\sum_ {i=1}^ n a_i^2$ which will be always positive (under our assumption), therefore the parabola corresponding to equation will open upwards.
Three cases arise:
$1)$ $D<0$
In this case our quadratic equation will have no real roots , therefore to satisfy this condition our parabola must always be above $x-$ axis because if it comes a little down the x-axis then it will have to cross it ( since it will extend to $\infty$
) giving two real roots. Therefore parabola remains above x-axis and hence y-coordinate of all points on parabola is positive. Hence $D<0$ satisfies $f(x)>0$ for all real x
$2)$ $D=0$
In this case our quadratic equation will have repeated roots therefore the parabola will only touch x-axis while remaining above it only. therefore this condition satisfies $f(x)\geq 0$ for all real x
$3)$ $D>0$
Now the equation will have two real roots and therefore parabola will be below $x-$ axis between the roots therefore $f(x)\ngeq 0$ for all real x
Therefore now you can easily figure out what does red line wants to convey.