The inequality for sums was published by , while the corresponding inequality for integrals was first stated by and rediscovered by (often misspelled "Schwartz").
The Cauchy–Schwarz inequality states that for all vectors x and y of an inner product space,
Equality holds if and only if x and y are linearly dependent, that is, one is a scalar multiple of the other (which includes the case when one or both are zero).
The finite-dimensional case of this inequality for real vectors was proved by Cauchy in 1821, and in 1859 Cauchy's student V.Ya. Bunyakovsky noted that by taking limits one can obtain an integral form of Cauchy's inequality. The general result for an inner product space was obtained by K.H.A.Schwarz in 1885.
As the inequality is trivially true in the case y = 0, we may assume <y, y> is nonzero. Let be a complex number. Then,
The above expression is valid for any complex . Choosing
which is true if and only if
which is the Cauchy–Schwarz inequality.
To prove this form of the inequality, consider the following quadratic polynomial in z.
Since it is nonnegative it has at most one real root in z, whence its discriminant is less than or equal to zero, that is,
An equivalent proof for Rn starts with the summation below.
Expanding the brackets we have:
collecting together identical terms (albeit with different summation indices) we find:
Because the left-hand side of the equation is a sum of the squares of real numbers it is greater than or equal to zero, thus:
Yet another approach when n ≥ 2 (n = 1 is trivial) is to consider the plane containing x and y. More precisely, recoordinatize Rn with any orthonormal basis whose first two vectors span a subspace containing x and y. In this basis only and are nonzero, and the inequality reduces to the algebra of dot product in the plane, which is related to the angle between two vectors, from which we obtain the inequality:
When n = 3 the Cauchy–Schwarz inequality can also be deduced from Lagrange's identity, which takes the form
from which readily follows the Cauchy–Schwarz inequality.
A generalization of this is the Hölder inequality.
Taking the square roots gives the triangle inequality.
The Cauchy–Schwarz inequality proves that this definition is sensible, by showing that the right hand side lies in the interval [−1, 1], and justifies the notion that real inner product spaces are simply generalizations of the Euclidean space.
The Cauchy–Schwarz inequality is usually used to show Bessel's inequality.
Various generalizations of the Cauchy–Schwarz inequality exist in the context of operator theory, e.g. for operator-convex functions, and operator algebras, where the domain and/or range of φ are replaced by a C*-algebra or W*-algebra.
This section lists a few of such inequalities from the operator algebra setting, to give a flavor of results of this type.
One can discuss inner products as positive functionals. Given a Hilbert space L2(m), m being a finite measure, the inner product < · , · > gives rise to a positive functional φ by
Since < f,f > ≥ 0, φ(f*f) ≥ 0 for all f in L2(m), where f* is pointwise conjugate of f. So φ is positive. Conversely every positive functional φ gives a corresponding inner product < f , g >φ = φ(g*f). In this language, the Cauchy–Schwarz inequality becomes
which extends verbatim to positive functionals on C*-algebras.
We now give an operator theoretic proof for the Cauchy–Schwarz inequality which passes to the C*-algebra setting. One can see from the proof that the Cauchy–Schwarz inequality is a consequence of the positivity and anti-symmetry inner-product axioms.
Consider the positive matrix
Since φ is a positive linear map whose range, the complex numbers C, is a commutative C*-algebra, φ is completely positive. Therefore
is a positive 2 × 2 scalar matrix, which implies it has positive determinant:
This is precisely the Cauchy–Schwarz inequality. If f and g are elements of a C*-algebra, f* and g* denote their respective adjoints.
We can also deduce from above that every positive linear functional is bounded, corresponding to the fact that the inner product is jointly continuous.
Positive functionals are special cases of positive maps. A linear map Φ between C*-algebras is said to be a positive map if a ≥ 0 implies Φ(a) ≥ 0. It is natural to ask whether inequalities of Schwarz-type exist for positive maps. In this more general setting, usually additional assumptions are needed to obtain such results.
One such inequality is the following:
Theorem If Φ is a unital positive map, then for every normal element a in its domain, we have Φ(a*a) ≥ Φ(a*)Φ(a) and Φ(a*a) ≥ Φ(a)Φ(a*).
This extends the fact φ(a*a) · 1 ≥ φ(a)*φ(a) = |φ(a)|2, when φ is a linear functional.
The case when a is self-adjoint, i.e. a = a*, is known as Kadison's inequality.
When Φ is 2-positive, a stronger assumption than merely positive, one has something that looks very similar to the original Cauchy–Schwarz inequality:
Theorem (Modified Schwarz inequality for 2-positive maps) For a 2-positive map Φ between C*-algebras, for all a, b in its domain,
A simple argument for ii) is as follows. Consider the positive matrix
By 2-positivity of Φ,
is positive. The desired inequality then follows from the properties of positive 2 × 2 (operator) matrices.
Part i) is analogous. One can replace the matrix by