Cauchy Schwarz Inequality for numbers The CS inequality is given by 

$$x_1y_1 + x_2y_2 \leq \sqrt{x_1^2 + x_2^2}\sqrt{y_1^2 + y_2^2}$$

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$?
 A: Assume $x_1,\dots,y_2$ are real numbers. We have $$(x_1^2+x_2^2)(y_1^2+y_2^2)-(x_1y_1+x_2y_2)^2=(x_1y_2-x_2y_1)^2.$$ This is the case $n=2$ of an identity due to Lagrange. 
(See more on this, positive polynomials, sums of squares of polynomials, and Hilbert's 17th problem, in this old blog post of mine.)
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 $$\det\left(\begin{array}{cc}x_1&y_1\\ x_2&y_2\end{array}\right)=0,$$ 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$.
A: $c\le|c|$ ins't restricts to $c>0$
A: Suppose $(x_1,x_2)=c(y_1,y_2)$, then
$$
\begin{align}
x_1y_1+x_2y_2&=cy_1^2+cy_2^2\\
x_1^2+x_2^2&=c^2y_1^2+c^2y_2^2
\end{align}
$$
Therefore,
$$
\begin{align}
x_1y_1+x_2y_2
&=\frac{c}{|c|}\sqrt{x_1^2+x_2^2}\sqrt{y_1^2+y_2^2}\\
&=\pm\sqrt{x_1^2+x_2^2}\sqrt{y_1^2+y_2^2}
\end{align}
$$
Thus, the equality only holds for $c\ge0$.
However, the inequality
$$
|x_1y_1+x_2y_2|\le\sqrt{x_1^2+x_2^2}\sqrt{y_1^2+y_2^2}
$$
holds, and this equality holds if $(x_1,x_2)=c(y_1,y_2)$ for any $c$.
