# Cauchy Schwarz Inequality for numbers

The CS inequality is given by

I read that if $x_1 = cy_1$ and $x_2 = cy_2$, then equality holds.

But I reduced the above to $c \leq \sqrt{c^2} = |c|$. So isn’t this only true if $c > 0$?

Assume $x_1,\dots,y_2$ are real numbers. We have This is the case $n=2$ of an identity due to Lagrange.
This means that $|x_1y_1+x_2y_2|\le\sqrt{x_1^2+y_1^2}\sqrt{y_1^2+y_2^2}$, with equality iff that is, iff either there is a constant $c$ such that $x_1=cy_1$ and $x_2=cy_2$, or else $y_1=y_2=0$.
Since $a\le|a|$ for any real number $a$, it follows that $x_1y_1 + x_2y_2 \leq \sqrt{x_1^2 + x_2^2}\sqrt{y_1^2 + y_2^2}$, with equality as above, except that now we further need $c\ge 0$.