Linear-Algebra-Done-Right · Unit 14 · Video 3 · Interactive Practice

Cauchy-Schwarz and the Triangle Inequality

IKey Formulas

FormulaNameHypotheses and equality case
c=⟨u,v⟩∥v∥2, w=u−cv  ⟹  u=cv+w, ⟨w,v⟩=0c = \dfrac{\langle u, v\rangle}{\|v\|^2}, \ w = u - cv \implies u = cv + w, \ \langle w, v\rangle = 0Orthogonal decompositionVV an inner product space over F\mathbf{F} (F=R\mathbf{F} = \mathbf{R} or C\mathbf{C}), u,v∈Vu, v \in V, v≠0v \ne 0; the numerator is ⟨u,v⟩\langle u, v\rangle, not ⟨v,u⟩\langle v, u\rangle
∣⟨u,v⟩∣≤∥u∥ ∥v∥|\langle u, v\rangle| \le \|u\|\,\|v\|Cauchy–Schwarz inequalityu,v∈Vu, v \in V; equality   ⟺  \iff one of u,vu, v is a scalar multiple of the other
∥u+v∥≤∥u∥+∥v∥\|u + v\| \le \|u\| + \|v\|Triangle inequalityu,v∈Vu, v \in V; equality   ⟺  \iff one of u,vu, v is a nonnegative real multiple of the other
∥u+v∥2+∥u−v∥2=2(∥u∥2+∥v∥2)\|u + v\|^2 + \|u - v\|^2 = 2\bigl(\|u\|^2 + \|v\|^2\bigr)Parallelogram equalityu,v∈Vu, v \in V; always an equation

Key Insight: Cauchy–Schwarz is the Pythagorean theorem applied to the decomposition: ∥u∥2=∥cv∥2+∥w∥2≥∥cv∥2=∣⟨u,v⟩∣2∥v∥2\|u\|^2 = \|cv\|^2 + \|w\|^2 \ge \|cv\|^2 = \dfrac{|\langle u, v\rangle|^2}{\|v\|^2}, with equality exactly when w=0w = 0.

IISplitting u Along v

The scalar c=⟨u,v⟩/∥v∥2c = \langle u, v\rangle / \|v\|^2 makes w=u−cvw = u - cv orthogonal to vv, and ∥u∥≥∥cv∥\|u\| \ge \|cv\| is Cauchy–Schwarz.

💡 In a complex inner product space the numerator must be ⟨u,v⟩\langle u, v\rangle, with uu in the first slot: using ⟨v,u⟩=⟨u,v⟩‾\langle v, u\rangle = \overline{\langle u, v\rangle} instead leaves a leftover that is in general not orthogonal to vv.

IIIWhich Step Loses Equality

With ∥u∥=3\|u\| = 3 and ∥v∥=2\|v\| = 2 in R2\mathbf{R}^2, ∥u+v∥=∥u∥+∥v∥\|u + v\| = \|u\| + \|v\| only when vv points the same way as uu.

IVDiagonals Against Sides

The squared diagonals sum to twice the squared sides, because the cross terms ±2⟨u,v⟩\pm 2\langle u, v\rangle cancel.

VQuiz Questions

Problem 1 · Decompose u Along v in R⁴

Given: in R4\mathbf{R}^4 with the Euclidean inner product, u=(4,1,3,0)u = (4, 1, 3, 0) and v=(1,1,1,1)v = (1, 1, 1, 1) — find cc and ww with u=cv+wu = cv + w and ⟨w,v⟩=0\langle w, v\rangle = 0.

