Cauchy–Schwarz inequality explained

The Cauchy–Schwarz inequality (also called Cauchy–Bunyakovsky–Schwarz inequality)[1] [2] [3] is an upper bound on the inner product between two vectors in an inner product space in terms of the product of the vector norms. It is considered one of the most important and widely used inequalities in mathematics.[4]

Inner products of vectors can describe finite sums (via finite-dimensional vector spaces), infinite series (via vectors in sequence spaces), and integrals (via vectors in Hilbert spaces). 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

u

and

v

of an inner product space

where

\langle,\rangle

is the inner product. Examples of inner products include the real and complex dot product; see the examples in inner product. Every inner product gives rise to a Euclidean

l2

norm, called the or, where the norm of a vector

u

is denoted and defined by\|\mathbf\| := \sqrt, where

\langleu,u\rangle

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 in terms of the norm:[5] [6]

Moreover, the two sides are equal if and only if

u

and

v

are linearly dependent.[7] [8] [9]

Special cases

Sedrakyan's lemma - Positive real numbers

Sedrakyan's inequality, also known as Bergström's inequality, Engel's form, Titu's lemma (or the T2 lemma), states that for real numbers

u1,u2,...,un

and positive real numbers

v1,v2,...,vn

:\frac \leq \sum_^n \frac \quad \text \quad \frac \leq \frac + \frac + \cdots + \frac .

It is a direct consequence of the Cauchy–Schwarz inequality, obtained by using the dot product on

\Rn

upon substituting

ui'=

ui
\sqrt{vi
} and

vi'=\sqrt{vi}

. This form is especially helpful when the inequality involves fractions where the numerator is a perfect square.

- The plane

The real vector space

\R2

denotes the 2-dimensional plane. It is also the 2-dimensional Euclidean space where the inner product is the dot product. If

u=\left(u1,u2\right)

and

v=\left(v1,v2\right)

then the Cauchy–Schwarz inequality becomes:\langle \mathbf, \mathbf \rangle^2 = (\|\mathbf\| \|\mathbf\| \cos \theta)^2 \leq \|\mathbf\|^2 \|\mathbf\|^2,where

\theta

is the angle between

u

and

v

.

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

u1

,

u2

,

v1

, and

v2

as\left(u_1 v_1 + u_2 v_2\right)^2 \leq \left(u_1^2 + u_2^2\right) \left(v_1^2 + v_2^2\right),where equality holds if and only if the vector

\left(u1,u2\right)

is in the same or opposite direction as the vector

\left(v1,v2\right)

, or if one of them is the zero vector.

: n-dimensional Euclidean space

\Rn

with the standard inner product, which is the dot product, the Cauchy–Schwarz inequality becomes:\left(\sum_^n u_i v_i\right)^2 \leq \left(\sum_^n u_i^2\right) \left(\sum_^n v_i^2\right).

The Cauchy–Schwarz inequality can be proved using only elementary algebra in this case by observing that the difference of the right and the left hand side is \frac \sum_ (u_i v_j - u_j v_i)^2 \ge 0

or by considering the following quadratic polynomial in

x

\left(u_1 x + v_1\right)^2 + \cdots + \left(u_n x + v_n\right)^2 = \left(\sum_i u_i^2\right) x^2 + 2 \left(\sum_i u_i v_i\right) x + \sum_i v_i^2.

Since the latter polynomial is nonnegative, it has at most one real root, hence its discriminant is less than or equal to zero. That is,\left(\sum_i u_i v_i\right)^2 - \left(\sum_i \right) \left(\sum_i \right) \leq 0.

: n-dimensional Complex space

If

u,v\in\Complexn

with

u=\left(u1,\ldots,un\right)

and

v=\left(v1,\ldots,vn\right)

(where

u1,\ldots,un\in\Complex

and

v1,\ldots,vn\in\Complex

) and if the inner product on the vector space

\Complexn

