# Proofs of the Cauchy-Schwarz Inequality?

How many proofs of the Cauchy-Schwarz inequality are there? Is there some kind of reference that lists all of these proofs?

• I've slightly edited the body your question in order to make it self-contained. I've also added the real-analysis tag.
– t.b.
Feb 24, 2011 at 12:58
• I would try the book "The Cauchy-Schwarz Masterclass". Feb 24, 2011 at 13:03
• @user3533: excellent. I got that book. It seems that this textbooks also talks about few other inequalities that I was going to study. Do you know any other references that basically is about different kind of inequalities and their proofs? Thanks Feb 24, 2011 at 13:30
• @Vafa: many Olympiad preparation books include sections on inequalities. There is also Kedlaya's notes: artofproblemsolving.com/Resources/Papers/… Feb 24, 2011 at 13:35
• Your first question is essentially unanswerable, except, maybe, by "many"... Feb 24, 2011 at 22:52

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.

$$\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.

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}|}$$

• @Magnus For any $\vec{x}$ and $\vec{y}$, $p(t)$ can be constructed. (Sorry for being late to respond) Sep 5, 2020 at 11:58
• @Rumi As a property of them, cos of any real number and sin of any number is between (inclusive) -1 and 1. If we take take the absolute value, it would be between 0 and 1 inclusive. Jun 26, 2021 at 6:57
• @Rumi No no no this is the way of proving that is easier to read but validity: not so much. My answer is more like "Let's open up this inequality and see if we can recognize anything we already know" What I did in the answer can be followed from the end to the beginning with no problems such as, no division or multiplication by zero. If I did those, reading from beginning to end would make sense but the other way wouldn't. My answer is meaningful because it is also valid backwards. You're completely correct, but I didn't do that because that way, it wouldn't be meaningful to humans. Jun 27, 2021 at 4:49
• Starting from cos would be the correct way but the common response would be "How did you think of starting from cos and manipulating it? How am I supposed to think of that to prove this?" Well, some stuff are really unthinkable such as integrating 1/sin x, but not this. One way to write it validly and readably at the same time is starting every line with biconditional "$\leftrightarrow$" which means "while reading, also observe/validate that it is correct to derive equation $n$ from equation $n+1$ and also vice verse". Without the biconditional mark, someprofsarestrictlikeyouaboutforwardproofs Jun 27, 2021 at 4:54
• (out of char limit) So you're right. 1) rigorously no but some profs accept it while this is educationally the better way 2) this is not a proof method. Advice: this can substitute backwards proofs if every line starts with biconditional. With the biconditional, it doesn't matter to which direction you prove Jun 27, 2021 at 4:56

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\|$$

• I think that a proof of the Cauchy-Schwarz inequality should also include a discussion of the equality case (which is also straightforward from this argument).
– t.b.
Jul 2, 2012 at 9:55
• @t.b. Like this? Jul 2, 2012 at 10:22
• This is half of what I had in mind. More interesting is the fact that if equality $\lvert\langle x,y\rangle\rvert = \lVert x\rVert \lVert y \rVert$ holds then $y = \lambda x$ or $x = 0$.
– t.b.
Jul 2, 2012 at 10:26
• In other words: equality holds if and only if $x$ and $y$ are linearly dependent.
– t.b.
Jul 2, 2012 at 10:33
• It doesn't help to use the angle, since that is defined in terms of the inner product. It's just that $\|x+ty\|^2=0$ iff $x+ty=0$ iff $x=-ty$ (with your choice of $t$). Jul 2, 2012 at 11:10

Here is the proof from Introductory Real Analysis'', Kolmogorov & Fomin, Silverman Translation. Assume all sums are from $$1$$ to $$n$$.

Lemma (Lagrange identity): $$\left( \sum_i x_i y_i \right)^2 = \left( \sum_i x_i^2 \right) \left( \sum_i y_i^2 \right) - \frac{1}{2} \sum_i \sum_j (x_iy_j -x_jy_i)^2$$