✅ Correct! c=8/4=2c = 8/4 = 2, w=u−2v=(2,−1,1,−2)w = u - 2v = (2, -1, 1, -2), and ⟨w,v⟩=2−1+1−2=0\langle w, v\rangle = 2 - 1 + 1 - 2 = 0.
❌ Not quite. That divides by ∥v∥=2\|v\| = 2 instead of ∥v∥2=4\|v\|^2 = 4. Then ⟨w,v⟩=0−3−1−4=−8≠0\langle w, v\rangle = 0 - 3 - 1 - 4 = -8 \ne 0.
❌ Not quite. This ww is cv−ucv - u. It is orthogonal to vv, but cv+w=(0,3,1,4)≠ucv + w = (0, 3, 1, 4) \ne u; the leftover must be w=u−cvw = u - cv.
❌ Not quite. That is ∥v∥2/⟨u,v⟩\|v\|^2 / \langle u, v\rangle, the fraction upside down. Then ⟨w,v⟩=72+12+52−12=6≠0\langle w, v\rangle = \tfrac{7}{2} + \tfrac{1}{2} + \tfrac{5}{2} - \tfrac{1}{2} = 6 \ne 0.
❌ Not quite. Compute c=⟨u,v⟩/∥v∥2c = \langle u, v\rangle / \|v\|^2, then w=u−cvw = u - cv.
Show solution

Here v≠0v \ne 0, so the orthogonal decomposition applies.

⟨u,v⟩=4+1+3+0=8,∥v∥2=1+1+1+1=4,c=⟨u,v⟩∥v∥2=84=2.\langle u, v\rangle = 4 + 1 + 3 + 0 = 8, \qquad \|v\|^2 = 1 + 1 + 1 + 1 = 4, \qquad c = \frac{\langle u, v\rangle}{\|v\|^2} = \frac{8}{4} = 2. w=u−cv=(4,1,3,0)−(2,2,2,2)=(2,−1,1,−2).w = u - cv = (4, 1, 3, 0) - (2, 2, 2, 2) = (2, -1, 1, -2).

Check: ⟨w,v⟩=2−1+1−2=0\langle w, v\rangle = 2 - 1 + 1 - 2 = 0 and cv+w=(2,2,2,2)+(2,−1,1,−2)=(4,1,3,0)=ucv + w = (2, 2, 2, 2) + (2, -1, 1, -2) = (4, 1, 3, 0) = u.

Problem 2 · A Negative Multiple

Given: in R3\mathbf{R}^3 with the Euclidean inner product, u=(1,−2,2)u = (1, -2, 2) and v=(−2,4,−4)v = (-2, 4, -4) — find the true statement about Cauchy–Schwarz and the triangle inequality for this pair.

✅ Correct! v=−2uv = -2u is a scalar multiple of uu, which is all Cauchy–Schwarz equality asks, but −2-2 is negative, so the triangle inequality is strict.
❌ Not quite. The triangle inequality needs a nonnegative real multiple. Here u+v=(−1,2,−2)u + v = (-1, 2, -2) has norm 33, while ∥u∥+∥v∥=3+6=9\|u\| + \|v\| = 3 + 6 = 9.
❌ Not quite. Cauchy–Schwarz equality allows any scalar multiple, negative ones included: ∣⟨u,v⟩∣=∣−18∣=18=3⋅6|\langle u, v\rangle| = |-18| = 18 = 3 \cdot 6.
❌ Not quite. Triangle equality would force Cauchy–Schwarz equality, since the triangle proof passes through ∣⟨u,v⟩∣≤∥u∥ ∥v∥|\langle u, v\rangle| \le \|u\|\,\|v\|. Compute both sides of each.
❌ Not quite. Compute ⟨u,v⟩\langle u, v\rangle, ∥u∥\|u\|, ∥v∥\|v\| and ∥u+v∥\|u + v\|.
Show solution

∥u∥=1+4+4=3\|u\| = \sqrt{1 + 4 + 4} = 3,  ∥v∥=4+16+16=6\ \|v\| = \sqrt{4 + 16 + 16} = 6, and ⟨u,v⟩=−2−8−8=−18\langle u, v\rangle = -2 - 8 - 8 = -18.

Cauchy–Schwarz: ∣⟨u,v⟩∣=18=3⋅6=∥u∥ ∥v∥|\langle u, v\rangle| = 18 = 3 \cdot 6 = \|u\|\,\|v\|, an equality, as it must be because v=−2uv = -2u is a scalar multiple of uu.

