Proof of Cauchy–Schwarz inequality

I was reading about the Cauchy–Schwarz inequality from Courant, Hilbert - Methods Of Mathematical Physics Vol 1 and I can not understand what they mean when they said the line that has been highlighted with red in the picture given below

I can not understand why a and b has to be proportional and why is this so crucial for the roots to be imaginary and why we want the roots to be imaginary in the first place. • Try having a look at the very first pages of Steele, The Cauchy-Schwarz Master Class, here. You might find it useful. – Giuseppe Negro Jan 28 '13 at 18:19
• I am familiar with the proof give in Steele's book. But I am trying to understand this particular proof (i.e., the one form Hilbert and Courant.) – noir1993 Jan 28 '13 at 18:30

Hint: The quadratic equation $ax^2+bx+c=0$ has real roots if and only if $b^2-4ac\ge 0$.

Added: The quadratic polynomial $\sum_1^n (a_ix+b_i)^2$ is a sum of squares. Thus this polynomial is always $\ge 0$.

Recall that a quadratic $ax^2+bx+c$, where $a\gt 0$, is always $\ge 0$ if and only if the discriminant $b^2-4ac$ is $\le 0$. Compute the discriminant of the messy quadratic. The inequality $b^2-4ac\le 0$ turns out to be precisely the C-S Inequality (well, we have to divide by $4$).

As to when we have equality, the quadratic has a real root $k$ if and only if $a_ik+b_i=0$ for all $i$. This is the case iff $b_i=-ka_i$, meaning that the $a_i$ and $b_i$ are proportional.

By the way, things are I think marginally prettier if we look at the polynomial $\sum_1^n (a_ix-b_i)^2$.

• @AchiralSarkar If you're referring to the statement "where the equality holds if and only if the $a_i$ and the $b_i$ are proportional", the author means that the inequality is strict iff they are not proportional, and the $\leq$ becomes $=$ iff they are proportional – valtron Jan 28 '13 at 18:28
• The "messy" quadratic in your post is a sum of squares, so can only be $0$ if $a_ix+b_i=0$ for all $i$. That gives a single solution $x$, and $x=b_i/a_i$ for all $i$, so we get a solution iff all the $b_i/a_i$ are equal, i.e. there is a constant $k$ such that $b_i=ka_i$ for all $i$. In all other cases, the discriminant $b^2-4ac\lt 0$. If you plug in what $a$, $b$, and $c$ are into the inequality $b^2-4ac\lt 0$, you will get the C-S Inequality. – André Nicolas Jan 28 '13 at 18:32
• As I wrote above, the polynomial $\sum (b_ix+a_i)^2$ is a sum of squares. If $x$ is real, $b_ix+a_i$ is real, so $(b_ix+a_i)^2\ge 0$. Thus the only way the sum can be $0$ is if all the terms are $0$. – André Nicolas Jan 28 '13 at 18:38
• @AndréNicolas why is a quadratic always $\geq 0$ if and only if the discriminant $b^2 - 4ac \leq 0$? This part is what I don't understand. Could you please explain? – Kamil Jul 20 '15 at 20:24
• @Kamil: I was being imprecise. Our quadratic has lead coefficient which is a sum of squares, so $a\gt 0$. Thus the curve $y=ax^2+bx+c$ is an upward facing parabola. It is always $\ge 0$ if the equation $ax^2+bx+c=0$ has no real roots, or just one real root. By the quadratic formula, there are no real roots if $b^2-4ac$ is negative, and one real root (a "double" root) if $b^2-4ac=0$. – André Nicolas Jul 20 '15 at 20:43

The expression $\displaystyle\sum_{i=1}^n (a_i x + b_i)^2$ cannot be negative since it's a sum of squares of real numbers, and cannot be zero unless every term is zero, in which case, since $a_i x=b_i$, the vectors $\vec{a}$ and $\vec{b}$ are proportional, and $x$ is the constant of proportionality.

Therefore the quadratic equation can have a real solution for $x$ only if the two vectors are proportional, in which case it has only one solution. If a quadratic equation with real coefficients has no real solutions or only one, then its discriminant is non-positive. In this case the discriminant is $$\left(2\sum_{i=1}^n a_i b_i\right)^2 - 4\left(\sum_{i=1}^n a_i \right)\left(\sum_{i=1}^n b_i\right).$$ That expression must therefore be $\le0$, and $=0$ only if the two vectors are proportional. From that, the Cauchy-Scharz inequality follows.

We have the equation $$\sum_{i=1}^n(a_ix+b_i)^2 =x^2\sum_{i=1}^na_i^2+2x\sum_{i=1}^na_ib_i+\sum_{i=1}^nb_i^2\tag{1}$$ If there were two distinct real roots of the right hand side of $(1)$, then the minimum of the quadratic would be at their average and would be less than $0$; this because the positive coefficient of $x^2$ yields strict convexity. However, if there were an $x$ so that the right hand side were less than $0$, the left hand side would yield a sum of squares that was negative.

$\Rightarrow$ the roots cannot be real and distinct

The only possibility for a real root would be in the case where the left hand side of $(1)$ were $0$. for that to occur, each term in the sum would need to be $0$. That is, for all $0\le i\le n$, $$b_i=-a_ix\tag{2}$$ $\Rightarrow$ $a$ and $b$ must be proportional.

If the roots of the right hand side of $(1)$ are equal or non-real, we have, from the quadratic formula, that $$\left(2\sum_{i=1}^na_ib_i\right)^2-\ 4\left(\sum_{i=1}^na_i^2\right)\left(\sum_{i=1}^nb_i^2\right)\le0\tag{3}$$ which upon rearrangement is Cauchy-Schwarz.

$\Rightarrow$ we want the roots of the right hand side of $(1)$ to be equal or non-real.