Proof of Cauchy-Schwarz: The third term in the Lemma is always non-positive, so clearly $$( \sum_i x_i y_i )^2 \leq (\sum_i x_i^2)(\sum_i y_i^2)$$ .

Proof of Lemma: The left hand side (LHS), and the right hand side (RHS) should be shown to be equal. For the LHS write $$\text{LHS} = \left( \sum_i x_i y_i \right)^2 = \left(\sum_i x_i y_i\right)\left(\sum_j x_j y_j\right) = \sum_i\sum_j x_iy_ix_jy_j.$$ For the RHS write $$\text{RHS}= \frac{1}{2}\left(\sum_i x_i^2\right)\left(\sum_j y_j^2\right) +\frac{1}{2} \left(\sum_j x_j^2\right)\left(\sum_i y_i^2\right) - \frac{1}{2} \sum_i \sum_j (x_iy_j -x_jy_i)^2 \\ = \frac{1}{2}\sum_i\sum_j\left( x_i^2 y_j^2 + x_j^2y_i^2 - x_i^2 y_j^2 - x_j^2y_i^2 + 2 x_i y_i x_j y_j \right) = \sum_i\sum_j x_iy_ix_jy_j .$$ This shows that LHS$$=$$RHS and finishes the proof.

Without loss of generality, assume $\|y\|=1$. Write $x=\left<x,y\right>y+z$. Then $z$ is orthogonal to $y$, because $$\left<x,y\right>=\left<(\left<x,y\right>y+z),y\right>=\left<x,y\right>\left<y,y\right>+\left<z,y\right>,$$ indeed yields $\left<z,y\right>=0$. Hence $$\|x\|^2=\left<x,x\right>=|\left<x,y\right>|^2+\left<z,z\right>\geq |\left<x,y\right>|^2,$$ with equality iff $z= 0$, i.e. $x\in\mathbb{F}y$.

I find the proof posted by Eli Fonseca the shortest and perhaps the most natural one. It however is missing two minor issues:

First issue. It in fact proves that $$X \cdot Y \le \|X\| \|Y\|$$. But we need a stronger requirement about the absolute value of $$X \cdot Y$$. To correct this for cases when $$X \cdot Y$$ is negative, just apply the obtained inequality $$X \cdot Y \le \|X\| \|Y\|$$ for the vector $$-X$$.

Second issue. This is a very minor remark, but before using the vectors $${X \over \|X\|}$$ and $${Y \over \|Y\|}$$ it would be safer to consider the evident case when one of the vectors $$X$$ and $$Y$$ is zero.

In this Lecture Notes the this proof is given under Theorem 1.10 in Section 1.3: https://www.researchgate.net/publication/318066716_Linear_Algebra_Theory_and_Algorithms

Yet another proof can be done by AM-GM inequality---

In all that follows,all summations run from $$i=1$$ to $$n$$.

Let $$X^2=\sum{x_i}^2 , Y^2=\sum{y_i}^2\tag{1}$$

By Arithmetic-mean-Geometric-mean(AM-GM) inequality(i.e. AM$$\ge$$GM ),we have

$$\frac{a+b}{2}\ge\sqrt{ab}\tag{2}$$

Putting $$a=x_i^2/X^2$$ and $$b=y_i^2/Y^2$$ in $$(2)$$,we get

$$\frac{(x_i^2/X^2+y_i^2/Y^2)}{2}\ge \frac{x_iy_i}{XY}$$

Taking summation on both sides, we obtain

$$\sum\frac{(x_i^2/X^2+y_i^2/Y^2)}{2}\ge \sum\frac{x_iy_i}{XY}\tag{3}$$ Since X and Y are already summed over all $$i$$s,they are independent of the individual $$x_i$$s and $$y_i$$s and can be taken outside the summations.Therefore,the quantity on LHS can be written as,

$$\frac{\sum x_i^2}{2X^2}+\frac{\sum y_i^2}{2Y^2}=\frac{X^2}{2X^2}+\frac{Y^2}{2Y^2}=1/2+1/2=1$$ where the first equality is a consequence of $$(1)$$.

