A single inequality can explain why a shadow is shorter than the object casting it, why correlation cannot exceed one, and how to maximize a linear expression on a sphere. These are not separate coincidences. They are different faces of the Cauchy–Schwarz inequality.
We will discover the inequality geometrically, prove it algebraically, and then follow it into calculus, probability, and optimization. Along the way, we will see exactly when equality occurs—often the most useful part of the result.
1. The inequality itself
For any real numbers a1, …, an and b1, …, bn,
In words: the square of a dot product never exceeds the product of the squared lengths. For vectors u and v, this becomes
Equality holds precisely when the two vectors are linearly dependent (including the case where one is zero). This simple condition will return in every application.
2. Geometry: Why a projection cannot be too long
Imagine two arrows starting at the same point. Their dot product measures how much one arrow points along the other. If the angle between them is θ, then
Because the absolute value of cosine is at most one, Cauchy–Schwarz follows immediately. The more interesting point is its meaning: the component of a vector along a direction cannot be longer than the vector itself.
This picture also explains equality: the projection has the full length of the original vector only when the vectors point along the same line (possibly in opposite directions).
3. Algebra: A quadratic that can never be negative
The geometric argument is intuitive, but there is a purely algebraic proof that works even when we cannot draw the vectors. For any real number t, consider
Expanding a sum of squares gives a quadratic in t that is never negative, so its discriminant cannot be positive, and that condition is exactly Cauchy–Schwarz. Equality occurs only when the vectors are proportional.
Show the discriminant proof
Expanding gives a quadratic polynomial in t:
A real quadratic that is nonnegative for every real t cannot have two distinct real roots. Therefore its discriminant is nonpositive:
Dividing by four proves Cauchy–Schwarz. Equality occurs when the quadratic reaches zero, meaning every term in the original sum of squares vanishes: the vectors are proportional.
4. First application: A surprising inequality for reciprocals
Let a, b, and c be positive. Prove that
The key is to choose the vectors creatively. Take the components of the first vector to be square roots of a, b, c, and the second to be their reciprocals:
Their dot product is 3. Thus Cauchy–Schwarz says
Divide by the positive sum. Equality holds exactly when a = b = c. Notice the method: choose two factors whose product is one. This trick appears in many inequality problems.
5. Calculus: Cauchy–Schwarz for integrals
A sum of products becomes an integral of a product. For continuous real-valued functions f and g on [a, b], the corresponding inequality is
One way to understand the formula is to approximate the integrals by Riemann sums and apply finite-dimensional Cauchy–Schwarz. Another is to observe that the integral of the square of f(x) − tg(x) is nonnegative for every real t, and repeat the discriminant argument.
For continuous functions, equality holds when one function is a constant multiple of the other throughout the interval (with the zero-function case included).
Worked example: Bound an integral without evaluating it
How large can the following integral be?
Show the bound
Apply integral Cauchy–Schwarz on [0, 1]:
By Cauchy–Schwarz, the square of this integral is at most the product of the integral of x squared and the integral of sin squared of x squared. The first factor is 1/3, and the second is at most 1.
Since the square of sine is at most one,
The exact integral is not needed to obtain this bound. In this example, substitution would also allow us to evaluate the integral exactly, but Cauchy–Schwarz illustrates a method that remains useful even when an integral has no convenient elementary antiderivative.
6. Probability: Why correlation never exceeds one
Suppose random variables X and Y have finite, positive variances. Subtract their means to form centered variables U = X − E[X] and V = Y − E[Y]. The expectation of a square is always nonnegative, so the same quadratic proof gives
The numerator is the covariance, while the two factors on the right are variances. The correlation coefficient is
Consequently,
This is not an arbitrary convention of statistics: it is a mathematical necessity. Equality in absolute value occurs when the centered variables are proportional almost surely, corresponding to a perfect linear relationship.
Worked example: Two perfectly related measurements
Suppose Y = 3X + 5 and X has positive finite variance. Then Y − E[Y] = 3(X − E[X]). The centered variables point in exactly the same direction, so the correlation is 1. If instead Y = −3X + 5, the correlation is −1.
7. Optimization: The maximum of a linear expression
Find the largest possible value of 3x + 4y subject to
The constraint says that the point lies on the unit circle. Cauchy–Schwarz gives
The upper bound is attained at
Thus the maximum is 5, obtained without differentiation or Lagrange multipliers.
The general principle is even more useful: under the constraint that the sum of the squares of xi equals 1, the largest value of the weighted sum of the xi is the length of the vector of weights.
Here the maximum is taken over all real vectors with squared length 1. Equality is attained when the optimizing vector points in the direction of the coefficient vector (assuming the latter is nonzero).
8. A second surprising application: The triangle inequality
The triangle inequality says that traveling directly cannot be longer than traveling along two successive vectors:
Squaring both sides and applying Cauchy–Schwarz to the middle term proves it, so one familiar geometric rule follows from another.
Show the proof
To prove it, square the left-hand side:
By Cauchy–Schwarz, the middle term is at most twice the product of the lengths. Therefore
Taking nonnegative square roots proves the triangle inequality. Thus one familiar geometric rule follows from another.
9. Active learning: Three problems to try
Try each problem before opening its solution. Each one requires a different choice of vectors or functions.
Problem 1. Find the minimum of x² + y² + z² when x + y + z = 6.
Apply Cauchy–Schwarz to the vectors (1, 1, 1) and (x, y, z):
The sum is 6, so the sum of squares is at least 12. Equality holds at x = y = z = 2. The minimum is 12.
Problem 2. Show that the integral of f on [0,1] is controlled by the integral of f².
Apply integral Cauchy–Schwarz with g(x) = 1:
Equality holds when f is constant on [0,1] (assuming f is continuous). This is a basic bridge between the average value and the mean square of a function.
Problem 3. Prove that (a + b + c)(1/a + 1/b + 1/c) is at least 9 for positive a, b, c.
Use the vectors from Section 4, whose entries are the square roots of a, b, c and their reciprocals. Their dot product is 3, so its square is 9. Equality holds precisely when a = b = c.
10. What makes the inequality so powerful?
The examples above all share a hidden pattern: a complicated expression is represented as a dot product, and the two factors are controlled separately. The main creative step is rarely applying the inequality—it is recognizing the right two vectors or functions.
In geometry, the two objects are arrows. In calculus, they are functions. In probability, they are centered random variables. In optimization, they are a coefficient vector and a point constrained to a sphere. The same argument works because each setting has a notion of length and an inner product.
Further reading and connections
For a broader mathematical treatment, see the Cauchy–Schwarz inequality in standard linear algebra and real analysis texts. The integral and probability forms are instances of the same inner-product principle. A natural next step is Hölder’s inequality, which generalizes the product estimate to other exponents.
For a second, less familiar version of the inequality, see Two Cauchy–Schwarz Inequalities with Opposite Directions. And for the natural next step, where the exponents 2 and 2 become any pair p and q, read Hölder’s Inequality: Beyond Cauchy–Schwarz.
For more calculus and geometry explorations, browse the Elite Math Program topics.
Original explanations and diagrams prepared for Elite Math Program.
Explore further: The geometry of vectors and lengths becomes even more interesting in higher dimensions. See our article Why Does Differentiating the Volume of a Hypersphere Give Its Surface Area? for another surprising connection between geometry and calculus.
An interesting application of the Cauchy-Schwarz inequality appears in spherical geometry. The dot product of two unit vectors determines the shortest distance between them along the surface of a sphere. Read more in Two Points on a Sphere: Why the Dot Product Measures Distance .
Another powerful tool for proving inequalities is Jensen’s Inequality: How Curvature Controls Averages , which connects convexity, probability, and optimization.

Leave a Reply