# Why the last step of this proof of the Cauchy-Schwarz inequality is valid?

I have a doubt about the following proof of the Cauchy-Schwarz inequality:

Proof of the book

We can prove the Cauchy-Schwarz inequality by letting \begin{array} > P&=a_1^2+a_2^2+\cdots+a_n^2 \\ Q&=a_1b_1+a_2b_2+\cdots+a_nb_n \\ R&=b_1^2+b_2^2+\cdots +b_n^2 \\ \end{array} be the coefficients of the quadratic $f(x)=Px^2-2Qx+R$.

Now, since $f(x)$ is a sum of squares, we have $f(x)\ge0$ for any real number $x$. Since $f(x)$ is never negative, it cannot have two distinct real roots, and therefore its discriminant must be non-positive. This gives us $(-2Q)^2-4PR \le 0 ,$ from which we have the desired $PR \ge Q^2.$

Now my question concern the last step of this proof where the author can claim that the discriminant of $f(x)$ must be $(-2Q)^2-4PR \le 0.$ Why can this be done?

Since $f(x)$ must have $2$ roots, these two roots must both be complex as I can't have one real and one complex root, therefore I can't have that $(-2Q)^2-4PR$ is both less and equal to $0$ as I would allow to have one real root.

What am I missing here?

• This is a known fact about the discriminant of a second degree polynomial Jan 5, 2016 at 19:20
• Can you please tell me to what fact are you referring to ? Jan 5, 2016 at 19:21
• One can have one real double root (and one does when $a_k=\alpha b_k$ for every $k$, for some $\alpha$).
– Did
Jan 5, 2016 at 19:28
• The two roots can be the same, and real. or they have to both be complex. Jan 5, 2016 at 19:28
• "since f(x)f(x) is a sum of squares"??? It looks to me that $f(x)=[\sum_{k=1}^n (xa_k-b_k)]^2$ is the square of a sum. Jan 5, 2016 at 19:29

The formula for the roots of a quadratic states that the roots of $Ax^2+Bx+C$ are $$\frac{-B \pm \sqrt{B^2 - 4AC}}{2A}.$$ Suppose that $A,B,C$ are all real. If $B^2-4AC > 0$ then we get two distinct real roots. If $B^2 = 4AC$ then there is a double real root. Otherwise there are no real roots.
In this case, there cannot be two distinct real roots $x_1,x_2$, since the function changes sign when crossing $x_1$ (since the roots are single), and so it would be negative at some $x$, contradicting the conclusion that it's always non-negative. So $B^2-4AC>0$ cannot be true, that is, $B^2-4AC \leq 0$.
• so if we have ,for example, $f(x)=(x-2)^2$ I would have that the real roots are $x=2$, $x=2$ ,even though they're the same ? Jan 5, 2016 at 19:28