$$\therefore$$ LHS of (3) is 1. Hence,$$(3)$$becomes,

$$1 \ge \sum\frac{x_iy_i}{XY}$$ Arranging the inequality properly and putting in X and Y from $$(1)$$ and finally squaring both sides,we get

$$\left( \sum_i x_i y_i \right)^2 \le \left( \sum_i x_i^2 \right) \left( \sum_i y_i^2 \right)$$ which is the Cauchy-Schwarz inequality.

Comment on a previous answer by Pauly B., whose method can be applied to complex vectors with minor modifications.

For complex vectors $$x$$ and $$y$$, $$0 \le \langle lx + y, lx+y \rangle = |l|^2 \langle x,x \rangle + 2 \text{Re}\, (l \langle x,y \rangle) + \langle y,y \rangle$$ Take $$l = r\,\overline{\langle x,y\rangle}$$ where $$r \in \mathbb R$$. Then the above inequality reduces to $$0 \le r^2 |\langle x,y \rangle|^2 |\langle x,x\rangle| + 2 r |\langle x,y \rangle|^2 + \langle y,y \rangle,$$ where the right side is also a quadratic polynomial in $$r$$ with at most 1 real root.

The proof above applies to a general vector space with complex inner products.

I like this proof for real vectors a lot. Recall that an inner product for real vectors has the following properties:

$\langle x,y\rangle=\langle y,x\rangle$

$\langle ax+y,z\rangle=a\langle x,z\rangle+\langle y,z\rangle$

$\langle x,x\rangle\geq0$

Then $0\leq\langle lx+y,lx+y\rangle=l^2\langle x,x\rangle+l\langle x,y\rangle+l\langle y,x\rangle+\langle y,y\rangle=l^2\langle x,x\rangle+2l\langle x,y\rangle+\langle y,y\rangle$

$Let\:a=\langle x,x\rangle, b=\langle x,y\rangle,c=\langle y,y\rangle$, then the equation becomes

$al^2+bl+c\geq0$

This is a quadratic equation in $l$ with at most 1 real root. Therefore

$b^2-4ac\leq 0$

$\implies4{\langle x,y\rangle}^2-4\langle x,x\rangle\langle y,y\rangle\leq 0$

$\implies{\langle x,y\rangle}^2\leq\langle x,x\rangle\langle y,y\rangle$

Not bad huh? Sadly it doesn't work out so nicely with complex vectors $:($

There is quadruple product formulae which state that

$$({\bf{a}} \times {\bf{b}}) \cdot ({\bf{c}} \times {\bf{d}}) = \left( {{\bf{a}} \cdot {\bf{c}}} \right)\left( {{\bf{b}} \cdot {\bf{d}}} \right) - \left( {{\bf{a}} \cdot {\bf{d}}} \right)\left( {{\bf{b}} \cdot {\bf{c}}} \right) %$$

$$\begin{array}{l}{({\bf{u}} \times {\bf{v}})^2} = {{\bf{u}}^2}{{\bf{v}}^2} - {\left( {{\bf{u}} \cdot {\bf{v}}} \right)^2}\\{({\bf{u}} \times {\bf{v}})^2} \ge 0\\so\\ {{\bf{u}}^2}{{\bf{v}}^2} - {\left( {{\bf{u}} \cdot {\bf{v}}} \right)^2} \ge 0\\{({\bf{u}} \cdot {\bf{v}})^2} \le {{\bf{u}}^2}{{\bf{v}}^2}\\\left\| {{\bf{u}} \cdot {\bf{v}}} \right\| \le \left\| {\bf{u}} \right\|\left\| {\bf{v}} \right\|\end{array} %$$

Here is a more general and natural version of Cauchy-Schwarz inequality, called Gram's inequality.

Let $$V$$ be a real vector space, with a positive definite symmetric bilinear function $$(x,y) \rightarrow \langle x, y \rangle$$.
Examples : $$V = \mathbb{R}^n$$ with $$\langle x, y \rangle = x^{T} y$$ ; $$V = \{$$ all continuous functions $$[a,b] \rightarrow \mathbb{R} \, \}$$ with $$\langle f, g \rangle = \int_{a}^{b} f(t) g(t) dt$$.