is the canonical complex inner product (defined by

\langleu,v\rangle:=u1\overline{v1}++un\overline{vn},

where the bar notation is used for complex conjugation), then the inequality may be restated more explicitly as follows: |\langle \mathbf, \mathbf \rangle|^2 = \left|\sum_^n u_k\bar_k\right|^2 \leq \langle \mathbf, \mathbf \rangle \langle \mathbf, \mathbf \rangle = \left(\sum_^n u_k \bar_k\right) \left(\sum_^n v_k \bar_k\right) = \sum_^n \left|u_j\right|^2 \sum_^n \left|v_k\right|^2.

That is,\left|u_1 \bar_1 + \vdots + u_n \bar_n\right|^2 \leq \left(\left|u_1\right|^2 + \cdots + \left|u_n\right|^2\right) \left(\left|v_1\right|^2 + \cdots + \left|v_n\right|^2\right).

For the inner product space of square-integrable complex-valued functions, the following inequality holds.\left|\int_ f(x) \overline\,dx\right|^2 \leq \int_ |f(x)|^2\,dx \int_ |g(x)|^2 \,dx.

The Hölder inequality is a generalization of this.

Applications

Analysis

In any inner product space, the triangle inequality is a consequence of the Cauchy–Schwarz inequality, as is now shown: \begin\|\mathbf + \mathbf\|^2 &= \langle \mathbf + \mathbf, \mathbf + \mathbf \rangle && \\&= \|\mathbf\|^2 + \langle \mathbf, \mathbf \rangle + \langle \mathbf, \mathbf \rangle + \|\mathbf\|^2 ~ && ~ \text \langle \mathbf, \mathbf \rangle = \overline \\&= \|\mathbf\|^2 + 2 \operatorname \langle \mathbf, \mathbf \rangle + \|\mathbf\|^2 && \\&\leq \|\mathbf\|^2 + 2|\langle \mathbf, \mathbf \rangle| + \|\mathbf\|^2 && \\&\leq \|\mathbf\|^2 + 2\|\mathbf\|\|\mathbf\| + \|\mathbf\|^2 ~ && ~ \text\\&=(\|\mathbf\| + \|\mathbf\|)^2. && \end

Taking square roots gives the triangle inequality:\|\mathbf + \mathbf\| \leq \|\mathbf\| + \|\mathbf\|.

The Cauchy–Schwarz inequality is used to prove that the inner product is a continuous function with respect to the topology induced by the inner product itself.[10] [11]

Geometry

The Cauchy–Schwarz inequality allows one to extend the notion of "angle between two vectors" to any real inner-product space by defining:[12] [13] \cos\theta_ = \frac.

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 spaces are simply generalizations of the Euclidean space. It can also be used to define an angle in complex inner-product spaces, by taking the absolute value or the real part of the right-hand side,[14] [15] as is done when extracting a metric from quantum fidelity.

Probability theory

Let

X

and

Y

be random variables. Then the covariance inequality[16] [17] is given by:\operatorname(X) \geq \frac.

After defining an inner product on the set of random variables using the expectation of their product,\langle X, Y \rangle := \operatorname(X Y),the Cauchy–Schwarz inequality becomes|\operatorname(XY)|^2 \leq \operatorname(X^2) \operatorname(Y^2).

To prove the covariance inequality using the Cauchy–Schwarz inequality, let

\mu=\operatorname{E}(X)

and

\nu=\operatorname{E}(Y),

then\begin|\operatorname(X, Y)|^2 &= |\operatorname((X - \mu)(Y - \nu))|^2 \\&= |\langle X - \mu, Y - \nu \rangle |^2\\&\leq \langle X - \mu, X - \mu \rangle \langle Y - \nu, Y - \nu \rangle \\& = \operatorname\left((X - \mu)^2\right) \operatorname\left((Y - \nu)^2\right) \\& = \operatorname(X) \operatorname(Y),\endwhere

\operatorname{Var}

