/bio/skills/blog/math

Ça se prononce « Cauchy »

Proof of the Cauchy-Schwarz Inequality: ∣x⋅y∣≤∣x∣∣y∣|\mathbb{x} \cdot \mathbb{y}| \leq |\mathbb{x}| |\mathbb{y}|

Proof

We will prove this by induction.

Base case R2\mathbb{R}^2

Let x \mathbb{x}, y∈R2\mathbb{y} \in \mathbb{R}^2 be (x1,x2)(x_1, x_2) and (y1,y2)(y_1, y_2) respectively.

Start with ∣x⋅y∣|\mathbb{x} \cdot \mathbb{y}| and note that:

∣x⋅y∣2=x12y12+2x1x2y1y2+x22y22≤(x12y12+2x1x2y1y2+x22y22)+(x1y2−x2y1)2=x12y12+x12y22+x12y22+x22y22=(x12+x22)(y12+y22)=(∣x∣∣y∣)2\begin{align} |\mathbb{x} \cdot \mathbb{y}|^2 &= x_1^2 y_1^2 + 2 x_1 x_2 y_1 y_2 + x_2^2 y_2^2 \\ &\leq (x_1^2 y_1^2 + 2 x_1 x_2 y_1 y_2 + x_2^2 y_2^2) + (x_1y_2 - x_2y_1)^2 \\ &= x_1^2 y_1^2 + x_1^2 y_2^2 + x_1^2 y_2^2 + x_2^2 y_2^2 \\ &= (x_1^2 + x_2^2)(y_1^2+ y_2^2) \\ &= (|x||y|)^2 \end{align}

Since both ∣x⋅y∣|\mathbb{x} \cdot \mathbb{y}| and ∣x∣∣y∣|x||y| are positive and the square root is an increasing function, we have:

∣x⋅y∣≤∣x∣∣y∣|\mathbb{x} \cdot \mathbb{y}| \leq |x||y|

which proves the base case.

Induction Step:

Let x \mathbb{x}, y∈Rn\mathbb{y} \in \mathbb{R}^n be (x1,…,xn)(x_1, \dots, x_n) and (y1,…,yn)(y_1, \dots, y_n) respectively.

Assume ∣x⋅y∣≤∣x∣∣y∣|\mathbb{x} \cdot \mathbb{y}| \leq |\mathbb{x}||\mathbb{y}|. We will then show that this also works for x′ \mathbb{x'}, y′∈Rn+1\mathbb{y'} \in \mathbb{R}^{n+1}, where (x1,…,xn,xn+1)(x_1, \dots, x_n, x_{n+1}) and (y1,…,yn,yn+1)(y_1, \dots, y_n, y_{n+1}) respectively

By our assumption:

∣x⋅y∣≤∣x∣∣y∣(x⋅y)2≤x⋅xy⋅y(x1y1+…xnyn)2≤x12+⋯+xn2y12+⋯+yn2\begin{align} |\mathbb{x} \cdot \mathbb{y}| &\leq |x||y| \\ \sqrt{(\mathbb{x} \cdot \mathbb{y})^2} &\leq \sqrt{\mathbb{x} \cdot \mathbb{x}} \sqrt{\mathbb{y} \cdot \mathbb{y}} \\ \sqrt{(x_1y_1 + \dots x_ny_n)^2} &\leq \sqrt{x_1^2 + \dots + x_n^2} \sqrt{y_1^2 + \dots + y_n^2} \\ \end{align}

Consider ∣x′⋅y′∣2|\mathbb{x'} \cdot \mathbb{y'}|^2:

=(x′⋅y′)22=(x′⋅y′)2=(x1y1+…xnyn+xn+1yn+1)2=(x⋅y+xn+1yn+1)2=(x⋅y)2+2xn+1yn+1(x⋅y)+(xn+1yn+1)2\begin{align*} &= \sqrt{(\mathbb{x'} \cdot \mathbb{y'})^2}^2\\ &= (\mathbb{x'} \cdot \mathbb{y'})^2\\ &= (x_1y_1 + \dots x_ny_n +x_{n+1}y_{n+1})^2 \\ &= (\mathbb{x} \cdot \mathbb{y} +x_{n+1}y_{n+1})^2 \\ &= (\mathbb{x} \cdot \mathbb{y})^2 + 2x_{n+1}y_{n+1}(\mathbb{x} \cdot \mathbb{y}) + (x_{n+1}y_{n+1})^2 \end{align*}

And (∣x′∣∣y′∣)2(|\mathbb{x'}||\mathbb{y'}|)^2:

