The Cauchy–Schwarz inequality (also called Cauchy–Bunyakovsky–Schwarz inequality)
is considered one of the most important and widely used
inequalities in mathematics.
The inequality for sums was published by . The corresponding inequality for integrals was published by
and . Schwarz gave the modern proof of the integral version.
Statement of the inequality
The Cauchy–Schwarz inequality states that for all vectors
and
of an
inner product space
In mathematics, an inner product space (or, rarely, a Hausdorff pre-Hilbert space) is a real vector space or a complex vector space with an operation called an inner product. The inner product of two vectors in the space is a scalar, often ...
it is true that
where
is the
inner product
In mathematics, an inner product space (or, rarely, a Hausdorff pre-Hilbert space) is a real vector space or a complex vector space with an operation called an inner product. The inner product of two vectors in the space is a scalar, often ...
. Examples of inner products include the real and complex
dot product
In mathematics, the dot product or scalar productThe term ''scalar product'' means literally "product with a scalar as a result". It is also used sometimes for other symmetric bilinear forms, for example in a pseudo-Euclidean space. is an alg ...
; see the
examples in inner product. Every inner product gives rise to a
norm, called the or
, where the norm of a vector
is denoted and defined by:
so that this norm and the inner product are related by the defining condition
where
is always a non-negative real number (even if the inner product is complex-valued).
By taking the square root of both sides of the above inequality, the Cauchy–Schwarz inequality can be written in its more familiar form:
Moreover, the two sides are equal if and only if
and
are
linearly dependent.
Special cases
Sedrakyan's lemma - Positive real numbers
Sedrakyan's inequality, also called
Bergström's inequality,
Engel's form, the T2 lemma, or
Titu
Titu () is a town in Dâmbovița County, Muntenia, Romania, with a population of 9,658 .
Location
The town in located in the southern part of the county, in the center of the Wallachian Plain. It lies at a distance of from the county seat, Tâ ...
's lemma, states that for real numbers
and positive real numbers
:
It is a direct consequence of the Cauchy–Schwarz inequality, obtained by using the
dot product
In mathematics, the dot product or scalar productThe term ''scalar product'' means literally "product with a scalar as a result". It is also used sometimes for other symmetric bilinear forms, for example in a pseudo-Euclidean space. is an alg ...
on
upon substituting
and
. This form is especially helpful when the inequality involves fractions where the numerator is a
perfect square.
R2 - The plane
The real vector space
denotes the 2-dimensional plane. It is also the 2-dimensional
Euclidean space
Euclidean space is the fundamental space of geometry, intended to represent physical space. Originally, that is, in Euclid's ''Elements'', it was the three-dimensional space of Euclidean geometry, but in modern mathematics there are Euclidea ...
where the inner product is the
dot product
In mathematics, the dot product or scalar productThe term ''scalar product'' means literally "product with a scalar as a result". It is also used sometimes for other symmetric bilinear forms, for example in a pseudo-Euclidean space. is an alg ...
.
If
and
then the Cauchy–Schwarz inequality becomes:
where
is the
angle
In Euclidean geometry, an angle is the figure formed by two rays, called the '' sides'' of the angle, sharing a common endpoint, called the ''vertex'' of the angle.
Angles formed by two rays lie in the plane that contains the rays. Angles ...
between
and
.
The form above is perhaps the easiest in which to understand the inequality, since the square of the cosine can be at most 1, which occurs when the vectors are in the same or opposite directions. It can also be restated in terms of the vector coordinates
,
,
, and
as
where equality holds if and only if the vector
is in the same or opposite direction as the vector
, or if one of them is the zero vector.
R''n'' - ''n''-dimensional Euclidean space
In
Euclidean space
Euclidean space is the fundamental space of geometry, intended to represent physical space. Originally, that is, in Euclid's ''Elements'', it was the three-dimensional space of Euclidean geometry, but in modern mathematics there are Euclidea ...
with the standard inner product, which is the
dot product
In mathematics, the dot product or scalar productThe term ''scalar product'' means literally "product with a scalar as a result". It is also used sometimes for other symmetric bilinear forms, for example in a pseudo-Euclidean space. is an alg ...
, the Cauchy–Schwarz inequality becomes:
The Cauchy–Schwarz inequality can be proved using only ideas from elementary algebra in this case.
Consider the following
quadratic polynomial in
Since it is nonnegative, it has at most one real root for
hence its
discriminant
In mathematics, the discriminant of a polynomial is a quantity that depends on the coefficients and allows deducing some properties of the roots without computing them. More precisely, it is a polynomial function of the coefficients of the orig ...
is less than or equal to zero. That is,
C''n'' - ''n''-dimensional Complex space
If
with
and
(where
and
) and if the inner product on the vector space
is the canonical complex inner product (defined by
where the bar notation is used for
complex conjugation), then the inequality may be restated more explicitly as follows:
That is,
''L''2
For the inner product space of
square-integrable complex-valued
functions, the following inequality:
The
Hölder inequality is a generalization of this.
Applications
Analysis
In any
inner product space
In mathematics, an inner product space (or, rarely, a Hausdorff pre-Hilbert space) is a real vector space or a complex vector space with an operation called an inner product. The inner product of two vectors in the space is a scalar, often ...
, the
triangle inequality is a consequence of the Cauchy–Schwarz inequality, as is now shown:
Taking square roots gives the triangle inequality:
The Cauchy–Schwarz inequality is used to prove that the inner product is a
continuous function
In mathematics, a continuous function is a function such that a continuous variation (that is a change without jump) of the argument induces a continuous variation of the value of the function. This means that there are no abrupt changes in val ...
with respect to the
topology
In mathematics, topology (from the Greek words , and ) is concerned with the properties of a geometric object that are preserved under continuous deformations, such as stretching, twisting, crumpling, and bending; that is, without closing ...
induced by the inner product itself.
Geometry
The Cauchy–Schwarz inequality allows one to extend the notion of "angle between two vectors" to any
real inner-product space by defining:
The Cauchy–Schwarz inequality proves that this definition is sensible, by showing that the right-hand side lies in the interval and justifies the notion that (real)
Hilbert space
In mathematics, Hilbert spaces (named after David Hilbert) allow generalizing the methods of linear algebra and calculus from (finite-dimensional) Euclidean vector spaces to spaces that may be infinite-dimensional. Hilbert spaces arise natural ...
s are simply generalizations of the
Euclidean space
Euclidean space is the fundamental space of geometry, intended to represent physical space. Originally, that is, in Euclid's ''Elements'', it was the three-dimensional space of Euclidean geometry, but in modern mathematics there are Euclidea ...
. It can also be used to define an angle in
complex inner-product space
In mathematics, an inner product space (or, rarely, a Hausdorff pre-Hilbert space) is a real vector space or a complex vector space with an operation called an inner product. The inner product of two vectors in the space is a scalar, often ...
s, by taking the absolute value or the real part of the right-hand side, as is done when extracting a metric from
quantum fidelity
In quantum mechanics, notably in quantum information theory, fidelity is a measure of the "closeness" of two quantum states. It expresses the probability that one state will pass a test to identify as the other. The fidelity is not a metric (mathem ...
.
Probability theory
Let
and
be
random variable
A random variable (also called random quantity, aleatory variable, or stochastic variable) is a mathematical formalization of a quantity or object which depends on random events. It is a mapping or a function from possible outcomes (e.g., the po ...
s, then the covariance inequality is given by:
After defining an inner product on the set of random variables using the expectation of their product,
the Cauchy–Schwarz inequality becomes
To prove the covariance inequality using the Cauchy–Schwarz inequality, let
and
then
where
denotes
variance
In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbe ...
and
denotes
covariance
In probability theory and statistics, covariance is a measure of the joint variability of two random variables. If the greater values of one variable mainly correspond with the greater values of the other variable, and the same holds for the le ...
.
Proofs
There are many different proofs of the Cauchy–Schwarz inequality other than those given below.
When consulting other sources, there are often two sources of confusion. First, some authors define to be linear in the
second argument rather than the first.
Second, some proofs are only valid when the field is
and not
This section gives proofs of the following theorem:
In all of the proofs given below, the proof in the trivial case where at least one of the vectors is zero (or equivalently, in the case where
) is the same. It is presented immediately below only once to reduce repetition. It also includes the easy part of the proof the
Equality Characterization given above; that is, it proves that if
and
are linearly dependent then
By definition,
and
are linearly dependent if and only if one is a scalar multiple of the other.
If
where
is some scalar then
which shows that equality holds in the .
The case where
for some scalar
is very similar, with the main difference between the complex conjugation of
If at least one of
and
is the zero vector then
and
are necessarily linearly dependent (just scalar multiply the non-zero vector by the number
to get the zero vector; for example, if
then let
so that
), which proves the converse of this characterization in this special case; that is, this shows that if at least one of
and
is
then the
Equality Characterization holds.
If
which happens if and only if
then
and
so that in particular, the Cauchy-Schwarz inequality holds because both sides of it are
The proof in the case of
is identical.
Consequently, the Cauchy-Schwarz inequality only needs to be proven only for non-zero vectors and also only the non-trivial direction of the
Equality Characterization must be shown.
Proof 1
The special case of
was proven above so it is henceforth assumed that
The Cauchy–Schwarz equality (and the rest of the theorem) is an almost immediate corollary of the following :
Equality is readily verified by elementarily expanding
(via the definition of the norm) and then simplifying:
This expansion does not require
to be non-zero; however,
must be non-zero in order to divide both sides by
and to deduce the Cauchy-Schwarz inequality from it.
Swapping
and
gives rise to: