Linear-Algebra-Done-Right · Unit 14 · Video 3 · Interactive Practice
Cauchy-Schwarz and the Triangle Inequality
IKey Formulas
Formula
Name
Hypotheses and equality case
c=∥v∥2⟨u,v⟩,w=u−cv⟹u=cv+w,⟨w,v⟩=0
Orthogonal decomposition
V an inner product space over F (F=R or C), u,v∈V, v=0; the numerator is ⟨u,v⟩, not ⟨v,u⟩
∣⟨u,v⟩∣≤∥u∥∥v∥
Cauchy–Schwarz inequality
u,v∈V; equality ⟺ one of u,v is a scalar multiple of the other
∥u+v∥≤∥u∥+∥v∥
Triangle inequality
u,v∈V; equality ⟺ one of u,v is a nonnegative real multiple of the other
∥u+v∥2+∥u−v∥2=2(∥u∥2+∥v∥2)
Parallelogram equality
u,v∈V; always an equation
Key Insight: Cauchy–Schwarz is the Pythagorean theorem applied to the decomposition: ∥u∥2=∥cv∥2+∥w∥2≥∥cv∥2=∥v∥2∣⟨u,v⟩∣2, with equality exactly when w=0.
IISplitting u Along v
The scalar c=⟨u,v⟩/∥v∥2 makes w=u−cv orthogonal to v, and ∥u∥≥∥cv∥ is Cauchy–Schwarz.
💡 In a complex inner product space the numerator must be ⟨u,v⟩, with u in the first slot: using ⟨v,u⟩=⟨u,v⟩ instead leaves a leftover that is in general not orthogonal to v.
IIIWhich Step Loses Equality
With ∥u∥=3 and ∥v∥=2 in R2, ∥u+v∥=∥u∥+∥v∥ only when v points the same way as u.
IVDiagonals Against Sides
The squared diagonals sum to twice the squared sides, because the cross terms ±2⟨u,v⟩ cancel.
VQuiz Questions
Problem 1 · Decompose u Along v in R⁴
Given: in R4 with the Euclidean inner product, u=(4,1,3,0) and v=(1,1,1,1) — findc and w with u=cv+w and ⟨w,v⟩=0.
✅ Correct!c=8/4=2, w=u−2v=(2,−1,1,−2), and ⟨w,v⟩=2−1+1−2=0.
❌ Not quite. That divides by ∥v∥=2 instead of ∥v∥2=4. Then ⟨w,v⟩=0−3−1−4=−8=0.
❌ Not quite. This w is cv−u. It is orthogonal to v, but cv+w=(0,3,1,4)=u; the leftover must be w=u−cv.
❌ Not quite. That is ∥v∥2/⟨u,v⟩, the fraction upside down. Then ⟨w,v⟩=27+21+25−21=6=0.
❌ Not quite. Compute c=⟨u,v⟩/∥v∥2, then w=u−cv.
Show solution
Here v=0, so the orthogonal decomposition applies.
Check: ⟨w,v⟩=2−1+1−2=0 and cv+w=(2,2,2,2)+(2,−1,1,−2)=(4,1,3,0)=u.
Problem 2 · A Negative Multiple
Given: in R3 with the Euclidean inner product, u=(1,−2,2) and v=(−2,4,−4) — find the true statement about Cauchy–Schwarz and the triangle inequality for this pair.
✅ Correct!v=−2u is a scalar multiple of u, which is all Cauchy–Schwarz equality asks, but −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) has norm 3, while ∥u∥+∥v∥=3+6=9.
❌ Not quite. Cauchy–Schwarz equality allows any scalar multiple, negative ones included: ∣⟨u,v⟩∣=∣−18∣=18=3⋅6.
❌ Not quite. Triangle equality would force Cauchy–Schwarz equality, since the triangle proof passes through ∣⟨u,v⟩∣≤∥u∥∥v∥. Compute both sides of each.
❌ Not quite. Compute ⟨u,v⟩, ∥u∥, ∥v∥ and ∥u+v∥.
Show solution
∥u∥=1+4+4=3, ∥v∥=4+16+16=6, and ⟨u,v⟩=−2−8−8=−18.
Cauchy–Schwarz:∣⟨u,v⟩∣=18=3⋅6=∥u∥∥v∥, an equality, as it must be because v=−2u is a scalar multiple of u.
Triangle inequality:u+v=(−1,2,−2), so ∥u+v∥=3<9=∥u∥+∥v∥. Equality would need one vector to be a nonnegative real multiple of the other; u=−21v and v=−2u only use negative scalars. In the proof, the real-part step fails: Re⟨u,v⟩=−18<18=∣⟨u,v⟩∣.
Problem 3 · Cauchy–Schwarz for Integrals
Given: on the continuous real-valued functions on [−1,1] with ⟨f,g⟩=∫−11fg, take f(x)=x and g(x)=x3. Cauchy–Schwarz, squared, reads ∫−11fg2≤(∫−11f2)(∫−11g2) — find both sides.
Left side ∫−11fg2
Right side (∫−11f2)(∫−11g2)
✅ Correct!254<214, strict because neither of x, x3 is a constant multiple of the other.
❌ Not quite.∫−11x4dx=52 is ⟨f,g⟩ itself; the left side squares it.
❌ Not quite. That is (∫f)(∫g), which is not the inner product. Integrate the product: fg=x4.
❌ Not quite.∫−11f2g2=∫−11x8=92 appears in neither side: the left side is the square of ∫fg, the right side the product of two separate integrals.
❌ Not quite. That is (∫x2)2; the second factor is ∥g∥2=∫−11x6=72, not ∫x2.
❌ Not quite.∫−11x2=32 (not 31): integrate over the whole interval [−1,1].
❌ Check the left side. Integrate fg=x4 over [−1,1], then square.
❌ Check the right side. Multiply ∥f∥2=∫−11x2 by ∥g∥2=∫−11x6.
Show solution
Left side:⟨f,g⟩=∫−11x⋅x3dx=∫−11x4dx=[5x5]−11=52, so ∣⟨f,g⟩∣2=254.
Right side:∥f∥2=∫−11x2dx=32 and ∥g∥2=∫−11x6dx=72, so the product is 214.
254=0.16<214≈0.190.
The inequality is strict: equality would need one function to be a scalar multiple of the other, and x3=λx for all x∈[−1,1] is impossible.
Problem 4 · The Other Diagonal
Given: in a real inner product space, ∥u∥=3, ∥v∥=5 and ∥u+v∥=7 — find∥u−v∥ and ⟨u,v⟩.
What is ∥u−v∥?
What is ⟨u,v⟩?
✅ Correct!∥u−v∥2=2(9+25)−49=19, and 49=9+25+2⟨u,v⟩ gives ⟨u,v⟩=215, consistent with Cauchy–Schwarz since 215≤3⋅5.
❌ Not quite. The parallelogram equality uses ∥u+v∥2=49, not 7: ∥u−v∥2=68−49.
❌ Not quite.2(3+5)−7 uses lengths where the equality needs squared lengths: ∥u−v∥2=2(32+52)−72.
❌ Not quite.19 is ∥u−v∥2; take the square root.
❌ Not quite. The cross term is 2⟨u,v⟩=15; divide by 2.
❌ Not quite.∥u+v∥2=49 exceeds ∥u∥2+∥v∥2=34, so 2⟨u,v⟩=49−34 is positive.
❌ Not quite.219 is half of ∥u−v∥2. Expand ∥u+v∥2=∥u∥2+∥v∥2+2⟨u,v⟩ instead.
❌ Check the diagonal. Use ∥u+v∥2+∥u−v∥2=2(∥u∥2+∥v∥2) with squared lengths.
❌ Check the inner product. In a real space ∥u+v∥2=∥u∥2+∥v∥2+2⟨u,v⟩.