# Cauchy-Schwarz Inequality

The Cauchy-Schwarz Inequality (which is known by other names, including Cauchy's Inequality) states that, for two sets of real numbers $a_1,a_2,\ldots,a_n$ and $b_1,b_2,\ldots,b_n$, the following inequality is always true:

$\displaystyle({a_1}^2+{a_2}^2+...+{a_n}^2)({b_1}^2+{b_2}^2+...+{b_n}^2)\geq(a_1b_1+a_2b_2+...+a_nb_n)^2$

Equality holds if and only if $\frac{a_1}{b_1}=\frac{a_2}{b_2}=...=\frac{a_n}{b_n}$.

There are many ways to prove this; one of the more well-known is to consider the equation $(a_1x+b_1)^2+(a_2x+b_2)^2+...+(a_nx+b_n)^2=0$. If we expand the squares and collect like terms, the equation becomes a Quadratic Equation in $x$. By the Trivial Inequality, we know that the left-hand-side of the original equation is always at least 0, so either both roots are Complex Numbers, or there is a double root at $x=0$. Either way, the Discriminant of the equation is nonpositive. Taking the discriminant of the equation, setting it less than or equal to 0, and moving the negative part to the other side of the inequality, we are given the Cauchy-Schwarz Inequality. Note that this also gives us the equality case; equality holds if and only if the discriminant is equal to 0, which is true if and only if the equation has 0 as a double root, which is true if and only if $\frac{a_1}{b_1}=\frac{a_2}{b_2}=...=\frac{a_n}{b_n}$.

This inequality is used very frequently to solve Olympiad-level Inequality problems, such as those on the USAMO and IMO.