# Proof of Cauchy-Schwarz Inequality

Here is the proof of the Cauchy-Schwarz inequality. I couldn't understand how the writer inferred that putting $x=-\frac{B}{A}$ in (1.24) proves the theorem, could you please expand it for me?

• If $A > 0$, then the function $A(x-\gamma)^2 + \delta$ attains its minimum where $(x-\gamma)^2$ is minimal. $(x-\gamma)^2$ is minimal for $x = \gamma$, as it is then $0$, and squares of real numbers are non-negative. Commented May 10, 2015 at 18:33
• I already know it. The point that I've asked is how this fact proves the theorem. Commented May 10, 2015 at 18:37
• It follows that the constant term $\delta = \frac{AC-B^2}{A}$ is non-negative, since the quadratic doesn't attain any negative values. And that is equivalent to $AC - B^2 \geqslant 0$, since $A > 0$ (the case $A = 0$ was dealt with previously). And $AC - B^2 \geqslant 0$, or equivalently $AC \geqslant B^2$ is exactly the thing that is to prove. Commented May 10, 2015 at 18:40
• Thanks for answer Daniel! I see the point now. Commented May 10, 2015 at 18:54

What we want to prove is $$\left|\sum_{k=a}^n a_k b_k\right| \le \sqrt{\sum_{k=1}^n a_k^2 \sum_{k=1}^n b_k^2\quad{}},$$ or equivalently $$\left( \sum_{k=a}^n a_k b_k \right)^2 \le \sum_{k=1}^n a_k^2 \sum_{k=1}^n b_k^2.$$ We have \begin{align} A & = \sum_{k=1}^n a_k^2, \\[6pt] B & = \sum_{k=1}^n a_k b_k, \\[6pt] C & = \sum_{k=1}^n b_k^2. \end{align} So the goal is to prove $B^2\le AC$, with equality only if there is some scalar $x$ such that $x(a_1,\ldots,a_n)=(b_1,\ldots,b_n)$.

Notice that since $A=a_1^2+\cdots+a_n^2$, $A$ cannot be negative. Then notice that $$\left( x + \frac B A \right)^2\qquad \begin{cases} =0 & \text{if }x=-B/A, \\[6pt] > 0 & \text{if }x\ne -B/A. \end{cases}$$ Consequently $$A x^2 + 2Bx + C \qquad\begin{cases} = \dfrac{B^2-AC} A & \text{if }x=-B/A, \\[6pt] >\dfrac{B^2-AC} A & \text{if }x\ne B/A. \end{cases}$$ Thus the smallest possible of $Ax^2+2Bx+C$ is $\dfrac{B^2-AC} A$.

The smallest possible value cannot be negative since $Ax^2+2Bx+C$ is a sum of squares: $$Ax^2+2Bx+C = (a_1 x+b_1)^2+\cdots+(a_n x+b_n)^2. \tag 1$$ Hence $\dfrac{B^2-AC} A\le 0$. Since $A>0$, this implies $B^2-AC\le 0$, which was to be proved.

We can have $B^2-AC=0$ only if for some $x$, the sum in $(1)$ is $0$. But that can happen only if every term in the sum is $0$, and that implies that for some $x$ we have $x(a_1,\ldots,a_n)=(b_1,\ldots,b_n)$.

Hint. You may write $$f(x)=Ax^2+2Bx+C$$ then $$f'(x)=2Ax+2B=2(Ax+B)$$ and consider solutions $x$ of $$f'(x)=0.$$

It is because $Ax^2+2Bx+C\ge 0$ for all $x$ implies its minimum $\dfrac{AC-B^2}\ge 0$, which is equivalent to $B^2\le 0$ or $\lvert B\rvert \le\sqrt A\,\cdot \sqrt B$, which is exactly Cauchy-Schwarz inequality.

Alternatively, without having to complete the squre, one might directly say the reduced discriminant $\Delta'=B^2-AC\le 0$.

• this is not the answer please read again the question Commented May 10, 2015 at 18:25
• See my updated answer. I misunderstood your problem. Commented May 10, 2015 at 18:33

Specifically, the term in parentheses on the right-hand side is a quadratic function, opening upward, with a double root at $x = -\frac{B}{A}$. The other term on the right-hand side is a constant, and therefore does not affect the location minimum of the function. Hence, the minimum must be attained at the minimum of the quadratic, which is the location of its double root.