Q:

Proving Cauchy-Schwarz with Arithmetic Geometric mean

I understand common proofs for Cauchy-Schwarz, but not sure about the first step in this one, which is proof 4 from here
Let $A = \sqrt{a_1^2 + a_2^2 + \dots + a_n^2}$ and $B = \sqrt{b_1^2 + b_2^2 + \dots + b_n^2}$. By the arithmetic-geometric means inequality (AGI), we have
$$
\sum_{i=1}^n \frac{a_ib_i}{AB} \leq \sum_{i=1}^n \frac{1}{2} \left( \frac{a_i^2}{A^2} + \frac{b_i^2}{B^2} \right) = 1
$$
so that
$$
\sum_{i=1}^na_ib_i \leq AB \leq \sqrt{\sum_{i=1}^na_i^2} \sqrt{\sum_{i=1}^n b_i^2}
$$
Which is Cauchy-Schwarz. Now this is all quite elegant, but how is the first equation RHS equal to 1? And how is it AGI? Shouldn't it be in this form:
$$
\sqrt[n]{\prod_{i=1}^n x_i} \leq \frac{1}{n} \sum_{i=1}^n x_i
$$
There's probably something simple I'm missing...

A:

First,
$$\sum_{i=1}^{n} \frac{a_i^2}{A^2} = \frac{1}{A^2}\sum_{i=1}^{n} a_i^2 = \frac{A^2}{A^2} = 1.$$
Similar could be said about the second term in the summation.
Second, the proof uses the following two-variable AM-GM inequality: $$xy = \sqrt{x^2 y^2} \le \frac{x^2+y^2}{2}.$$

