Unit 4, lesson 17

Cauchy-Schwarz and Orthonormal Expansions

How subtracting a projection proves the Cauchy-Schwarz inequality and its equality case and leads to the triangle inequality, the complex Gram-Schmidt process, orthonormal expansions, Parseval's identity and Bessel's inequality.

  • Video 17
  • Complex Geometry and Orthonormal Coefficients

In C2\mathbb{C}^2 take x=(1,i)x = (1, i) and y=(1,1)y = (1, 1). Which multiple of xx can be subtracted from yy so that the remainder is orthogonal to xx? It is 1−i2\frac{1 - i}{2}, which equals ⟨x,y⟩/∥x∥2\langle x, y \rangle / \lVert x \rVert^2 when the inner product is conjugate-linear in its first argument, and the remainder is (1+i2,1−i2)\left(\frac{1 + i}{2}, \frac{1 - i}{2}\right). That single subtraction proves the Cauchy-Schwarz inequality, drives the complex Gram-Schmidt process, and explains how orthonormal coefficients account for squared length. Throughout, VV is an inner product space over F\mathbb{F}, either R\mathbb{R} or C\mathbb{C}, with ⟨x,y⟩\langle x, y \rangle linear in yy and conjugate-linear in xx, and a tuple such as (1,i)(1, i) stands for a column vector.

Key terms

Cauchy-Schwarz inequality

Definition For all vectors xx and yy in an inner product space VV over F\mathbb{F},

∣⟨x,y⟩∣≤∥x∥ ∥y∥.\lvert \langle x, y \rangle \rvert \le \lVert x \rVert \, \lVert y \rVert.

No dimension bound is needed. If x=0x = 0, both sides are 00. If x≠0x \ne 0, write h=⟨x,y⟩h = \langle x, y \rangle and d=∥x∥2d = \lVert x \rVert^2, which is positive by positive definiteness. Set c=h/dc = h / d and r=y−cxr = y - cx. Then ⟨x,r⟩=h−cd=0\langle x, r \rangle = h - cd = 0, and expanding with ⟨y,x⟩=h‾\langle y, x \rangle = \overline{h} gives

∥r∥2=∥y∥2−c h‾−c‾ h+∣c∣2d=∥y∥2−∣h∣2d,\begin{aligned} \lVert r \rVert^2 &= \lVert y \rVert^2 - c\,\overline{h} - \overline{c}\,h \\[0.4em] &\quad + \lvert c \rvert^2 d \\[0.4em] &= \lVert y \rVert^2 - \frac{\lvert h \rvert^2}{d}, \end{aligned}

because the products c h‾c\,\overline{h}, c‾ h\overline{c}\,h and ∣c∣2d\lvert c \rvert^2 d all equal ∣h∣2/d\lvert h \rvert^2 / d. Since ∥r∥2≥0\lVert r \rVert^2 \ge 0, multiplying by dd gives ∣h∣2≤∥x∥2∥y∥2\lvert h \rvert^2 \le \lVert x \rVert^2 \lVert y \rVert^2, and taking nonnegative square roots gives the inequality. The coefficient must be ⟨x,y⟩/∥x∥2\langle x, y \rangle / \lVert x \rVert^2 with xx in the first slot. Its conjugate would generally leave a remainder that is not orthogonal to xx.

In plain words The inner product of two vectors is never larger in size than the product of their lengths. The proof removes from yy its component along xx, and what is left has a squared length that cannot be negative.

