Consider the two n-dimensional vectors:
a=⟨a1,a2,...,an⟩ and b=⟨b1,b2,...,bn⟩.
A simple calculation shows ∣a∣2∣b∣2=(a12+a22+...+an2)(b12+b22+...+bn2).
In addition: (a⋅b)2=(a1b1+a2b2+...+anbn)2.
Let θ be the angle between vectors a and b when the two are placed with their initial points at the same location.
We know that (a⋅b)=∣a∣∣b∣cosθ.
Since −1≤cosθ≤1, 0≤cos2θ≤1.
Therefore, (a⋅b)2=∣a∣2∣b∣2cos2θ≤∣a∣2∣b∣2.
Plugging in our earlier expressions yields the Cauchy-Schwarz Inequality:
(a12+a22+...+an2)(b12+b22+...+bn2)≥(a1b1+a2b2+...+anbn)2.
The vectors also give us a very nice way of seeing when equality holds.
Clearly, equality holds if and only if cos2θ=1, which means that the vectors a and b are parallel.
This happens if and only if there is a real number k such that ka=b, or if one or both of the vectors are the zero vector.
Thus, equality holds if and only if one or more of the following conditions hold (we must make a special case to avoid division by zero):
b1=b2=...=bn=0b1a1=b2a2=...=bnan
Here is another (and very simple) proof for the Cauchy-Schwartz Inequality.
Above, we have a quadratic inequality in the form ax2+bx+c≥0
On a graph, this will look something like these:
x
y
x
y
This is because (a12+a22+...+an2)x2−2(a1b1+a2b2+...+anbn)x+(b12+b22+...+bn2) will always be greater or equal to 0. In these cases, since the graph either intersects the x-axis at one point (has one solution) or does not intersect it at all (no solution), we can use the discriminant b2−4ac≤0 where