For real numbers, (a1b1+⋯+anbn)2≤(a12+⋯+an2)(b12+⋯+bn2)
Lesson 1 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
What you will be able to do
state the Cauchy-Schwarz inequality and its equality case;
prove it with a quadratic that is never negative;
use it to find the greatest value of a linear expression on a circle or sphere, and the least distance to a line or plane.
A shadow is never longer than the stick
Hold a stick in the sunlight. Its shadow on flat ground is never longer than the stick. In the language of vectors, the projection of u on v has length ∣u∣∣cosθ∣, and that is at most ∣u∣. Multiply by ∣v∣:
∣u⋅v∣≤∣u∣∣v∣.
Write the vectors as lists of components and square both sides. You get the Cauchy-Schwarz inequality.
Equality holds exactly when one list is a multiple of the other: bi=kai for every i (or every ai=0). The numbers may be negative. That is a big difference from AM-GM. Indian texts often call it the Cauchy-Schwarz inequality, Russian texts add the name Bunyakovsky, and some books just say Cauchy's inequality.
The proof with a quadratic
Write A=∑ai2, B=∑aibi and C=∑bi2. For every real t,
∑(ait−bi)2≥0,that isAt2−2Bt+C≥0.
If A=0, every ai is 0 and both sides of Cauchy-Schwarz are 0. If A>0, a quadratic that is never negative has at most one real root. So its discriminant is not positive: 4B2−4AC≤0, which is B2≤AC.
Equality B2=AC means the quadratic has a double root t0. Then every bracket ait0−bi is zero, so bi=t0ai: the lists are proportional.
For two terms there is an exact identity behind it, Lagrange's identity:
Real numbers x and y satisfy x2+y2=25. What is the greatest value of 3x+4y?
Cauchy-Schwarz with the lists (3,4) and (x,y): (3x+4y)2≤(9+16)(x2+y2)=625.
So3x+4y≤25.
Equality needs (x,y)=k(3,4). With x2+y2=25 this gives k=1, the point (3,4), and 3×3+4×4=25.
The picture is a line 3x+4y=c moving outwards until it just touches the circle.
A circle of radius 5 centred at the origin, in blue. Three parallel red lines of the form 3x + 4y = c are drawn for c = 10, 20 and 25. The first two cut the circle at two points each. The line for c = 25 touches the circle at the single point (3, 4), marked with a dot. A green arrow from the origin to (3, 4) is perpendicular to the lines.
Least value on a plane
Real numbers satisfy x+2y+2z=9. What is the least value of x2+y2+z2?
Cauchy-Schwarz with (1,2,2) and (x,y,z) gives 81=(x+2y+2z)2≤9(x2+y2+z2). So x2+y2+z2≥9, with equality at (x,y,z)=(1,2,2). The point of the plane nearest to the origin is (1,2,2), at a distance of 3. You will meet the same distance formula in the chapter on three-dimensional geometry.
Practise with new numbers
Try it in Python
The program checks Cauchy-Schwarz on many random lists, prints the smallest gap AC−B2 it finds, and then tries a pair of proportional lists.
Common mistakes
Squaring the wrong side. The left side is the square of one sum, (∑aibi)2, not ∑ai2bi2.
Forgetting the equality check. The bound is a greatest value only if a proportional pair satisfies the constraint.
Dropping the square root. From (3x+4y)2≤625 you get 3x+4y≤25, not 625.
Thinking the numbers must be positive. Cauchy-Schwarz holds for all real numbers. AM-GM is the one that needs positives.
Remember these
(∑aibi)2≤(∑ai2)(∑bi2), for all real numbers.
Equality only when the lists are proportional.
Vector form: ∣u⋅v∣≤∣u∣∣v∣.
The greatest value of px+qy on x2+y2=r2 is rp2+q2.
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
Check Cauchy-Schwarz for the lists (1,2) and (3,−1).
Find the greatest value of x+y when x2+y2=8.
Find the least value of x2+y2 when x+3y=10.
Verify Lagrange's identity for (a1,a2)=(2,1) and (b1,b2)=(1,3).
When is (a1b1+a2b2+a3b3)2=(a12+a22+a32)(b12+b22+b32)?
References
Steele, The Cauchy-Schwarz Master Class, Chapter 1, on the inequality and its proofs.
OpenStax, Calculus Volume 3, Chapter 2, section 2.3 on the dot product and the angle between vectors.
Enroll free in Cauchy-Schwarz, Rearrangement and Chebyshev
Every lesson is open to read. Enrolling also lets you:
Mark lessons done and carry on where you stopped.
Take the tests of this lesson and its course.
Count the course towards the certificate for its chapter.
, with equality only when the two lists are proportional. In vector words, the dot product is at most the product of the lengths. The proof uses a quadratic in
t
that is never negative, so its discriminant cannot be positive. The inequality finds greatest and least values on circles, spheres, lines and planes.
about 25 min1 simulation1 practice question1 Python program5 questions to check yourself
This lesson is free to read. Enroll free to keep your place and take the tests.