Example For x=(1,i)x = (1, i) and y=(1,1)y = (1, 1) we have h=1−ih = 1 - i and d=2d = 2, so c=1−i2c = \frac{1 - i}{2} and r=(1+i2,1−i2)r = \left(\frac{1 + i}{2}, \frac{1 - i}{2}\right). Then ⟨x,r⟩=0\langle x, r \rangle = 0 and ∥r∥2=24+24=1\lVert r \rVert^2 = \frac{2}{4} + \frac{2}{4} = 1, which matches 2−222 - \frac{2}{2}. The squared inequality reads ∣h∣2=2≤4\lvert h \rvert^2 = 2 \le 4. The conjugated coefficient 1+i2\frac{1 + i}{2} would leave a remainder whose inner product with xx is −2i-2i. Positivity matters too. For the indefinite form with matrix diag⁡(1,−1)\operatorname{diag}(1, -1), the vector v=(1,1)v = (1, 1) pairs with itself to give 00 and with e1e_1 to give 11, so a bound by the two self pairings would claim 1≤01 \le 0.

Equality case of Cauchy-Schwarz

Definition For vectors xx and yy in an inner product space over F\mathbb{F},

∣⟨x,y⟩∣=∥x∥ ∥y∥\lvert \langle x, y \rangle \rvert = \lVert x \rVert \, \lVert y \rVert

holds if and only if xx and yy are linearly dependent over F\mathbb{F}. If x=0x = 0, both sides are 00 and the pair is dependent. If x≠0x \ne 0, equality means ∥r∥2=0\lVert r \rVert^2 = 0 in the proof above, and positive definiteness turns this into r=0r = 0, that is y=cxy = cx with c=⟨x,y⟩/∥x∥2c = \langle x, y \rangle / \lVert x \rVert^2. Conversely, if x≠0x \ne 0 and the pair is dependent, then y=axy = ax for some scalar aa, and ∣⟨x,ax⟩∣=∣a∣ ∥x∥2=∥x∥ ∥ax∥\lvert \langle x, ax \rangle \rvert = \lvert a \rvert \, \lVert x \rVert^2 = \lVert x \rVert \, \lVert ax \rVert.

In plain words The bound is reached exactly when one vector is a scalar multiple of the other. Over C\mathbb{C} the scalars are complex, so a vector and its rotated copy ixix count as dependent.

Example For x=(1,i)x = (1, i) and y=ix=(i,−1)y = ix = (i, -1), the inner product is ⟨x,ix⟩=i∥x∥2=2i\langle x, ix \rangle = i \lVert x \rVert^2 = 2i, whose absolute value 22 equals 2⋅2\sqrt{2} \cdot \sqrt{2}. Equality holds although yy is not a real multiple of xx. For the opening pair y=(1,1)y = (1, 1) the squared inequality 2<42 < 4 is strict, matching the nonzero remainder of squared norm 11, so (1,1)(1, 1) is not a complex multiple of (1,i)(1, i).

Triangle inequality

Definition For all vectors xx and yy in an inner product space over F\mathbb{F},

∥x+y∥≤∥x∥+∥y∥.\lVert x + y \rVert \le \lVert x \rVert + \lVert y \rVert.

Using Re⁡z≤∣z∣\operatorname{Re} z \le \lvert z \rvert and then Cauchy-Schwarz,

∥x+y∥2=∥x∥2+2Re⁡⟨x,y⟩+∥y∥2≤∥x∥2+2∣⟨x,y⟩∣+∥y∥2≤∥x∥2+2∥x∥ ∥y∥+∥y∥2=(∥x∥+∥y∥)2,\begin{aligned} &\lVert x + y \rVert^2 \\[0.4em] &= \lVert x \rVert^2 + 2\operatorname{Re}\langle x, y \rangle + \lVert y \rVert^2 \\[0.4em] &\le \lVert x \rVert^2 + 2\lvert \langle x, y \rangle \rvert + \lVert y \rVert^2 \\[0.4em] &\le \lVert x \rVert^2 + 2\lVert x \rVert \, \lVert y \rVert + \lVert y \rVert^2 \\[0.4em] &= \left( \lVert x \rVert + \lVert y \rVert \right)^2, \end{aligned}