=(x′⋅x′y′⋅y′)2=(x′⋅x′)(y′⋅y′)=(x12+⋯+xn2+xn+12)(y12+⋯+yn2+yn+12)=(x⋅x+xn+12)(y⋅y+yn+12)=(x⋅x)(y⋅y)+yn+12(x⋅x)+xn+12(y⋅y)+xn+12yn+12\begin{align*} &= (\sqrt{\mathbb{x'} \cdot \mathbb{x'}} \sqrt{\mathbb{y'} \cdot \mathbb{y'}})^2 \\ &= (\mathbb{x'} \cdot \mathbb{x'})(\mathbb{y'} \cdot \mathbb{y'}) \\ &=(x_1^2 + \dots + x_n^2 + x_{n+1}^2)(y_1^2 + \dots + y_n^2 + y_{n+1}^2) \\ &= (\mathbb{x} \cdot \mathbb{x} + x_{n+1}^2)(\mathbb{y} \cdot \mathbb{y} + y_{n+1}^2) \\ &= (\mathbb{x} \cdot \mathbb{x})(\mathbb{y} \cdot \mathbb{y}) + y_{n+1}^2(\mathbb{x} \cdot \mathbb{x}) + x_{n+1}^2(\mathbb{y} \cdot \mathbb{y}) + x_{n+1}^2y_{n+1}^2 \end{align*}

Note that:

∣x′⋅y′∣2≤∣x′⋅y′∣2+∣(yn+1x−xn+1y)∣2=∣x′⋅y′∣2+yn+12(x⋅x)−2xn+1yn+1(x⋅y)+xn+12(y⋅y)=(x⋅y)2+2xn+1yn+1(x⋅y)+(xn+1yn+1)2+yn+12(x⋅x)−2xn+1yn+1(x⋅y)+xn+12(y⋅y)=(x⋅y)2+(xn+1yn+1)2+yn+12(x⋅x)+xn+12(y⋅y)=(x⋅x)(y⋅y)+yn+12(x⋅x)+xn+12(y⋅y)+xn+12yn+12=(∣x′∣∣y′∣)2\begin{align*} |\mathbb{x'} \cdot \mathbb{y'}|^2 &\leq |\mathbb{x'} \cdot \mathbb{y'}|^2 + |(y_{n+1}\mathbb{x} - x_{n+1}\mathbb{y})|^2 \\ & = |\mathbb{x'} \cdot \mathbb{y'}|^2 + y_{n+1}^2(\mathbb{x} \cdot \mathbb{x}) -2x_{n+1}y_{n+1}(\mathbb{x} \cdot \mathbb{y}) + x_{n+1}^2(\mathbb{y} \cdot \mathbb{y}) \\ & = (\mathbb{x} \cdot \mathbb{y})^2 + 2x_{n+1}y_{n+1} (\mathbb{x} \cdot \mathbb{y})+ (x_{n+1}y_{n+1})^2 + y_{n+1}^2(\mathbb{x} \cdot \mathbb{x}) -2x_{n+1}y_{n+1}(\mathbb{x} \cdot \mathbb{y}) + x_{n+1}^2(\mathbb{y} \cdot \mathbb{y}) \\ &= (\mathbb{x} \cdot \mathbb{y})^2 + (x_{n+1}y_{n+1})^2 + y_{n+1}^2(\mathbb{x} \cdot \mathbb{x}) + x_{n+1}^2(\mathbb{y} \cdot \mathbb{y}) \\ &= (\mathbb{x} \cdot \mathbb{x})(\mathbb{y} \cdot \mathbb{y}) + y_{n+1}^2(\mathbb{x} \cdot \mathbb{x}) + x_{n+1}^2(\mathbb{y} \cdot \mathbb{y}) + x_{n+1}^2y_{n+1}^2 \\ &= (|\mathbb{x'}||\mathbb{y'}|)^2 \end{align*}

But since the sqaure root is an increasing function and both ∣x′⋅y′∣|\mathbb{x'} \cdot \mathbb{y'}| and ∣x′∣∣y′∣|\mathbb{x'}||\mathbb{y'}| are positive, ∣x′⋅y′∣2≤(∣x′∣∣y′∣)2|\mathbb{x'} \cdot \mathbb{y'}|^2 \leq (|\mathbb{x'}||\mathbb{y'}|)^2 means that ∣x′⋅y′∣≤∣x′∣∣y′∣|\mathbb{x'} \cdot \mathbb{y'}| \leq |\mathbb{x'}||\mathbb{y'}|

So we have shown that if we assume ∣x⋅y∣≤∣x∣∣y∣|\mathbb{x} \cdot \mathbb{y}| \leq |\mathbb{x}||\mathbb{y}| for x,y∈Rn\mathbb{x}, \mathbb{y} \in \mathbb{R}^n then ∣x′⋅y′∣≤∣x′∣∣y′∣|\mathbb{x'} \cdot \mathbb{y'}| \leq |\mathbb{x'}||\mathbb{y'}| for x′,y′∈Rn+1\mathbb{x'}, \mathbb{y'} \in \mathbb{R}^{n+1} as desired.

By induction, our proof is finished.

2026 Stefano De Vuono