Proofs of the Cauchy-Schwarz Inequality?

$\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}\newcommand{\i}{\mathrm{i}}\newcommand{\text}[1]{\mathrm{#1}}\newcommand{\root}[2][]{^{#2}\sqrt[#1]} \newcommand{\derivative}[3]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\abs}[1]{\left\vert\,{#1}\,\right\vert}\newcommand{\x}[0]{\times}\newcommand{\summ}[3]{\sum^{#2}_{#1}#3}\newcommand{\s}[0]{\space}\newcommand{\i}[0]{\mathrm{i}}\newcommand{\kume}[1]{\mathbb{#1}}\newcommand{\bold}[1]{\textbf{#1}}\newcommand{\italic}[1]{\textit{#1}}\newcommand{\kumedigerBETA}[1]{\rm #1\!#1}$

Here's a simple proof:

$|\vec{x}\cdot\vec{y}| \leq \|\vec{x}\|\|\vec{y}\| $

Substitute $|\vec{x}\cdot\vec{y}| = \|\vec{x}\|\|\vec{y}\|\cos \theta$

$| \|\vec{x}\|\|\vec{y}\|\cos \theta |\leq \|\vec{x}\|\|\vec{y}\| $

Divide both sides by $\|\vec{x}\|\|\vec{y}\|$

$ | \cos \theta| \leq 1$

-Hey, I was looking for a "more serious" proof!

Then here you are!

Here's another simple proof:

This is projecting a vector to another one (Click the gif if it doesn't load):

You drag its end in a line that is perpendicular to the other vector. Then multiply the length of the new vector with the old vector.

Do you know what the multiplication is equal to? The dot product of the vectors

When you project that vector, its norm (length) becomes lower - or stays the same if one of them is a scalar multiple of the other one.

^^ That was the proof. Think about it.

Source: $3$Blue$1$Brown

Wait, I look for a "really serious" proof!

Here you are.

Another proof:

Let $p(t)=||t\vec{y}-\vec{x}||^2$

As there's an absolute value, it must be equal to or bigger than $0$.

$p(t)=||t\vec{y}-\vec{x}||^2\geq 0$

$p(t)=(t\vec{y}-\vec{x})(t\vec{y}-\vec{x})\geq 0$

$p(t)=t^2(\vec{y}\cdot \vec{y})-2t(\vec{x}\cdot\vec{y})+\vec{x}\cdot \vec{x}\geq0$

Let's substitute some things.

$p(t)=t^2\underbrace{(\vec{y}\cdot \vec{y})}_\color{blue}{\large a}+t\underbrace{(-2\vec{x}\cdot\vec{y})}_\color{red}{\large b}+\underbrace{(\vec{x}\cdot \vec{x})}_\color{green}{\large c}\geq0$

$p(t)=\color{blue}{a}t^2+\color{red}{b}t+\color{green}{c}\geq0$

Its minimum value must be $\large \frac{-\color{red}{b}}{2\color{blue}{a}}$

Substituting $\large t= \frac{-\color{red}{b}}{2\color{blue}{a}}$

$p(\frac{-\color{red}{b}}{2\color{blue}{a}})=\color{blue}{a}(\frac{-\color{red}{b}}{2\color{blue}{a}})^2+\color{red}{b}(\frac{-\color{red}{b}}{2\color{blue}{a}})+\color{green}{c}\geq0$

$p(\frac{-\color{red}{b}}{2\color{blue}{a}})=\color{blue}{a}(\frac{\color{red}{b}^2}{4\color{blue}{a}^2})+\color{red}{b}(\frac{-\color{red}{b}}{2\color{blue}{a}})+\color{green}{c}\geq0$

$p(\frac{-\color{red}{b}}{2\color{blue}{a}})=\frac{\color{red}{b}^2}{4\color{blue}{a}}+\frac{-\color{red}{b}^2}{2\color{blue}{a}}+\color{green}{c}\geq0$

Forget the $\large p(t)$ function side (LHS)

$\frac{\color{red}{b}^2}{4\color{blue}{a}}+\frac{-\color{red}{b}^2}{2\color{blue}{a}}+\color{green}{c}\geq0$

Multiply by $\large 4\color{blue}{a}$

$\color{red}{b}^2-2\color{red}{b}^2+4\color{blue}{a}\color{green}{c}\geq0$

$-\color{red}{b}^2+4\color{blue}{a}\color{green}{c}\geq0$

$4\color{blue}{a}\color{green}{c}\geq \color{red}{b}^2$

De-substitute

$p(t)=t^2\underbrace{(\vec{y}\cdot \vec{y})}_\color{blue}{\large a}+t\underbrace{(-2\vec{x}\cdot\vec{y})}_\color{red}{\large b}+\underbrace{(\vec{x}\cdot \vec{x})}_\color{green}{\large c}\geq0$

$4\color{blue}{(\vec{y}\cdot \vec{y})}\color{green}{(\vec{x}\cdot \vec{x})}\geq \color{red}{(-2\vec{x}\cdot\vec{y})}^2$

Using the identity $\large \vec{v}\cdot\vec{v}=||\vec{v}||^2$

$4\color{blue}{||\vec{y}||^2}\color{green}{||\vec{x}||^2}\geq \color{red}{(-2\vec{x}\cdot\vec{y})}^2$

Using the identity $(f(x))^2=(|f(x)|)^2$ (where $f(x)\in\kume{R}$)

$4\color{blue}{||\vec{y}||^2}\color{green}{||\vec{x}||^2}\geq \color{red}{(|-2\vec{x}\cdot\vec{y}|)}^2$

As the both sides are not negative, you can square root both sides.

$2\color{blue}{||\vec{y}||}\color{green}{||\vec{x}||}\geq \color{red}{|-2\vec{x}\cdot\vec{y}|}$

$2\color{blue}{||\vec{y}||}\color{green}{||\vec{x}||}\geq \color{red}{2|\vec{x}\cdot\vec{y}|}$

$\large\color{blue}{||\vec{y}||}\color{green}{||\vec{x}||}\geq \color{red}{|\vec{x}\cdot\vec{y}|}$

This one was from KhanAcademy


Here is a nice simple proof. Fix, $X,Y\in \mathbb{R}^n$ then we wish to show $$ X\cdot Y \leq \|X\|\|Y\| $$ the trick is to construct a suitable vector $Z\in \mathbb{R}^n$ and then use the property of the dot product $Z\cdot Z \geq 0$. Take $$ Z = \frac{X}{\|X\|}-\frac{Y}{\|Y\|} $$ then we compute $Z\cdot Z$ \begin{align} Z\cdot Z &= \frac{X\cdot X}{\|X\|^2}-2\frac{X\cdot Y}{\|X\|\|Y\|}+\frac{Y\cdot Y}{\|Y\|^2}\\ &=2 - 2\frac{X\cdot Y}{\|X\|\|Y\|} \end{align} then we use $Z\cdot Z \geq 0$ to write \begin{align} 2-2\frac{X\cdot Y}{\|X\|\|Y\|}\geq 0\\ 2\geq 2\frac{X\cdot Y}{\|X\|\|Y\|}\\ \|X\|\|Y\|\geq X\cdot Y \end{align} and we are done.


Here is one:

Claim: $|\langle x,y \rangle| \leq \|x\|\|y\| $

Proof: If one of the two vectors is zero then both sides are zero so we may assume that both $x,y$ are non-zero. Let $t \in \mathbb C$. Then

$$ \begin{align} 0 \leq \|x + ty \|^2 &= \langle x + ty, x + ty\rangle \\ &= \langle x,x\rangle + \langle x,t y\rangle + \langle yt, x\rangle + \langle ty,ty\rangle \\ &= \langle x,x\rangle + \bar{t} \langle x,y\rangle + t \overline{\langle x,y\rangle} + |t|^2 \langle y,y\rangle \\ &= \langle x,x\rangle + 2 \Re(t \overline{\langle x,y\rangle}) + |t|^2 \langle y,y\rangle \end{align}$$

Now choose $t := -\frac{\langle x, y \rangle}{\langle y, y \rangle}$. Then we get $$ 0 \leq \langle x,x\rangle + 2 \Re(- \frac{|\langle x,y\rangle|^2}{\langle y, y \rangle}) + \frac{|\langle x,y\rangle|^2}{\langle y, y \rangle} = \langle x, x \rangle - \frac{|\langle x,y\rangle|^2}{\langle y, y \rangle}$$

And hence $|\langle x,y \rangle| \leq \|x\|\|y\| $.

Note that if $y = \lambda x$ for $\lambda \in \mathbb C$ then equality holds: $$ |\lambda|^2 |\langle x, x \rangle| = |\lambda|^2 \|x\|\|x\| $$