and both sides of the inequality are nonnegative, so square roots may be taken. Equality forces both steps to be equalities, so the pair is dependent and ⟨x,y⟩\langle x, y \rangle is a nonnegative real number. This happens exactly when one of the vectors is a nonnegative real multiple of the other. Together with ∥ax∥=∣a∣ ∥x∥\lVert ax \rVert = \lvert a \rvert \, \lVert x \rVert and positivity, this shows that ∥x∥=⟨x,x⟩\lVert x \rVert = \sqrt{\langle x, x \rangle} is a norm, and the distance ∥x−y∥\lVert x - y \rVert satisfies ∥x−z∥≤∥x−y∥+∥y−z∥\lVert x - z \rVert \le \lVert x - y \rVert + \lVert y - z \rVert.

In plain words One side of a triangle is never longer than the other two together. Equality here asks for more than equality in Cauchy-Schwarz, because the vectors must point the same way, not merely lie on a common line. Over C\mathbb{C} the line through xx is a complex line, which also contains rotated copies such as ixix.

Example Take x=(1,i)x = (1, i). The vector y=2xy = 2x gives equality, since ∥3x∥=32=2+22\lVert 3x \rVert = 3\sqrt{2} = \sqrt{2} + 2\sqrt{2}. The vector y=ix=(i,−1)y = ix = (i, -1) gives equality in Cauchy-Schwarz, yet x+y=(1+i,−1+i)x + y = (1 + i, -1 + i) has norm 2+2=2\sqrt{2 + 2} = 2, which is strictly less than ∥x∥+∥y∥=22\lVert x \rVert + \lVert y \rVert = 2\sqrt{2}.

Complex Gram-Schmidt process

Definition Let a1,…,ana_1, \dots, a_n be linearly independent vectors in an inner product space VV over F\mathbb{F}. Set q1=a1/∥a1∥q_1 = a_1 / \lVert a_1 \rVert and, for k=2,…,nk = 2, \dots, n,

rk=ak−∑j=1k−1⟨qj,ak⟩ qj,qk=rk∥rk∥.\begin{aligned} r_k &= a_k - \sum_{j=1}^{k-1} \langle q_j, a_k \rangle \, q_j, \\[0.4em] q_k &= \frac{r_k}{\lVert r_k \rVert}. \end{aligned}

Then (q1,…,qn)(q_1, \dots, q_n) is orthonormal, meaning ⟨qi,qj⟩\langle q_i, q_j \rangle is 11 for i=ji = j and 00 otherwise, and span⁡(q1,…,qk)=span⁡(a1,…,ak)\operatorname{span}(q_1, \dots, q_k) = \operatorname{span}(a_1, \dots, a_k) for every kk. Each rkr_k is orthogonal to every earlier qiq_i, because linearity in the second slot and the orthonormality of q1,…,qk−1q_1, \dots, q_{k-1} give ⟨qi,rk⟩=⟨qi,ak⟩−⟨qi,ak⟩=0\langle q_i, r_k \rangle = \langle q_i, a_k \rangle - \langle q_i, a_k \rangle = 0. Each rkr_k is nonzero, since rk=0r_k = 0 would put aka_k in span⁡(q1,…,qk−1)=span⁡(a1,…,ak−1)\operatorname{span}(q_1, \dots, q_{k-1}) = \operatorname{span}(a_1, \dots, a_{k-1}). Rearranging the subtraction writes aka_k as a combination of q1,…,qkq_1, \dots, q_k, which keeps the spans equal at each step. If the inputs are dependent, the first input that lies in the span of the earlier ones leaves a zero remainder, or is zero itself when it is a1a_1. That zero signals the dependence, and it cannot be normalized. Applied to any basis, the process shows that every finite-dimensional inner product space has an orthonormal basis.

In plain words Take the vectors in order. From each one remove its components along the directions already built, then rescale what is left to length 11. The only change from the real process is that the coefficient is ⟨qj,ak⟩\langle q_j, a_k \rangle, with the earlier direction in the first slot.

