# Cauchy-Schwartz inequality

1. Nov 4, 2015

### pitaly

The Cauchy-Schwartz inequality $(\sum_{i=1}^n x_i^2)(\sum_{i=1}^n y_i^2) - (\sum_{i=1}^n x_iy_i)^2 \geq 0$ holds with equality (or is as "small" as possible) if there exists an $a \gt 0$ such that $x_i=ay_i$ for all $i=1,...,n$.

But when is the inequality as "large" as possible? That is, can we say anything under what conditions $(\sum_{i=1}^n x_i^2)(\sum_{i=1}^n y_i^2) - (\sum_{i=1}^n x_iy_i)^2$ is as large as possible?

2. Nov 4, 2015

### BvU

That's easy ! If all xy are negative. Can you interpret that ?
Oops. Major glitch trying to reply too hasty.
First of all welcome to PF ! And I'll be back soon to post something more useful -- if I don't get corrected sooner by someone more awake ...

3. Nov 4, 2015

### BvU

Take 2: That's easy ! If all xiyi are zero. Can you interpret that ?

4. Nov 4, 2015

### pitaly

Sorry, I forgot to say that each $x_i \gt 0$ and $y_i \gt 0$

5. Nov 4, 2015

### BvU

I remember Cauchy-Schwartz had something to do with vector products and you look at $( \vec x + \vec y ) ^2 = \vec x^2 + \vec y ^2 + 2 \vec x \cdot \vec y = \vec x^2 + \vec y ^2 + 2 \,| \vec x | \, |\vec y| \cos \alpha$.

The equals sign in CS is if $|\cos\alpha| = 1$ so I have a feeling that what you asked for might be found at $\cos\alpha= 0$.

In post #4 you exclude =0 but then your extreme can be approached as close as desired by letting $\cos\alpha \rightarrow 0$.

--

6. Nov 4, 2015

### rs1n

If you write the summations as dot products, you can readily see the answer. Let $\vec{x} = \langle x_1, x_2, \dotsm, x_n \rangle$ and $\vec{y} = \langle y_1, y_2, \dotsm, y_n \rangle$. Then the Cauchy-Schwartz inequality can be restated as:

$\underbrace{(\vec{x} \cdot \vec{x})}_{\text{dot product}} \cdot \underbrace{(\vec{y}\cdot \vec{y} )}_{\text{dot product}} \ge \underbrace{\vec{x} \cdot \vec{y}}_{\text{dot product}}$ or equivalently $\| \vec{x} \|^2 \cdot \| \vec{y} \|^2 \ge \| \vec{x} \| \cdot \| \vec{y} \| \cdot \cos(\theta)$

where $\theta$ is the angle between $\vec{x}$ and $\vec{y}$. Since $\vec{x}\cdot \vec{y} = 0$ if the two vectors are orthogonal, that's where you will get the largest value.

7. Nov 5, 2015

### Erland

It can be arbitrarily large. Just take any xi:s and yi:s for which the difference is > 0 and multiply all the xi:s with an arbitrary lange t > 0.