Key Lemma : Let $$v_1, \ldots, v_k \in V$$ be linearly independent, and $$U = \text{span}\{v_1, \ldots, v_k \}$$. Then $$U$$ has an orthonormal basis (that is, there exists a basis $$e_1, \ldots, e_k$$ of $$U$$, such that $$\langle e_i, e_j \rangle$$ is $$1$$ if $$i=j$$ and $$0$$ otherwise).
Proof : See Gram-Schmidt process.

Theorem : Let $$v_1, \ldots, v_k \in V$$. We can form a $$k \times k$$ matrix $$G$$ with $$(i,j)^{\text{th}}$$ entry $$\langle v_i, v_j \rangle$$. Then $$\det(G)$$ is $$0$$ if $$v_1, \ldots, v_k$$ are linearly dependent, and $$> 0$$ if $$v_1, \ldots, v_k$$ are linearly independent.
Proof : Suppose $$v_1, \ldots, v_k$$ are linearly dependent. So $$v_1 \lambda_1 + \ldots + v_k \lambda_k = 0$$ for some $$\lambda_1, \ldots, \lambda_k$$ not all $$0$$. Applying $$\langle v_j, - \rangle$$ on this equation for each $$j$$, we get $$G \lambda = 0$$ where $$\lambda := (\lambda_1, \ldots, \lambda_k)^{T}$$. Since $$\lambda \neq 0$$, we have $$\det(G) = 0$$, as needed.
Now suppose $$v_1, \ldots, v_k$$ are linearly independent. By the lemma, $$U := \text{span}\{v_1, \ldots, v_k\}$$ has an orthonormal basis $$e_1, \ldots, e_k$$. Writing $$v_j$$s w.r.t this new basis, we get $$(v_1, \ldots, v_k) = (e_1, \ldots, e_k) P$$ for an invertible $$k \times k$$ matrix $$P = (p_{ij})$$. Now notice $$\langle v_i, v_j \rangle$$ $$= \langle p_{1i} e_1 + \ldots + p_{ki} e_k, p_{1j} e_1 + \ldots + p_{kj} e_j \rangle$$ $$= p_{1i} p_{1j} + \ldots + p_{ki} p_{kj}$$, which is $$P_i ^{T} P_j$$ (where $$P_1, \ldots, P_k$$ are columns of $$P$$). Hence $$G = P^{T} P$$, and taking $$\det$$ gives $$\det(G) = \det(P) ^{2} > 0$$, as needed.

[Note $$V=\mathbb{R}^{n}$$, $$\langle x, y \rangle = x^{T} y$$, $$k = 2$$ gives the usual Cauchy-Schwarz inequality for vectors. Also $$V = \{$$continuous functions $$[a,b] \rightarrow \mathbb{R}\}$$, $$\langle f, g \rangle = \int f(t)g(t)dt$$, $$k = 2$$ gives the usual Cauchy-Schwarz inequality for continuous functions].

Proof by Jensen's inequality

Jensen's inequality for concave functions $$f(\cdot)$$ states that $$\sum_i w_i f(a_i) \le f (\sum_i w_i a_i)$$ with positive weights $$w_i$$ which sum to one: $$\sum_i w_i = 1$$. Equality holds iff all $$a_i$$ are equal.

We want to prove the discrete version of Cauchy-Schwarz, $$\sum_i x_i y_i \le \sqrt{\sum_i x_i^2}\sqrt{\sum_i y_i^2}$$, rewriting Cauchy-Schwarz in the following form: $$\frac{\sum_i x_i y_i }{{\sum_i x_i^2}} \le \frac{1}{\sqrt{\sum_i x_i^2}}\sqrt{\sum_i y_i^2}$$