Example Take a1=(1,i)a_1 = (1, i) and a2=(1,1)a_2 = (1, 1) in C2\mathbb{C}^2. Then q1=12(1,i)q_1 = \frac{1}{\sqrt{2}}(1, i) and ⟨q1,a2⟩=1−i2\langle q_1, a_2 \rangle = \frac{1 - i}{\sqrt{2}}, so

r2=(1,1)−1−i2(1,i)=(1+i2,1−i2).\begin{aligned} r_2 &= (1, 1) - \frac{1 - i}{2}(1, i) \\[0.4em] &= \left( \frac{1 + i}{2}, \frac{1 - i}{2} \right). \end{aligned}

This is the remainder from the opening. Its norm is 11, so q2=r2q_2 = r_2, and ⟨q1,q2⟩=0\langle q_1, q_2 \rangle = 0. Rearranged, a2=1−i2 q1+q2a_2 = \frac{1 - i}{\sqrt{2}}\,q_1 + q_2.

Orthonormal expansion and Parseval’s identity

Definition Let q1,…,qnq_1, \dots, q_n be an orthonormal basis of a finite-dimensional inner product space VV over F\mathbb{F}. Every v∈Vv \in V has the orthonormal expansion

v=∑j=1n⟨qj,v⟩ qj.v = \sum_{j=1}^{n} \langle q_j, v \rangle \, q_j.

Indeed, if v=∑kckqkv = \sum_k c_k q_k, pairing with qjq_j in the first slot removes every term except the jjth, so ⟨qj,v⟩=cj\langle q_j, v \rangle = c_j. For any finite orthonormal list and any scalars cjc_j, the cross terms ci‾ cj⟨qi,qj⟩\overline{c_i}\,c_j \langle q_i, q_j \rangle with i≠ji \ne j vanish, which gives the Pythagorean identity

∥∑jcjqj∥2=∑j∣cj∣2.\left\lVert \sum_j c_j q_j \right\rVert^2 = \sum_j \lvert c_j \rvert^2.

Applied to the expansion of vv, it gives Parseval’s identity

∥v∥2=∑j=1n∣⟨qj,v⟩∣2,\lVert v \rVert^2 = \sum_{j=1}^{n} \lvert \langle q_j, v \rangle \rvert^2,

and the same expansion gives ⟨v,w⟩=∑j⟨qj,v⟩‾ ⟨qj,w⟩\langle v, w \rangle = \sum_j \overline{\langle q_j, v \rangle}\,\langle q_j, w \rangle for all v,w∈Vv, w \in V. The coefficient is ⟨qj,v⟩\langle q_j, v \rangle. The reversed pairing ⟨v,qj⟩\langle v, q_j \rangle is its conjugate.

In plain words In an orthonormal basis each coordinate is a single inner product, with no system to solve. The squared length is the sum of the squared sizes of those coordinates, just as in the standard basis.

Example Use the basis q1=12(1,i)q_1 = \frac{1}{\sqrt{2}}(1, i), q2=(1+i2,1−i2)q_2 = \left(\frac{1 + i}{2}, \frac{1 - i}{2}\right) found above and v=(1,0)v = (1, 0). The coefficients are

⟨q1,v⟩=12,⟨q2,v⟩=1−i2.\begin{aligned} \langle q_1, v \rangle &= \frac{1}{\sqrt{2}}, \\[0.4em] \langle q_2, v \rangle &= \frac{1 - i}{2}. \end{aligned}

Their squared sizes are 12\frac{1}{2} and 12\frac{1}{2}, which add to 1=∥v∥21 = \lVert v \rVert^2. The phases check out as well, since 12 q1=(12,i2)\frac{1}{\sqrt{2}}\,q_1 = \left(\frac{1}{2}, \frac{i}{2}\right) and 1−i2 q2=(12,−i2)\frac{1 - i}{2}\,q_2 = \left(\frac{1}{2}, -\frac{i}{2}\right) add to (1,0)(1, 0).