denotes variance and

\operatorname{Cov}

denotes covariance.

Proofs

There are many different proofs[18] 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

R

and not

C.

[19]

This section gives two proofs of the following theorem:

In both 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

\|u\|\|v\|=0

) is the same. It is presented immediately below only once to reduce repetition. It also includes the easy part of the proof of the Equality Characterization given above; that is, it proves that if

u

and

v

are linearly dependent then

\left|\langleu,v\rangle\right|=\|u\|\|v\|.

By definition,

u

and

v

are linearly dependent if and only if one is a scalar multiple of the other. If

u=cv

where

c

is some scalar then |\langle \mathbf, \mathbf \rangle| = |\langle c \mathbf, \mathbf \rangle| = |c \langle \mathbf, \mathbf \rangle| = |c|\|\mathbf\| \|\mathbf\|=\|c \mathbf\| \|\mathbf\|=\|\mathbf\| \|\mathbf\|

which shows that equality holds in the . The case where

v=cu

for some scalar

c

follows from the previous case:|\langle \mathbf, \mathbf \rangle| = |\langle \mathbf, \mathbf \rangle|=\|\mathbf\| \|\mathbf\|.

In particular, if at least one of

u

and

v

is the zero vector then

u

and

v

are necessarily linearly dependent (for example, if

u=0

then

u=cv

where

c=0

), so the above computation shows that the Cauchy-Schwarz inequality holds in this case.

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 via the Pythagorean theorem

The special case of

v=0

was proven above so it is henceforth assumed that

v0.

Let\mathbf := \mathbf - \frac \mathbf.

It follows from the linearity of the inner product in its first argument that:\langle \mathbf, \mathbf \rangle = \left\langle \mathbf - \frac \mathbf, \mathbf \right\rangle = \langle \mathbf, \mathbf \rangle - \frac \langle \mathbf, \mathbf \rangle = 0.

Therefore,

z

is a vector orthogonal to the vector

v

(Indeed,

z

is the projection of

u

onto the plane orthogonal to

v.

) We can thus apply the Pythagorean theorem to\mathbf= \frac \mathbf + \mathbfwhich gives\|\mathbf\|^2 = \left|\frac\right|^2 \|\mathbf\|^2 + \|\mathbf\|^2 = \frac
^2
\,\|\mathbf\|^2 + \|\mathbf\|^2 = \frac
^2
+ \|\mathbf\|^2 \geq \frac
^2
.

The Cauchy–Schwarz inequality follows by multiplying by

\|v\|2

and then taking the square root. Moreover, if the relation

\geq

in the above expression is actually an equality, then

\|z\|2=0

and hence

z=0;

the definition of

z

then establishes a relation of linear dependence between

u

and

v.

The converse was proved at the beginning of this section, so the proof is complete.

\blacksquare

Proof by analyzing a quadratic

Consider an arbitrary pair of vectors

u,v

. Define the function

p:\R\to\R

defined by

p(t)=\langlet\alphau+v,t\alphau+v\rangle

, where

\alpha

is a complex number satisfying

|\alpha|=1

and

\alpha\langleu,v\rangle=|\langleu,v\rangle|

.Such an

\alpha

exists since if

\langleu,v\rangle=0

then

\alpha

can be taken to be 1.

Since the inner product is positive-definite,

p(t)

only takes non-negative real values. On the other hand,

p(t)

can be expanded using the bilinearity of the inner product:\beginp(t)&= \langle t\alpha\mathbf, t\alpha\mathbf\rangle + \langle t\alpha\mathbf, \mathbf\rangle + \langle\mathbf, t\alpha\mathbf\rangle + \langle\mathbf, \mathbf\rangle \\&= t\alpha t\overline\langle\mathbf, \mathbf\rangle + t\alpha\langle\mathbf, \mathbf\rangle + t\overline\langle \mathbf, \mathbf\rangle + \langle\mathbf, \mathbf\rangle \\&= \lVert \mathbf \rVert^2 t^2 + 2|\langle\mathbf, \mathbf\rangle|t + \lVert \mathbf \rVert^2\endThus,

