Cauchy–Schwarz Inequality

∣⟨x,y⟩∣≤∥x∥ ∥y∥|\langle x,y\rangle| \le \|x\|\,\|y\| — the inner product never exceeds the product of the norms. Proved from the discriminant of 0≤∥x−ty∥20 \le \|x-ty\|^2; equality holds exactly for parallel vectors.

∣⟨x,y⟩∣≤∥x∥ ∥y∥|\langle x,y\rangle| \le \|x\|\,\|y\|
∥x+y∥≤∥x∥+∥y∥\|x+y\| \le \|x\|+\|y\|

Examples & Exercises

Prove the Cauchy–Schwarz inequality ∣⟨x,y⟩∣≤∥x∥ ∥y∥|\langle x,y\rangle| \le \|x\|\,\|y\| in Rn\mathbb{R}^n by the discriminant argument.

0≤∥x−ty∥2=∥y∥2t2−2⟨x,y⟩t+∥x∥2(t∈R)0 \le \|x-ty\|^2 = \|y\|^2 t^2 - 2\langle x,y\rangle t + \|x\|^2 \qquad (t \in \mathbb{R})
Δ=4⟨x,y⟩2−4∥x∥2∥y∥2≤0\Delta = 4\langle x,y\rangle^2 - 4\|x\|^2\|y\|^2 \le 0
θ=0\theta = 0: y=(1,0)∥xy = (1,0) \parallel x, so ∣⟨x,y⟩∣=3=∥x∥ ∥y∥|\langle x,y\rangle| = 3 = \|x\|\,\|y\| — the equality case (discriminant 00) is visible.
Show proof
  1. If y=0y = 0, both sides are 00 and the claim is trivial. Assume y≠0y \ne 0.
  2. For every real tt, 0≤∥x−ty∥20 \le \|x - ty\|^2. Expanding the inner product, ∥x−ty∥2=⟨x−ty,x−ty⟩=∥y∥2t2−2⟨x,y⟩t+∥x∥2\|x - ty\|^2 = \langle x - ty, x - ty\rangle = \|y\|^2 t^2 - 2\langle x,y\rangle t + \|x\|^2, so the quadratic ∥y∥2t2−2⟨x,y⟩t+∥x∥2\|y\|^2 t^2 - 2\langle x,y\rangle t + \|x\|^2 in tt is always nonnegative.
  3. A quadratic that is always nonnegative has nonpositive discriminant: Δ=4⟨x,y⟩2−4∥y∥2∥x∥2≤0\Delta = 4\langle x,y\rangle^2 - 4\|y\|^2\|x\|^2 \le 0. Rearranging gives ⟨x,y⟩2≤∥x∥2∥y∥2\langle x,y\rangle^2 \le \|x\|^2\|y\|^2, i.e. ∣⟨x,y⟩∣≤∥x∥ ∥y∥|\langle x,y\rangle| \le \|x\|\,\|y\|.
  4. The same argument works in every inner product space. In ℓ2\ell^2, applying the RN\mathbb{R}^N case to the first NN terms gives ∣∑n≤Nxnyn∣≤∥x∥ ∥y∥|\sum_{n\le N} x_n y_n| \le \|x\|\,\|y\|; letting N→∞N \to \infty shows the series ∑xnyn\sum x_n y_n converges absolutely, so the inner product ⟨x,y⟩=∑n=1∞xnyn\langle x,y\rangle = \sum_{n=1}^{\infty} x_n y_n is well defined.

Prove that equality ∣⟨x,y⟩∣=∥x∥ ∥y∥|\langle x,y\rangle| = \|x\|\,\|y\| in Cauchy–Schwarz holds if and only if xx and yy are linearly dependent.

∣⟨x,y⟩∣=∥x∥ ∥y∥  ⟺  x, y are linearly dependent|\langle x,y\rangle| = \|x\|\,\|y\| \iff x,\ y \text{ are linearly dependent}
θ=π/2\theta = \pi/2: x⊥yx \perp y, so ⟨x,y⟩=0<3=∥x∥ ∥y∥\langle x,y\rangle = 0 < 3 = \|x\|\,\|y\| — xx and yy are linearly independent and equality fails.
Show proof
  1. If y=0y = 0, both sides are 00 so equality holds, and {x,0}\{x, 0\} is linearly dependent, making both directions trivial. Assume henceforth y≠0y \ne 0.
  2. (⇐\Leftarrow) If xx and yy are linearly dependent, x=cyx = cy for some scalar cc. Then ∣⟨x,y⟩∣=∣⟨cy,y⟩∣=∣c∣ ∥y∥2=∥cy∥ ∥y∥=∥x∥ ∥y∥|\langle x,y\rangle| = |\langle cy,y\rangle| = |c|\,\|y\|^2 = \|cy\|\,\|y\| = \|x\|\,\|y\|.
  3. (⇒\Rightarrow) If equality holds, the discriminant of the quadratic ∥y∥2t2−2⟨x,y⟩t+∥x∥2\|y\|^2 t^2 - 2\langle x,y\rangle t + \|x\|^2 from the discriminant argument is 00, so it has a real root t0t_0. At that root 0=∥y∥2t02−2⟨x,y⟩t0+∥x∥2=∥x−t0y∥20 = \|y\|^2 t_0^2 - 2\langle x,y\rangle t_0 + \|x\|^2 = \|x - t_0 y\|^2, hence x=t0yx = t_0 y — i.e. xx and yy are linearly dependent.

Deduce the triangle inequality ∥x+y∥≤∥x∥+∥y∥\|x+y\| \le \|x\| + \|y\| as a corollary of Cauchy–Schwarz.

∥x+y∥2=∥x∥2+2⟨x,y⟩+∥y∥2≤∥x∥2+2∥x∥ ∥y∥+∥y∥2=(∥x∥+∥y∥)2\|x+y\|^2 = \|x\|^2 + 2\langle x,y\rangle + \|y\|^2 \le \|x\|^2 + 2\|x\|\,\|y\| + \|y\|^2 = (\|x\| + \|y\|)^2
θ=π/4\theta = \pi/4: ∥x+y∥≈3.7739<4=∥x∥+∥y∥\|x+y\| \approx 3.7739 < 4 = \|x\| + \|y\| — the triangle inequality in action.
Show proof
  1. Expanding the squared norm via the inner product gives ∥x+y∥2=⟨x+y,x+y⟩=∥x∥2+2⟨x,y⟩+∥y∥2\|x+y\|^2 = \langle x+y, x+y\rangle = \|x\|^2 + 2\langle x,y\rangle + \|y\|^2.
  2. Since ⟨x,y⟩≤∣⟨x,y⟩∣\langle x,y\rangle \le |\langle x,y\rangle| and ∣⟨x,y⟩∣≤∥x∥ ∥y∥|\langle x,y\rangle| \le \|x\|\,\|y\| by Cauchy–Schwarz, we get ∥x+y∥2≤∥x∥2+2∥x∥ ∥y∥+∥y∥2=(∥x∥+∥y∥)2\|x+y\|^2 \le \|x\|^2 + 2\|x\|\,\|y\| + \|y\|^2 = (\|x\| + \|y\|)^2.
  3. Taking square roots of both sides yields ∥x+y∥≤∥x∥+∥y∥\|x+y\| \le \|x\| + \|y\|.

2. Sequences