# Understanding Cauchy–Bunyakovsky–Schwarz inequality.

If $u$ and $v$ are two vectors, then $\langle u,v \rangle = u_1v_1+\cdots+u_dv_d$

$\|u\|$ defined by $\|u\|^2=u_1^2+\cdots+u_d^2$, is the euclidean norm of $u$. Now, if $t$ is a scalar:

It is easy to see that $\|u+tv\|^2=\|u\|^2+t^2\|v\|^2+2t\langle u,v \rangle \geq 0$. (why

I don't understand two implications of this:

First, why the discriminant of the binomial of second degree on the right has to be negative or zero, and therefore:

$$(\langle u,v \rangle)^2 \leq \|u\|^2\|v\|^2$$

Second, why a vector is a scalar multiple of the other if and only if the discriminant is zero.

• The only polynomials of degree $2$ that have a constant sign have nonpositive discriminant, otherwise they would change sign when crossing any of their two roots. // If the discriminant is zero, there is areal root $t_0$, and $u+t_0v=0$, qed. – Did Sep 20 '17 at 13:40

First note that $\langle \cdot,\cdot \rangle$ on $\mathbb{R}^n$ has the following properties:

(1) (Symmetry): $\langle u,v \rangle = \langle v,u \rangle$

(2) (Linearity in first argument): $\langle \alpha u_1+\beta u_2, v \rangle =\alpha \langle u_1,v\rangle +\beta\langle u_2 v\rangle$

(3) (Positive definite) $\langle x,x\rangle \ge 0$, and $\langle x,x \rangle = 0$ iff $x=0$.

Moreover it satisfies $\|x\|^2 = \langle x,x \rangle$, and due to (1) and (2), it is linear in the second argument.

Using these properties we obtain \begin{align*} 0 &\le \|u+tv\|^2 \\ &= \langle u+tv, u+tv\rangle \\ &= \langle u,u\rangle + \langle u,tv\rangle + \langle tu,v\rangle+\langle tv,tv\rangle \\ &= \langle u,u\rangle + t\langle u,v\rangle + t\langle u,v\rangle+\langle tv,tv\rangle \\ &= \|u\|^2 + 2t\langle u,v \rangle+t^2\|v\|^2. \end{align*} Thus the quadratic polynomial $t\mapsto \|v\|^2t^2 + 2\langle u,v\rangle t + \|u\|^2$ is always nonnegative. This implies that it has at most one real root. By the quadratic formula, it's roots are given by $$\frac{-2\langle u,v\rangle\pm\sqrt{4\langle u,v\rangle^2-4\|u\|^2\|v\|^2}}{2\|v\|^2}.$$ Thus the polynomial has no real roots iff the discriminant $4\langle u,v\rangle^2-4\|u\|^2\|v\|^2$ is negative, and it has exactly one real root iff the discriminant $4\langle u,v\rangle^2-4\|u\|^2\|v\|^2$ is zero. Thus we know that the discriminate is nonpositive, giving $$4\langle u,v\rangle^2-4\|u\|^2\|v\|^2 \le 0,$$ which is equivalent to $\langle u,v\rangle^2 \le \|u\|^2\|v\|^2$ and thus equivalent to $\langle u,v\rangle \le \|u\|\|v\|$, as desired.

Furthermore, it shows that we have the equality $\langle u,v\rangle =\|u\|\|v\|$ if and only if $\|u+tv\|=0$. This is equivalent to having $u+tv=0$, which means that $u$ is a scalar multiple of $v$.

There is a slightly easier way to see it$\newcommand\inner[2]{\left\langle #1, #2 \right\rangle}$. For $y \ne 0$ we have:

\begin{align}\inner{x}{x}\inner{y}{y} - \inner{x}{y}^2 &= \frac{1}{\inner{y}{y}}\Big\langle\inner{y}{y}x - \inner{x}{y}y, \inner{y}{y}x - \inner{x}{y}y\Big\rangle \\ &= \frac{1}{\|y\|^2}\big\|\inner{y}{y}x - \inner{x}{y}y\big\|^2\\ &\geq 0 \end{align}

• The first equality is up to factor $⟨y, y⟩$. – user87690 Sep 20 '17 at 14:22
• @user87690 Thanks, fixed. – mechanodroid Sep 20 '17 at 14:37