Derivation of the Cauchy Schwarz Inequality $$|u{\cdot}v| \leq ||u||||v|| \tag{1}$$
I tried to derive the above.           
Expand the LHS:
$$|u{\cdot}v| = \left|\sum_{i=1}^n a_i + b_i\right| \tag{2}$$
Which can be rewritten as:
$$|u{\cdot}v| = \left|\sum_{i=1}^n a_i + \sum_{i=1}^n b_i\right| \tag{3}$$
The RHS of $(1)$ can be written as: 
$$||u||||v|| = \sqrt{\sum_{i=1}^n a_i^2} \times \sqrt{\sum_{i=1}^n b_i^2} \tag{4}$$
Taking the square of $(4)$:
$$||u||^2||v||^2 = \sum_{i=1}^n a_i^2 \times \sum_{i=1}^n b_i^2$$
From $(3)$:
$$u{\cdot}v = \sum_{i=1}^n a_i + \sum_{i=1}^n b_i \tag{3.1}$$
Square $(3.1)$:
$$(u{\cdot}v)^2 = \left(\sum_{i=1}^n {a_i}\right)^2 + 2\sum_{i=1}^n {a_i}{\cdot}\sum_{i=1}^n b_i + \left(\sum_{i=1}^n b_i\right)^2 \tag{5}$$
Now, $X^2 \lt Y^2 \implies |Y| \gt |X| \tag{*}$ 
Rewriting $(4)$:
$$||u||^2||v||^2 = \sum_{i=1}^n a_i{\cdot}a_i \times \sum_{i=1}^n b_i{\cdot}b_i \tag{4.1}$$
Rewriting $(5)$:
$$(u{\cdot}v)^2 = \sum_{i=1}^n {a_i}\sum_{i=1}^n {a_i} + 2\sum_{i=1}^n {a_i}{\cdot}\sum_{i=1}^n b_i + \sum_{i=1}^n b_i\sum_{i=1}^n b_i \tag{5.1}$$
It seems trivial that $(5.1) \le (4.1)$ which from $(*) \implies |u{\cdot}v| \geq ||u||||v||$ directly contradicting the theorem.    
What am I doing wrong? Where did I misstep (and please properly derive the proof).
 
 
 
 
 
$(*)$ this is trivial and left as a proof for the reader. ;)
 A: Equation 2 is wrong.
It should be
$$u\cdot v
=\sum u_i v_i
$$
A: In (2) it should be
$$\mathbf{u}\cdot\mathbf{v}=a_1b_1+a_2b_2+...+a_nb_n$$
and you can finish your proof. I suggest this way: let $\lambda=\|\mathbf{v}\|^{-2}\mathbf{u}\cdot\mathbf{v}$
\begin{align}
0&\le\|\mathbf{u}-\lambda\mathbf{v}\|^2=(\mathbf{u}-\lambda\mathbf{v})\cdot(\mathbf{u}-\lambda\mathbf{v})\\
&=\|\mathbf{u}\|^2-2\lambda \mathbf{u}\cdot\mathbf{v}+\lambda^2\|\mathbf{v}\|^2\\
&=\|\mathbf{u}\|^2-\|\mathbf{v}\|^{-2}|\mathbf{u}\cdot\mathbf{v}|^2
\Rightarrow|\mathbf{u}\cdot\mathbf{v}|\ge\|\mathbf{u}\|\|\mathbf{v}\|.
\end{align}
A: $$u\cdot v = \sum_{i=1}^{n}a_ib_i \neq \sum_{i=1}^{n}a_i+b_i$$
Properly derive the proof:
$$\sum_{i=1}^{n}x_i^2+\sum_{i=1}^{n}y_i^2\geq\sum_{i=1}^{n}2x_iy_i$$
Take,
$$x_i = \frac{|a_i|}{(\sum_{j=1}^{n}a_j^2)^{1/2}}, y_i = \frac{|b_i|}{(\sum_{j=1}^{n}b_j^2)^{1/2}}$$
Then,
$$\sum_{i=1}^{n}x_i^2 = \sum_{i=1}^{n}\frac{|a_i|^2}{(\sum_{j=1}^{n}a_j^2)} = 1$$
Similarly, $\sum_{i=1}^ny_i^2 = 1 \implies \sum_{i=1}^{n}x_i^2+\sum_{i=1}^{n}y_i^2=2$ and,
$$2 \geq \sum_{i=1}^{n}2x_iy_i \implies \sum_{i=1}^{n}\frac{|a_i||b_i|}{(\sum_{j=1}^{n}a_j^2)^{1/2}(\sum_{j=1}^{n}b_j^2)^{1/2}} \leq 1\implies |a.b| \leq \|a\|\|b\|$$
A: Just thought I would rederive
a well-known identity
which implies the inequality
and the conditions for equality
for real vectors.
Want to show
$(\sum_i a_ib_i)^2
\le \sum_i a_i^2 \sum_i b_i^2
$.
$\begin{array}\\
S
&=(\sum_i a_ib_i)^2\\
&=\sum_i a_ib_i\sum_j a_jb_j\\
&=\sum_i\sum_j a_ib_i a_jb_j\\
\end{array}
$
$\begin{array}\\
T
&=\sum_i a_i^2 \sum_i b_i^2\\
&=\sum_i \sum_ja_i^2  b_j^2\\
&=\sum_i \sum_ja_j^2  b_i^2
\qquad\text{exchanging }i \text{ and }j
\text{ and order of summation}\\
\end{array}
$
$\begin{array}\\
2(T-S)
&=\sum_i  \sum_j(a_i^2  b_j^2+a_j^2  b_i^2
-2a_ib_i a_jb_j)\\
&=\sum_i  \sum_j(a_i b_j-a_j  b_i)^2\\
&> 0
\qquad\text{unless }a_i b_j=a_j  b_i
\text{ for all }i, j\\
\end{array}
$
