Cauchy-Schwarz and triangle inequalities

## The space ${ℝ}^{n}$

Define $ℝn={ (x1,x2 ,…,xn) | x1,x2 ,…,xn ∈ℝ}$ so that $ℝ1=ℝ, ℝ2= {(x,y) | x,y∈ℝ} , ℝ3= {(x,y,z) | x,y,z∈ℝ} .$

Fig. Examples of points in ${ℝ}^{3}$

The absolute value on ${ℝ}^{n}$ is the function $|x| : ℝn ⟶ ℝ≥0 x ⟼ |x| given by |x| = x12 +⋯+ xn2$ for $x=\left({x}_{1},\dots ,{x}_{n}\right)$.

For example:

• If $n=2$ then $|\left(x,y\right)|=\sqrt{{x}^{2}+{y}^{2}}\in {ℝ}_{\ge 0}$.
• If $n=1$ then $|x|=\sqrt{{x}^{2}}\in {ℝ}_{\ge 0}$.

## Lagrange's identity

(Lagrange's identity) $( ∑i=1n xi2 ) ( ∑i=1n yi2 ) - ( ∑i=1n xiyi ) 2 = 12 ∑i,j=1 n ( xiyj -xjyi )2 .$

 Proof. $12 ∑ i,j=1n ( xiyj -xjyi )2 = 12 ∑i=1 n ( xi2 yj2 -2xi yj xjyi + xj2 yi2 ) = 12 ∑i,j=1 n xi2 yj2 + 12 ∑i,j=1 n xj2 yi2 - ∑i,j=1 n xiyj xjyi = ∑i,j=1n xi2yj2 - ( ∑i,j=1 n xiyj )2 = ( ∑i=1n xi2 ) ( ∑j=1n yj2 ) - ( ∑i=1n xiyi )2.$ $\square$

For example, when $n=2$, OOPS THIS IS MESSED UP SOMEHOW $12 (( x1y1 -x1y1 )2 +( x1y2 -x2y1) 2 +( x2y1 -x1y2) 2 + (x2y2 - x2y2) 2) = (x1y2 -x2y1) 2 = x12 y22 - 2x1x2 y1y2 + x22 y12 = (x12 +x22) (y12 + y22) -( x1y1 +x2 y2)2 .$

## The inner product

The inner product on ${ℝ}^{n}$ is the function $ℝn×ℝn ⟶ ℝ (x,y) ⟼ ⟨x,y⟩$ given by $⟨x,y⟩ = (x1,… xn) ⋅ ( y1 ⋮ yn ) = x1y1 +⋯+ xnyn = ∑i=1n xiyi .$

Note: The length of $x\in {ℝ}^{n}$ is given by $|x| = x12+ ⋯+xn2 = ⟨x,x⟩ .$

(The Cauchy-Schwarz inequality) Let $x,y\in {ℝ}^{n}$. Then $⟨x,y⟩ ≤ |x| |y| .$

 Proof. Lagrange's identity tells us that $|x|2 |y|2 - ⟨x,y⟩ 2 ≥0.$ So $( |x| |y|) 2 ≥ ⟨x,y⟩ 2 .$ So $|x| |y| ≥ ⟨x,y⟩ . □$

(The triangle inequality) Let $x,y\in {ℝ}^{n}$. Then $|x+y| ≤ |x|+|y| .$

Proof.