# Thread: Derive a relation using Cauchy Schwarz inequality

1. ## Derive a relation using Cauchy Schwarz inequality

So I am trying to derive the following relation using Cauchy Schwarz inequality for any collection of N real numbers:

$\left(\frac{a_1+a_2+\cdots+a_N}{N}\right)^2 =< \frac{a^2_1+a^2_2+\cdots+a^2_N}{N}.$

This says that the square of the average is less or equal than the average of the squares.

So I want to use $|v \cdot w|^2 =(v \cdot v)*(w \cdot w)$ to derive this.

So $v \cdot w$ needs to be $\frac{a_1+a_2+\cdots+a_N}{N}$ therefore, I have $v \cdot v$ as $a^2_1+a^2_2+\cdots+a^2_N$ and $w \cdot w$ as $\frac{1}{N^2}$ providing that:

$v: a_1+a_2+\cdots+a_N$

$w: \frac{1}{N}\\frac$
${1}{N}" alt="{1}{N}" />

Am I going in the right direction? Can anyone provide me some guidance?

2. ## Re: Derive a relation using Cauchy Schwarz inequality

Originally Posted by MichaelH
So I am trying to derive the following relation using Cauchy Schwarz inequality for any collection of N real numbers:

$\left(\frac{a_1+a_2+\cdots+a_N}{N}\right)^2 =< \frac{a^2_1+a^2_2+\cdots+a^2_N}{N}.$

This says that the square of the average is less or equal than the average of the squares.

So I want to use $|v \cdot w|^2 =(v \cdot v)*(w \cdot w)$ to derive this.

So $v \cdot w$ needs to be $\frac{a_1+a_2+\cdots+a_N}{N}$ therefore, I have $v \cdot v$ as $a^2_1+a^2_2+\cdots+a^2_N$ and $w \cdot w$ as $\frac{1}{N^2}$ providing that:

$v: a_1+a_2+\cdots+a_N$

$w: \frac{1}{N}$

Am I going in the right direction? Can anyone provide me some guidance?
No. Currently, you have $v,w \in \mathbb{R}^1$, so $v\cdot v = (a_1+a_2+\cdots+a_N)^2 \neq a_1^2+a_2^2+\cdots + a_N^2$

Instead, try $v = \left(a_1,a_2,\ldots,a_N\right), w = \left(\underbrace{\dfrac{1}{N},\dfrac{1}{N},\ldots ,\dfrac{1}{N}}_{N\text{ times}}\right)$. Now, $v\cdot w$ and $v\cdot v$ are as you wanted, but $w\cdot w = \dfrac{1}{N}$, not $\dfrac{1}{N^2}$. Fortunately, the inequality you are given has $\dfrac{1}{N}$ on the RHS, not $\dfrac{1}{N^2}$.

3. ## Re: Derive a relation using Cauchy Schwarz inequality

I do apologise, it was a typo on my end and I forgot to add that I was using 1/N n amount of times.

But was my calculation of $v$ dot product $v$ incorrect then?

4. ## Re: Derive a relation using Cauchy Schwarz inequality

If you choose $v = a_1+a_2+\cdots + a_N$ and $w = \dfrac{1}{N}$, then those are real numbers. So, yes, your calculation of $v\cdot v$ is incorrect, but your calculation of $w\cdot w$ was correct. You would get $\dfrac{1}{N^2}$. You cannot take it $N$ times because you chose $w$ to be a real number, not a number repeated $N$ times.

5. ## Re: Derive a relation using Cauchy Schwarz inequality

{ $v : \left(a_1,a_2,\ldots,a_N\right) | v \in R^N$} and { $w : \left(\underbrace{\dfrac{1}{N},\dfrac{1}{N},\ldots ,\dfrac{1}{N}}_{N\text{ times}}\right) | w \in R^N$}

Ok so I am still a little confused with whether I have this right or not now? And if this is correct for $v$ and $w$ then where do I go with $v \cdot v$, $w \cdot w$ and $v \cdot w$ in order to completely derive the inequality?

6. ## Re: Derive a relation using Cauchy Schwarz inequality

Yes, you have it right now.

$v\cdot w = \dfrac{a_1}{N} + \dfrac{a_2}{N} + \cdots + \dfrac{a_N}{N} = \dfrac{a_1+a_2+\cdots + a_N}{N}$

$v\cdot v = a_1^2+a_2^2 + \cdots + a_N^2$

$w\cdot w = \underbrace{\dfrac{1}{N^2} + \dfrac{1}{N^2} + \cdots + \dfrac{1}{N^2}}_{N\text{ times}} = \dfrac{N}{N^2} = \dfrac{1}{N}$

7. ## Re: Derive a relation using Cauchy Schwarz inequality

Great. So now how do I show that the RHS is greater than or equal to the LHS using these facts?

8. ## Re: Derive a relation using Cauchy Schwarz inequality

To quote you:

Originally Posted by MichaelH
So I want to use $|v \cdot w|^2 =(v \cdot v)*(w \cdot w)$ to derive this.
Edit: Although, that should be $\le$, not $=$.

9. ## Re: Derive a relation using Cauchy Schwarz inequality

Originally Posted by SlipEternal
To quote you:

Edit: Although, that should be $\le$, not $=$.
Ahh that's why I couldn't figure it out! Haha, my fault, should have double checked it. I was staring at = thinking... what am I supposed to do! Cheers mate.