Triangle inequality: u+v=(−1,2,−2)u + v = (-1, 2, -2), so ∥u+v∥=3<9=∥u∥+∥v∥\|u + v\| = 3 \lt 9 = \|u\| + \|v\|. Equality would need one vector to be a nonnegative real multiple of the other; u=−12vu = -\tfrac{1}{2}v and v=−2uv = -2u only use negative scalars. In the proof, the real-part step fails: Re ⟨u,v⟩=−18<18=∣⟨u,v⟩∣\mathrm{Re}\,\langle u, v\rangle = -18 \lt 18 = |\langle u, v\rangle|.

Problem 3 · Cauchy–Schwarz for Integrals

Given: on the continuous real-valued functions on [−1,1][-1, 1] with ⟨f,g⟩=∫−11fg\langle f, g\rangle = \int_{-1}^{1} fg, take f(x)=xf(x) = x and g(x)=x3g(x) = x^3. Cauchy–Schwarz, squared, reads ∣∫−11fg∣2≤(∫−11f2)(∫−11g2)\Bigl|\int_{-1}^{1} fg\Bigr|^2 \le \Bigl(\int_{-1}^{1} f^2\Bigr)\Bigl(\int_{-1}^{1} g^2\Bigr) — find both sides.

Left side ∣∫−11fg∣2\Bigl|\int_{-1}^{1} fg\Bigr|^2

Right side (∫−11f2)(∫−11g2)\Bigl(\int_{-1}^{1} f^2\Bigr)\Bigl(\int_{-1}^{1} g^2\Bigr)

✅ Correct! 425<421\tfrac{4}{25} \lt \tfrac{4}{21}, strict because neither of xx, x3x^3 is a constant multiple of the other.
❌ Not quite. ∫−11x4 dx=25\int_{-1}^{1} x^4\,dx = \tfrac{2}{5} is ⟨f,g⟩\langle f, g\rangle itself; the left side squares it.
❌ Not quite. That is (∫f)(∫g)\bigl(\int f\bigr)\bigl(\int g\bigr), which is not the inner product. Integrate the product: fg=x4fg = x^4.
❌ Not quite. ∫−11f2g2=∫−11x8=29\int_{-1}^{1} f^2 g^2 = \int_{-1}^{1} x^8 = \tfrac{2}{9} appears in neither side: the left side is the square of ∫fg\int fg, the right side the product of two separate integrals.
❌ Not quite. That is (∫x2)2\bigl(\int x^2\bigr)^2; the second factor is ∥g∥2=∫−11x6=27\|g\|^2 = \int_{-1}^{1} x^6 = \tfrac{2}{7}, not ∫x2\int x^2.
❌ Not quite. ∫−11x2=23\int_{-1}^{1} x^2 = \tfrac{2}{3} (not 13\tfrac{1}{3}): integrate over the whole interval [−1,1][-1, 1].
❌ Check the left side. Integrate fg=x4fg = x^4 over [−1,1][-1, 1], then square.
❌ Check the right side. Multiply ∥f∥2=∫−11x2\|f\|^2 = \int_{-1}^{1} x^2 by ∥g∥2=∫−11x6\|g\|^2 = \int_{-1}^{1} x^6.
Show solution

Left side: ⟨f,g⟩=∫−11x⋅x3 dx=∫−11x4 dx=[x55]−11=25\langle f, g\rangle = \int_{-1}^{1} x \cdot x^3\,dx = \int_{-1}^{1} x^4\,dx = \Bigl[\tfrac{x^5}{5}\Bigr]_{-1}^{1} = \tfrac{2}{5}, so ∣⟨f,g⟩∣2=425|\langle f, g\rangle|^2 = \tfrac{4}{25}.

Right side: ∥f∥2=∫−11x2 dx=23\|f\|^2 = \int_{-1}^{1} x^2\,dx = \tfrac{2}{3} and ∥g∥2=∫−11x6 dx=27\|g\|^2 = \int_{-1}^{1} x^6\,dx = \tfrac{2}{7}, so the product is 421\tfrac{4}{21}.

425=0.16<421≈0.190.\frac{4}{25} = 0.16 \lt \frac{4}{21} \approx 0.190.

The inequality is strict: equality would need one function to be a scalar multiple of the other, and x3=λxx^3 = \lambda x for all x∈[−1,1]x \in [-1, 1] is impossible.