To bring this into Jensen's form, rewrite this again as $$\sum_i \frac{x_i^2}{\sum_j x_j^2} \sqrt{\frac{y_i^2}{x_i^2}} \le \sqrt{\sum_i \frac{x_i^2}{\sum_j x_j^2} {\frac{y_i^2}{x_i^2}} }$$
But this is exactly Jensen's inequality, with $$f(\cdot) = \sqrt{(.)}$$ and weights summing to one, as indicated here: $$\sum_i {\underbrace{\frac{x_i^2}{\sum_j x_j^2}}_{w_i}} \sqrt{\underbrace{\frac{y_i^2}{x_i^2}}_{a_i}} \le \sqrt{\sum_i \underbrace{ \frac{x_i^2}{\sum_j x_j^2}}_{w_i} \underbrace{\frac{y_i^2}{x_i^2}}_{a_i} }$$ The equality conditions also translate: equality holds due to Jensen iff all $$a_i$$ are equal, which means here that all $$y_i/x_i$$ are equal, which means that the $$y$$-vector is a scalar multiple of the $$x$$-vector, which is the well-known equality condition in Cauchy-Schwarz.

In Euclidean space, the Cauchy-Schwarz inequality is equivalent to the assertion that for all $$\mathbf u, \mathbf v\in\mathbb R^n$$, $$\left(\sum_{i=1}^{n}u_iv_i\right)^2\le\left(\sum_{i=1}^{n}u_i^2\right)\left(\sum_{i=1}^{n}v_i^2\right)$$ A particularly elegant proof is given on the Wikipedia page of the inequality, which I will reproduce here.

Let $$\mathbf u, \mathbf v\in\mathbb R^n$$ be given. Assume that $$\mathbf{u}\neq\mathbf{0}$$, for otherwise the inequality is trivial. Consider the following polynomial in $$x$$: $$(u_1x+v_1)^2+\dots+(u_nx+v_n)^2=\left(\sum_{i=1}^{n}u_i^2\right)x^2+\left(2\sum_{i=1}^{n}u_iv_i\right)x+\left(\sum_{i=1}^{n}v_i^2\right) \, .$$ Since $$\mathbf u\neq\mathbf 0$$, the above polynomial is a quadratic in $$x$$. By considering the left hand side, we see that that this quadratic is nonnegative and therefore either has no real roots or has one repeated root. Hence, the discriminant must be negative or zero, i.e. $$4\left(\sum_{i=1}^{n}u_iv_i\right)^2-4\left(\sum_{i=1}^{n}u_i^2\right)\left(\sum_{i=1}^{n}v_i^2\right) \, \le0 \, .$$ The desired inequality follows at once.

In a real inner product space, the Cauchy-Schwarz inequality follows more or less directly from the axioms that govern norms and inner products.

Theorem. Suppose $$V$$ is a real inner product space. Then, for all $$u,v\in V$$, $$\lvert\langle u,v\rangle|\le\lVert u\rVert\lVert v\rVert \, .$$ Moreover, equality holds if and only if $$u$$ and $$v$$ are linearly dependent.

Proof. Consider first the case where $$u$$ and $$v$$ are linearly dependent. If $$u=0$$ then the equality is trivial. Otherwise, there is a $$\lambda\in\mathbb R$$ such that $$v=\lambda u$$. Hence, $$\lvert\langle u,v\rangle|=\lvert\lambda\rvert\lVert u\rVert^2=\lVert u\rVert\lVert v\rVert \, .$$

Now consider the case where $$u$$ and $$v$$ are linearly independent. Then, for every $$\lambda\in\mathbb R$$, \begin{align} 0 &< \langle v-\lambda u,v-\lambda u\rangle \\[4pt] &= \langle u,u\rangle\lambda^2-2\langle u,v\rangle\lambda+\langle v,v\rangle \tag{\star}\label{star} \, . \end{align} Note that $$\eqref{star}$$ is a quadratic in $$\lambda$$ with no real roots, and hence its discriminant must be negative. It follows that $$\langle u,v\rangle^2<\langle u,u\rangle\langle v,v\rangle$$, and taking square roots yields the desired result.

It seems that this argument does not generalise easily to complex inner product spaces (in particular, $$\eqref{star}$$ uses the bilinearity of real inner products); I would be happy to be proven wrong.