Cauchy-Schwarz as a Puzzle Tool
How the Cauchy-Schwarz inequality — a bound on the dot product of two vectors — turns up as a quick trick for solving interview optimization and inequality puzzles.
The Cauchy-Schwarz inequality says that for any two lists of numbers and , , with equality exactly when the two lists are proportional to each other. In plain terms: the "alignment" between two vectors, measured by their dot product, can never exceed the product of their individual sizes — you can't get more out of combining two vectors than their lengths allow, and you only get the maximum when they point in exactly the same direction.
In interview puzzles this shows up as a fast way to prove a bound or find an optimum without calculus. A classic instance: minimize subject to . Writing and applying Cauchy-Schwarz with , gives , so , with equality when — the minimum is 50, found in two lines instead of a Lagrange multiplier setup. Interviewers like this problem because it tests whether a candidate recognizes the inequality's shape rather than reaching straight for calculus.
Cauchy-Schwarz bounds a dot product by the product of vector lengths, which turns many "minimize a sum of squares subject to a linear constraint" puzzles into a one-line algebraic bound instead of a calculus optimization.
Related concepts
Practice in interviews
Further reading
- Steele, The Cauchy-Schwarz Master Class