Problem 4 · The Other Diagonal

Given: in a real inner product space, ∥u∥=3\|u\| = 3, ∥v∥=5\|v\| = 5 and ∥u+v∥=7\|u + v\| = 7 — find ∥u−v∥\|u - v\| and ⟨u,v⟩\langle u, v\rangle.

What is ∥u−v∥\|u - v\|?

What is ⟨u,v⟩\langle u, v\rangle?

✅ Correct! ∥u−v∥2=2(9+25)−49=19\|u - v\|^2 = 2(9 + 25) - 49 = 19, and 49=9+25+2⟨u,v⟩49 = 9 + 25 + 2\langle u, v\rangle gives ⟨u,v⟩=152\langle u, v\rangle = \tfrac{15}{2}, consistent with Cauchy–Schwarz since 152≤3⋅5\tfrac{15}{2} \le 3 \cdot 5.
❌ Not quite. The parallelogram equality uses ∥u+v∥2=49\|u + v\|^2 = 49, not 77: ∥u−v∥2=68−49\|u - v\|^2 = 68 - 49.
❌ Not quite. 2(3+5)−72(3 + 5) - 7 uses lengths where the equality needs squared lengths: ∥u−v∥2=2(32+52)−72\|u - v\|^2 = 2(3^2 + 5^2) - 7^2.
❌ Not quite. 1919 is ∥u−v∥2\|u - v\|^2; take the square root.
❌ Not quite. The cross term is 2⟨u,v⟩=152\langle u, v\rangle = 15; divide by 22.
❌ Not quite. ∥u+v∥2=49\|u + v\|^2 = 49 exceeds ∥u∥2+∥v∥2=34\|u\|^2 + \|v\|^2 = 34, so 2⟨u,v⟩=49−342\langle u, v\rangle = 49 - 34 is positive.
❌ Not quite. 192\tfrac{19}{2} is half of ∥u−v∥2\|u - v\|^2. Expand ∥u+v∥2=∥u∥2+∥v∥2+2⟨u,v⟩\|u + v\|^2 = \|u\|^2 + \|v\|^2 + 2\langle u, v\rangle instead.
❌ Check the diagonal. Use ∥u+v∥2+∥u−v∥2=2(∥u∥2+∥v∥2)\|u + v\|^2 + \|u - v\|^2 = 2\bigl(\|u\|^2 + \|v\|^2\bigr) with squared lengths.
❌ Check the inner product. In a real space ∥u+v∥2=∥u∥2+∥v∥2+2⟨u,v⟩\|u + v\|^2 = \|u\|^2 + \|v\|^2 + 2\langle u, v\rangle.
Show solution

Parallelogram equality:

∥u−v∥2=2(∥u∥2+∥v∥2)−∥u+v∥2=2(9+25)−49=19,∥u−v∥=19.\|u - v\|^2 = 2\bigl(\|u\|^2 + \|v\|^2\bigr) - \|u + v\|^2 = 2(9 + 25) - 49 = 19, \qquad \|u - v\| = \sqrt{19}.

Expansion: in a real inner product space Re ⟨u,v⟩=⟨u,v⟩\mathrm{Re}\,\langle u, v\rangle = \langle u, v\rangle, so

49=∥u+v∥2=∥u∥2+∥v∥2+2⟨u,v⟩=34+2⟨u,v⟩,⟨u,v⟩=152.49 = \|u + v\|^2 = \|u\|^2 + \|v\|^2 + 2\langle u, v\rangle = 34 + 2\langle u, v\rangle, \qquad \langle u, v\rangle = \frac{15}{2}.

Check with the other diagonal: ∥u−v∥2=34−2⋅152=19\|u - v\|^2 = 34 - 2 \cdot \tfrac{15}{2} = 19. Both inequalities hold strictly: ∣⟨u,v⟩∣=152<15=∥u∥ ∥v∥|\langle u, v\rangle| = \tfrac{15}{2} \lt 15 = \|u\|\,\|v\| and ∥u+v∥=7<8=∥u∥+∥v∥\|u + v\| = 7 \lt 8 = \|u\| + \|v\|.

Solved: 0 / 4