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?