p

is a polynomial of degree

2

(unless

u=0,

which is a case that was checked earlier). Since the sign of

p

does not change, the discriminant of this polynomial must be non-positive:\Delta = 4 \left(|\langle \mathbf, \mathbf \rangle|^2 - \Vert \mathbf \Vert^2 \Vert \mathbf \Vert^2\right) \leqslant 0.The conclusion follows.[20]

For the equality case, notice that

\Delta=0

happens if and only if

p(t)=(t\Vertu\Vert+\Vertv\Vert)2.

If

t0=-\Vertv\Vert/\Vertu\Vert,

then

p(t0)=\langlet0\alphau+v,t0\alphau+v\rangle=0,

and hence

v=-t0\alphau.

Generalizations

Various generalizations of the Cauchy–Schwarz inequality exist. Hölder's inequality generalizes it to

Lp

norms. More generally, it can be interpreted as a special case of the definition of the norm of a linear operator on a Banach space (Namely, when the space is a Hilbert space). Further generalizations are in the context of operator theory, e.g. for operator-convex functions and operator algebras, where the domain and/or range are replaced by a C*-algebra or W*-algebra.

An inner product can be used to define a positive linear functional. For example, given a Hilbert space

L2(m),m

being a finite measure, the standard inner product gives rise to a positive functional

\varphi

by

\varphi(g)=\langleg,1\rangle.

Conversely, every positive linear functional

\varphi

on

L2(m)

can be used to define an inner product

\langlef,g\rangle\varphi:=\varphi\left(g*f\right),

where

g*

is the pointwise complex conjugate of

g.

In this language, the Cauchy–Schwarz inequality becomes[21] \left|\varphi\left(g^* f\right)\right|^2 \leq \varphi\left(f^* f\right) \varphi\left(g^* g\right),

which extends verbatim to positive functionals on C*-algebras:

The next two theorems are further examples in operator algebra.

This extends the fact

\varphi\left(a*a\right)1\geq\varphi(a)*\varphi(a)=|\varphi(a)|2,

when

\varphi

is a linear functional. The case when

a

is self-adjoint, that is,

a=a*,

is sometimes known as Kadison's inequality.

Another generalization is a refinement obtained by interpolating between both sides of the Cauchy–Schwarz inequality:

This theorem can be deduced from Hölder's inequality.[22] There are also non-commutative versions for operators and tensor products of matrices.[23]

Several matrix versions of the Cauchy–Schwarz inequality and Kantorovich inequality are applied to linear regression models.[24] [25]

References

External links