Bessel’s inequality

Definition Let q1,…,qkq_1, \dots, q_k be a finite orthonormal list in an inner product space VV over F\mathbb{F}, not necessarily a basis. For every v∈Vv \in V,

∑j=1k∣⟨qj,v⟩∣2≤∥v∥2,\sum_{j=1}^{k} \lvert \langle q_j, v \rangle \rvert^2 \le \lVert v \rVert^2,

with equality if and only if v∈span⁡(q1,…,qk)v \in \operatorname{span}(q_1, \dots, q_k). To prove it, let p=∑j⟨qj,v⟩ qjp = \sum_j \langle q_j, v \rangle \, q_j and r=v−pr = v - p. Then ⟨qj,r⟩=0\langle q_j, r \rangle = 0 for every jj, so ⟨p,r⟩=0\langle p, r \rangle = 0 and

∥v∥2=∥p∥2+∥r∥2=∑j=1k∣⟨qj,v⟩∣2+∥r∥2.\begin{aligned} \lVert v \rVert^2 &= \lVert p \rVert^2 + \lVert r \rVert^2 \\[0.4em] &= \sum_{j=1}^{k} \lvert \langle q_j, v \rangle \rvert^2 + \lVert r \rVert^2. \end{aligned}

Equality means r=0r = 0, so v=pv = p lies in the span. Conversely, a vector in the span equals its own expansion, so r=0r = 0. When the list is an orthonormal basis of a finite-dimensional VV, every vv lies in the span and Bessel’s inequality becomes Parseval’s identity.

In plain words An incomplete orthonormal list may see only part of a vector. The squared coefficients it reads off add up to at most the full squared length, and the shortfall is exactly the squared length of the part the list cannot see.

Example In R2\mathbb{R}^2 with q1=e1q_1 = e_1 and v=(1,1)v = (1, 1), the sum of squared coefficients is 11 while ∥v∥2=2\lVert v \rVert^2 = 2. In C3\mathbb{C}^3 take q1=12(1,i,0)q_1 = \frac{1}{\sqrt{2}}(1, i, 0), q2=(0,0,1)q_2 = (0, 0, 1) and v=(1,0,1)v = (1, 0, 1). The coefficients are 12\frac{1}{\sqrt{2}} and 11, so the left side is 12+1=32<2\frac{1}{2} + 1 = \frac{3}{2} < 2. Here p=(12,i2,1)p = \left(\frac{1}{2}, \frac{i}{2}, 1\right) and r=(12,−i2,0)r = \left(\frac{1}{2}, -\frac{i}{2}, 0\right), and ∥r∥2=12\lVert r \rVert^2 = \frac{1}{2} is the missing amount.

Check yourself

  1. In C2\mathbb{C}^2 let x=(2,i)x = (2, i) and y=(1,1+i)y = (1, 1 + i). Check the Cauchy-Schwarz inequality, decide whether it is strict, and verify that r=y−cxr = y - cx with c=⟨x,y⟩/∥x∥2c = \langle x, y \rangle / \lVert x \rVert^2 has ∥r∥2=∥y∥2−∣⟨x,y⟩∣2/∥x∥2\lVert r \rVert^2 = \lVert y \rVert^2 - \lvert \langle x, y \rangle \rvert^2 / \lVert x \rVert^2.
Show the answer

The inner product is ⟨x,y⟩=2⋅1+(−i)(1+i)=3−i\langle x, y \rangle = 2 \cdot 1 + (-i)(1 + i) = 3 - i, with ∣3−i∣2=10\lvert 3 - i \rvert^2 = 10. The squared norms are ∥x∥2=5\lVert x \rVert^2 = 5 and ∥y∥2=3\lVert y \rVert^2 = 3, so the squared inequality reads 10≤1510 \le 15, that is 10≤5 3\sqrt{10} \le \sqrt{5}\,\sqrt{3}. It is strict, so the vectors are independent. The coefficient is c=3−i5c = \frac{3 - i}{5} and

r=(−1+2i5,4+2i5).r = \left( \frac{-1 + 2i}{5}, \frac{4 + 2i}{5} \right).

Its squared norm is 525+2025=1\frac{5}{25} + \frac{20}{25} = 1, which equals 3−1053 - \frac{10}{5}. As a further check, ⟨x,r⟩=2(−1+2i)−i(4+2i)5=0\langle x, r \rangle = \frac{2(-1 + 2i) - i(4 + 2i)}{5} = 0.

  1. Apply the complex Gram-Schmidt process to a1=(1,0,i)a_1 = (1, 0, i) and a2=(1,i,1)a_2 = (1, i, 1) in C3\mathbb{C}^3.
Show the answer

First ∥a1∥2=2\lVert a_1 \rVert^2 = 2, so q1=12(1,0,i)q_1 = \frac{1}{\sqrt{2}}(1, 0, i). Next ⟨a1,a2⟩=1+(−i)(1)=1−i\langle a_1, a_2 \rangle = 1 + (-i)(1) = 1 - i, so ⟨q1,a2⟩ q1=1−i2 a1\langle q_1, a_2 \rangle\,q_1 = \frac{1 - i}{2}\,a_1 and

r2=(1+i2, i, 1−i2).r_2 = \left( \frac{1 + i}{2}, \ i, \ \frac{1 - i}{2} \right).

Its squared norm is 12+1+12=2\frac{1}{2} + 1 + \frac{1}{2} = 2, so

q2=122(1+i, 2i, 1−i).q_2 = \frac{1}{2\sqrt{2}}(1 + i, \ 2i, \ 1 - i).

Check that ⟨a1,r2⟩=1+i2+(−i)1−i2=0\langle a_1, r_2 \rangle = \frac{1 + i}{2} + (-i)\frac{1 - i}{2} = 0. With the reversed coefficient ⟨a2,q1⟩\langle a_2, q_1 \rangle the remainder would be (1−i2,i,3−i2)\left(\frac{1 - i}{2}, i, \frac{3 - i}{2}\right), whose inner product with a1a_1 is −2i-2i, so it is not orthogonal.

  1. With q1=12(1,i)q_1 = \frac{1}{\sqrt{2}}(1, i), q2=(1+i2,1−i2)q_2 = \left(\frac{1 + i}{2}, \frac{1 - i}{2}\right) and v=(1,0)v = (1, 0), a student takes the coefficients to be ⟨v,qj⟩\langle v, q_j \rangle. The squared sizes still add to ∥v∥2\lVert v \rVert^2. Is the expansion correct?
Show the answer

No. The student’s coefficients are 12\frac{1}{\sqrt{2}} and 1+i2\frac{1 + i}{2}, the conjugates of the correct ones. Conjugation does not change absolute values, so the Parseval sum is still 12+12=1\frac{1}{2} + \frac{1}{2} = 1. Rebuilding the vector exposes the error,

12 q1+1+i2 q2=(12,i2)+(i2,12)=(1+i2,1+i2),\begin{aligned} &\tfrac{1}{\sqrt{2}}\,q_1 + \tfrac{1 + i}{2}\,q_2 \\[0.4em] &\quad = \left( \tfrac{1}{2}, \tfrac{i}{2} \right) + \left( \tfrac{i}{2}, \tfrac{1}{2} \right) \\[0.4em] &\quad = \left( \tfrac{1 + i}{2}, \tfrac{1 + i}{2} \right), \end{aligned}

which is not vv. The correct coefficients are ⟨qj,v⟩\langle q_j, v \rangle, namely 12\frac{1}{\sqrt{2}} and 1−i2\frac{1 - i}{2}. A Parseval check alone cannot catch a conjugation mistake.

How this lesson connects

It also uses projection onto a line and the real Gram-Schmidt process.