The Cauchy–Schwarz inequality is a fundamental inequality in linear algebra and mathematical analysis. It states that the absolute value of the inner product of two vectors cannot exceed the product of their lengths. Its importance lies in expressing a single principle that applies to finite-dimensional vectors, infinite sequences, functions, and random variables. In its general form, [ |\langle x,y\rangle|\leq |x|,|y|. ] The lengths here are measured by the norm induced by the inner product. (people.maths.ox.ac.uk)
Statement and equality condition
Let (V) be a vector space over the real numbers or complex numbers, equipped with an inner product. Define [ |x|=\sqrt{\langle x,x\rangle}. ] For every (x,y\in V), the inequality can equivalently be written [ |\langle x,y\rangle|^2 \leq \langle x,x\rangle\langle y,y\rangle. ] Equality holds exactly when (x) and (y) are linearly dependent: one is a scalar multiple of the other, or at least one is zero. Thus, for two nonzero vectors, linear independence makes the inequality strict. No assumption of finite dimension or completeness is required; in particular, the result holds in every Hilbert space. (arxiv.org)
The absolute value is essential. A real inner product can be negative, while a complex inner product need not be real. The inequality controls magnitude, rather than imposing an ordering on complex values. (people.maths.ox.ac.uk)
Finite sums and geometric meaning
For vectors (a,b) in Euclidean space (\mathbb R^n), the usual dot product gives [ \left(\sum_{i=1}^{n}a_i b_i\right)^2 \leq \left(\sum_{i=1}^{n}a_i^2\right) \left(\sum_{i=1}^{n}b_i^2\right). ] For complex coordinates, the corresponding expression is [ \left|\sum_{i=1}^{n}a_i\overline{b_i}\right|^2 \leq \left(\sum_{i=1}^{n}|a_i|^2\right) \left(\sum_{i=1}^{n}|b_i|^2\right), ] where the bar denotes complex conjugation. (linear.axler.net)
In real inner product spaces, the inequality guarantees that [ \frac{\langle x,y\rangle}{|x||y|}\in[-1,1] ] for nonzero vectors. This makes it possible to define their angle through the cosine of this ratio. In ordinary Euclidean geometry, equality means that the vectors point along the same line, either in the same or opposite directions. The same ratio underlies cosine similarity. (ximera.osu.edu)
For example, (a=(1,2)) and (b=(3,4)) yield (121\leq125), a strict inequality. Replacing (b) by ((2,4)) gives equality because (b=2a).
Proof by orthogonal projection
A direct proof uses the nonnegativity of squared norms. Adopt the convention that the inner product is linear in its first argument. If (y=0), the result is immediate. Otherwise set [ c=\frac{\langle x,y\rangle}{|y|^2}, \qquad z=x-cy. ] Then (\langle z,y\rangle=0). The vector (cy) is the orthogonal projection of (x) onto the line generated by (y). Expanding the squared norm gives [ 0\leq|z|^2 =|x|^2-\frac{|\langle x,y\rangle|^2}{|y|^2}. ] Multiplication by (|y|^2) proves the inequality. Equality holds precisely when (z=0), which also proves the equality condition. This argument works over both real and complex scalars. (linear.axler.net)
A second proof in the real case considers the nonnegative polynomial [ |x-ty|^2 =|x|^2-2t\langle x,y\rangle+t^2|y|^2. ] Its quadratic discriminant cannot be positive, giving the same bound. (people.maths.ox.ac.uk)
Integrals and infinite sequences
In measure theory, square-integrable functions form the space \(L^2\), with inner product [ \langle f,g\rangle=\int_\Omega f\overline g,d\mu. ] Consequently, [ \left|\int_\Omega f\overline g,d\mu\right| \leq \left(\int_\Omega|f|^2,d\mu\right)^{1/2} \left(\int_\Omega|g|^2,d\mu\right)^{1/2}. ] The integral of the product is well defined because (|fg|) is integrable. Equality means linear dependence as elements of (L^2); proportionality is therefore required only almost everywhere, not necessarily at every point. Square-summable infinite sequences satisfy the analogous inequality, and their paired product series converges absolutely. (tropp.caltech.edu)
Probability and statistics
For real random variables (X,Y) with finite second moments on the same probability space, the pairing (\langle X,Y\rangle=\mathbb E[XY]) gives [ |\mathbb E[XY]|^2\leq\mathbb E[X^2]\mathbb E[Y^2], ] where (\mathbb E) denotes expected value. Applying this to centered variables yields [ |\operatorname{Cov}(X,Y)| \leq \sqrt{\operatorname{Var}(X)\operatorname{Var}(Y)}. ] Thus covariance is bounded by the product of the standard deviations. When both variances are positive, the Pearson correlation coefficient lies between (-1) and (1). Equality occurs when the centered variables are proportional almost surely. (tropp.caltech.edu)
Related inequalities
Cauchy–Schwarz establishes the triangle inequality for an inner-product-induced norm: [ |x+y|^2 \leq|x|^2+2|x||y|+|y|^2. ] Taking square roots gives (|x+y|\leq|x|+|y|). This connects inner product geometry with the theory of normed vector spaces. (ximera.osu.edu)
It is also the (p=q=2) case of Hölder’s inequality, which bounds products using conjugate exponents satisfying (1/p+1/q=1). Unlike the general Hölder inequality, the inner product formulation directly identifies equality with linear dependence. (math.ucla.edu)