Notes and References

  1. Web site: Hermann Amandus Schwarz. J.J.. O'Connor. E.F.. Robertson. University of St Andrews, Scotland .
  2. Web site: Cauchy-Bunyakovsky-Schwarz inequality. Branko. Ćurgus. Western Washington University. Department of Mathematics .
  3. Web site: Cauchy's inequality. https://ghostarchive.org/archive/20221009/https://mathcs.clarku.edu/~djoyce/ma130/cauchy.pdf . 2022-10-09 . live. David E.. Joyce. Clark University. Department of Mathematics and Computer Science .
  4. Book: Steele, J. Michael. 2004. The Cauchy–Schwarz Master Class: an Introduction to the Art of Mathematical Inequalities. The Mathematical Association of America. 978-0521546775. 1. ...there is no doubt that this is one of the most widely used and most important inequalities in all of mathematics..
  5. Book: Strang, Gilbert. 19 July 2005. Linear Algebra and its Applications. 4th. 3.2. Cengage Learning. Stamford, CT. 978-0030105678. 154–155.
  6. Book: Hunter. John K.. Nachtergaele. Bruno. 2001. Applied Analysis. World Scientific. 981-02-4191-7.
  7. Book: Bachmann. George. Narici. Lawrence. Beckenstein. Edward. 2012-12-06. Fourier and Wavelet Analysis. Springer Science & Business Media. 9781461205050. 14.
  8. Book: Hassani, Sadri. 1999. Mathematical Physics: A Modern Introduction to Its Foundations. Springer. 0-387-98579-4. 29. Equality holds iff =0 or c>=0. From the definition of c>, we conclude that a> and b> must be proportional..
  9. Book: Axler. Sheldon. 2015. Linear Algebra Done Right, 3rd Ed.. Springer International Publishing. 978-3-319-11079-0. 172. This inequality is an equality if and only if one of u, v is a scalar multiple of the other..
  10. Book: Bachman. George. Narici. Lawrence. 2012-09-26. Functional Analysis. Courier Corporation. 9780486136554. 141.
  11. Book: Swartz, Charles. 1994-02-21. Measure, Integration and Function Spaces. World Scientific. 9789814502511. 236.
  12. Book: Ricardo, Henry. 2009-10-21. A Modern Introduction to Linear Algebra. CRC Press. 9781439894613. 18.
  13. Book: Banerjee. Sudipto. Roy. Anindya. 2014-06-06. Linear Algebra and Matrix Analysis for Statistics. CRC Press. 9781482248241. 181.
  14. Book: Valenza, Robert J.. 2012-12-06. Linear Algebra: An Introduction to Abstract Mathematics. Springer Science & Business Media. 9781461209010. 146.
  15. Book: Constantin, Adrian. 2016-05-21. Fourier Analysis with Applications. Cambridge University Press. 9781107044104. 74.
  16. Book: Mukhopadhyay, Nitis. 2000-03-22. Probability and Statistical Inference. CRC Press. 9780824703790. 150.
  17. Book: Keener, Robert W.. 2010-09-08. Theoretical Statistics: Topics for a Core Course. Springer Science & Business Media. 9780387938394. 71.
  18. Wu. Hui-Hua. Wu. Shanhe. April 2009. Various proofs of the Cauchy-Schwarz inequality. Octogon Mathematical Magazine. 1222-5657. 978-973-88255-5-0. 17. 1. 221–229. https://ghostarchive.org/archive/20221009/http://www.uni-miskolc.hu/~matsefi/Octogon/volumes/volume1/article1_19.pdf . 2022-10-09 . live. 18 May 2016.
  19. Book: Aliprantis. Charalambos D.. Border. Kim C.. 2007-05-02. Infinite Dimensional Analysis: A Hitchhiker's Guide. Springer Science & Business Media. 9783540326960.
  20. Book: Rudin, Walter. Real and Complex Analysis. McGraw-Hill. 1987. 0070542341. 3rd. New York. 1966.
  21. Book: Faria. Edson de. Melo. Welington de. 2010-08-12. Mathematical Aspects of Quantum Field Theory. Cambridge University Press. 9781139489805. 273.
  22. Book: Callebaut's inequality. Entry in the AoPS Wiki.
  23. Moslehian. M.S.. Matharu. J.S.. Aujla. J.S.. 2011. Non-commutative Callebaut inequality. Linear Algebra and Its Applications. 436. 9. 3347–3353. 10.1016/j.laa.2011.11.024. 1112.3003. 119592971.
  24. Liu, Shuangzhe. Neudecker, Heinz . 1999. A survey of Cauchy-Schwarz and Kantorovich-type matrix inequalities. Statistical Papers . 40 . 55–73 . 10.1007/BF02927110 . 122719088 .
  25. Liu. Shuangzhe. Trenkler. Götz. Kollo. Tõnu. von Rosen. Dietrich. Baksalary. Oskar Maria. 2023. Professor Heinz Neudecker and matrix differential calculus. Statistical Papers. 65 . 4 . 2605–2639 . en. 10.1007/s00362-023-01499-w. 263661094 .