# Cauchy–Schwarz inequality

(Redirected from Cauchy-Schwarz inequality)

In mathematics, the Cauchy–Schwarz inequality, also known as the Cauchy–Bunyakovsky–Schwarz inequality, is a useful inequality in many mathematical fields, such as linear algebra, analysis, probability theory, vector algebra and other areas. It is considered to be one of the most important inequalities in all of mathematics.[1]

The inequality for sums was published by Augustin-Louis Cauchy (1821), while the corresponding inequality for integrals was first proved by Viktor Bunyakovsky (1859). The modern proof of the integral version was given by Hermann Schwarz (1888).[1]

## Statement of the inequality

The Cauchy–Schwarz inequality states that for all vectors ${\displaystyle u}$ and ${\displaystyle v}$ of an inner product space it is true that

${\displaystyle \left|\left\langle \mathbf {u} ,\mathbf {v} \right\rangle \right|^{2}\leq \langle \mathbf {u} ,\mathbf {u} \rangle \cdot \langle \mathbf {v} ,\mathbf {v} \rangle ,}$

(Cauchy-Schwarz inequality [written using only the inner product])

where ${\displaystyle \langle \cdot ,\cdot \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 norm, called the canonical or induced norm, where the norm of a vector ${\displaystyle \mathbf {u} }$ is denoted and defined by:

${\displaystyle \left\|\mathbf {u} \right\|:={\sqrt {\left\langle \mathbf {u} ,\mathbf {u} \right\rangle }}}$

so that this norm and the inner product are related by the defining condition ${\displaystyle \left\|\mathbf {u} \right\|^{2}=\left\langle \mathbf {u} ,\mathbf {u} \right\rangle ,}$ where ${\displaystyle \left\langle \mathbf {u} ,\mathbf {u} \right\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:[2][3]

${\displaystyle |\langle \mathbf {u} ,\mathbf {v} \rangle |\leq \|\mathbf {u} \|\|\mathbf {v} \|.}$

(Cauchy-Schwarz inequality [written using norm and inner product])

Moreover, the two sides are equal if and only if ${\displaystyle \mathbf {u} }$ and ${\displaystyle \mathbf {v} }$ are linearly dependent.[4][5]

## Special cases

### Titu's lemma - Positive real numbers

Titu's lemma (named after Titu Andreescu, also known as T2 lemma, Engel's form, or Sedrakyan's inequality) states that for positive reals, one has

${\displaystyle {\frac {\left(\sum _{i=1}^{n}u_{i}\right)^{2}}{\sum _{i=1}^{n}v_{i}}}\leq \sum _{i=1}^{n}{\frac {u_{i}^{2}}{v_{i}}}.}$

It is a direct consequence of the Cauchy–Schwarz inequality, obtained upon substituting ${\displaystyle u_{i}'={\frac {u_{i}}{\sqrt {v_{i}}}}}$ and ${\displaystyle v_{i}'={\sqrt {v_{i}}}.}$ This form is especially helpful when the inequality involves fractions where the numerator is a perfect square.

### ℝ2 - The plane

Cauchy-Schwarz inequality in a unit circle of the Euclidean plane

The real vector space ${\displaystyle \mathbb {R} ^{2}}$ denotes the 2-dimensional plane. It is also the 2-dimensional Euclidean space where the inner product is the dot product. If ${\displaystyle \mathbf {v} =\left(v_{1},v_{2}\right)}$ and ${\displaystyle \mathbf {u} =\left(u_{1},u_{2}\right)}$ then the Cauchy–Schwarz inequality becomes:

${\displaystyle \langle \mathbf {u} ,\mathbf {v} \rangle ^{2}=(\|\mathbf {u} \|\|\mathbf {v} \|\cos \theta )^{2}\leq \|\mathbf {u} \|^{2}\|\mathbf {v} \|^{2},}$

where ${\displaystyle \theta }$ is the angle between ${\displaystyle u}$ and ${\displaystyle 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 ${\displaystyle v_{1},v_{2},u_{1}}$ and ${\displaystyle u_{2}}$ as

${\displaystyle \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 ${\displaystyle (u_{1},u_{2})}$ is in the same or opposite direction as the vector ${\displaystyle \left(v_{1},v_{2}\right)}$, or if one of them is the zero vector.

### ℝn - n-dimensional Euclidean space

In Euclidean space ${\displaystyle \mathbb {R} ^{n}}$ with the standard inner product, which is the dot product, the Cauchy–Schwarz inequality becomes:

${\displaystyle \left(\sum _{i=1}^{n}u_{i}v_{i}\right)^{2}\leq \left(\sum _{i=1}^{n}u_{i}^{2}\right)\left(\sum _{i=1}^{n}v_{i}^{2}\right)}$

The Cauchy–Schwarz inequality can be proved using only ideas from elementary algebra in this case. Consider the following quadratic polynomial in ${\displaystyle x}$

${\displaystyle 0\leq \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 it is nonnegative, it has at most one real root for ${\displaystyle x,}$ hence its discriminant is less than or equal to zero. That is,

${\displaystyle \left(\sum _{i}u_{i}v_{i}\right)^{2}-\left(\sum _{i}{u_{i}^{2}}\right)\left(\sum _{i}{v_{i}^{2}}\right)\leq 0,}$

which yields the Cauchy–Schwarz inequality.

### ℂn - n-dimensional Complex space

If ${\displaystyle \mathbf {u} ,\mathbf {v} \in \mathbb {C} ^{n}}$ with ${\displaystyle \mathbf {u} =\left(u_{1},\ldots ,u_{n}\right)}$ and ${\displaystyle \mathbf {v} =\left(v_{1},\ldots ,v_{n}\right)}$ (where ${\displaystyle u_{1},\ldots ,u_{n}\in \mathbb {C} }$ and ${\displaystyle v_{1},\ldots ,v_{n}\in \mathbb {C} }$) and if the inner product on the vector space ${\displaystyle \mathbb {C} ^{n}}$ is the canonical complex inner product (defined by ${\displaystyle \langle \mathbf {u} ,\mathbf {v} \rangle :=u_{1}{\overline {v_{1}}}+\cdots +u_{n}{\overline {v_{n}}}}$), then the inequality may be restated more explicitly as follows (where the bar notation is used for complex conjugation):

${\displaystyle \left|\langle \mathbf {u} ,\mathbf {v} \rangle \right|^{2}=\left|\sum _{k=1}^{n}u_{k}{\bar {v}}_{k}\right|^{2}\leq \langle \mathbf {u} ,\mathbf {u} \rangle \langle \mathbf {v} ,\mathbf {v} \rangle =\left(\sum _{k=1}^{n}u_{k}{\bar {u}}_{k}\right)\left(\sum _{k=1}^{n}v_{k}{\bar {v}}_{k}\right)=\sum _{j=1}^{n}\left|u_{j}\right|^{2}\sum _{k=1}^{n}\left|v_{k}\right|^{2}.}$

That is,

${\displaystyle \left|u_{1}{\bar {v}}_{1}+\cdots +u_{n}{\bar {v}}_{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).}$

### L2

For the inner product space of square-integrable complex-valued functions, the following inequality:

${\displaystyle \left|\int _{\mathbb {R} ^{n}}f(x){\overline {g(x)}}\,dx\right|^{2}\leq \int _{\mathbb {R} ^{n}}|f(x)|^{2}\,dx\int _{\mathbb {R} ^{n}}|g(x)|^{2}\,dx.}$

The Hölder inequality is a generalization of this.

## Proofs

There are many different proofs[6] of the Cauchy–Schwarz inequality other than those given below.[1][3] 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 ${\displaystyle \mathbb {R} }$ and not ${\displaystyle \mathbb {C} .}$[7]

This section gives proofs of the following theorem:

Cauchy-Schwarz inequality — Let ${\displaystyle \mathbf {u} }$ and ${\displaystyle \mathbf {v} }$ be arbitrary vectors in an inner product space over the scalar field ${\displaystyle \mathbb {F} ,}$ where ${\displaystyle \mathbb {F} }$ is the field of real numbers ${\displaystyle \mathbb {R} }$ or complex numbers ${\displaystyle \mathbb {C} .}$ Then

${\displaystyle {\big |}\langle \mathbf {u} ,\mathbf {v} \rangle {\big |}\leq \|\mathbf {u} \|\|\mathbf {v} \|}$

(Cauchy-Schwarz Inequality)

where in addition, equality holds in the Cauchy-Schwarz Inequality if and only if ${\displaystyle \mathbf {u} }$ and ${\displaystyle \mathbf {v} }$ are linearly dependent; explicitly, this means:

${\displaystyle {\big |}\langle \mathbf {u} ,\mathbf {v} \rangle {\big |}=\|\mathbf {u} \|\|\mathbf {v} \|}$ if and only if one of ${\displaystyle \mathbf {u} }$ and ${\displaystyle \mathbf {v} }$ is a scalar multiple of the other.

(Characterization of Equality in Cauchy-Schwarz)

Moreover, if this equality holds and if ${\displaystyle \mathbf {v} \neq \mathbf {0} }$ then ${\displaystyle \mathbf {u} ={\frac {\langle \mathbf {u} ,\mathbf {v} \rangle }{\|\mathbf {v} \|^{2}}}\mathbf {v} .}$

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 ${\displaystyle \|\mathbf {u} \|\|\mathbf {v} \|=0}$) is the same. It is presented immediately below only once to reduce repetition. It also includes the easy part of the proof the above Equality Characterization; that is, it proves that if ${\displaystyle \mathbf {u} }$ and ${\displaystyle \mathbf {v} }$ are linearly dependent then ${\displaystyle {\big |}\langle \mathbf {u} ,\mathbf {v} \rangle {\big |}=\|\mathbf {u} \|\|\mathbf {v} \|.}$

Proof of the trivial parts: Case where a vector is ${\displaystyle \mathbf {0} }$ and also one direction of the Equality Characterization

By definition, ${\displaystyle \mathbf {u} }$ and ${\displaystyle \mathbf {v} }$ are linearly dependent if and only if one is a scalar multiple of the other. If ${\displaystyle \mathbf {u} =c\mathbf {v} }$ where ${\displaystyle c}$ is some scalar then

${\displaystyle {\big |}\langle \mathbf {u} ,\mathbf {v} \rangle {\big |}={\big |}\langle c\mathbf {v} ,\mathbf {v} \rangle {\big |}={\big |}c\langle \mathbf {v} ,\mathbf {v} \rangle {\big |}={\big |}c{\big |}\|\mathbf {v} \|\|\mathbf {v} \|=\|c\mathbf {v} \|\|\mathbf {v} \|=\|\mathbf {u} \|\|\mathbf {v} \|}$

which shows that equality holds in the Cauchy-Schwarz Inequality. The case where ${\displaystyle \mathbf {v} =c\mathbf {u} }$ for some scalar ${\displaystyle c}$ is very similar, with the main difference between the complex conjugation of ${\displaystyle c}$:

${\displaystyle {\big |}\langle \mathbf {u} ,\mathbf {v} \rangle {\big |}={\big |}\langle \mathbf {u} ,c\mathbf {u} \rangle {\big |}={\big |}{\overline {c}}\langle \mathbf {u} ,\mathbf {u} \rangle {\big |}={\big |}{\overline {c}}{\big |}\|\mathbf {u} \|\|\mathbf {u} \|={\big |}c{\big |}\|\mathbf {u} \|\|\mathbf {u} \|=\|\mathbf {u} \|\|c\mathbf {u} \|=\|\mathbf {u} \|\|\mathbf {v} \|.}$

If at least one of ${\displaystyle \mathbf {u} }$ and ${\displaystyle \mathbf {v} }$ is the zero vector then ${\displaystyle \mathbf {u} }$ and ${\displaystyle \mathbf {v} }$ are necessarily linearly dependent (just scalar multiply the non-zero vector by the number ${\displaystyle 0}$ to get the zero vector; e.g. if ${\displaystyle \mathbf {u} =\mathbf {0} }$ then let ${\displaystyle c=0}$ so that ${\displaystyle \mathbf {u} =c\mathbf {v} }$), which proves the converse of this characterization in this special case; that is, this shows that if at least one of ${\displaystyle \mathbf {u} }$ and ${\displaystyle \mathbf {v} }$ is ${\displaystyle \mathbf {0} }$ then the Equality Characterization holds.

If ${\displaystyle \mathbf {u} =\mathbf {0} ,}$ which happens if and only if ${\displaystyle \|\mathbf {u} \|=0,}$ then ${\displaystyle \|\mathbf {u} \|\|\mathbf {v} \|=0}$ and ${\displaystyle {\big |}\langle \mathbf {u} ,\mathbf {v} \rangle {\big |}={\big |}\langle \mathbf {0} ,\mathbf {v} \rangle {\big |}={\big |}0{\big |}=0}$ so that in particular, the Cauchy-Schwarz inequality holds because both sides of it are ${\displaystyle 0.}$ The proof in the case of ${\displaystyle \mathbf {v} =\mathbf {0} }$ 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 ${\displaystyle \mathbf {v} =\mathbf {0} }$ was proven above so it is henceforth assumed that ${\displaystyle \mathbf {v} \neq \mathbf {0} .}$ As is now shown, the Cauchy–Schwarz inequality (and the rest of the theorem) is an almost immediate corrollary of the following equality:

${\displaystyle {\frac {1}{\|\mathbf {v} \|^{2}}}\left\|\|\mathbf {v} \|^{2}\mathbf {u} -\langle \mathbf {u} ,\mathbf {v} \rangle \mathbf {v} \right\|^{2}=\|\mathbf {u} \|^{2}\|\mathbf {v} \|^{2}-\left|\langle \mathbf {u} ,\mathbf {v} \rangle \right|^{2}}$[8]

(Eq. 1)

which is readily verified by elementarily expanding ${\displaystyle \left\|\|\mathbf {v} \|^{2}\mathbf {u} -\langle \mathbf {u} ,\mathbf {v} \rangle \mathbf {v} \right\|^{2}}$ (via the definition of the norm) and then simplifying.

Observing that the left hand side (LHS) of Eq. 1 is non-negative (which makes this also true of the right hand side (RHS)) proves that ${\displaystyle \left|\langle \mathbf {u} ,\mathbf {v} \rangle \right|^{2}\leq \|\mathbf {u} \|^{2}\|\mathbf {v} \|^{2},}$ from which the Cauchy-Schwarz Inequality follows (by taking the square root of both sides). If ${\displaystyle \left|\langle \mathbf {u} ,\mathbf {v} \rangle \right|=\|\mathbf {u} \|\|\mathbf {v} \|}$ then the RHS (and thus also the LHS) of Eq. 1 is ${\displaystyle 0,}$ which is only possible if ${\displaystyle \|\mathbf {v} \|^{2}\mathbf {u} -\langle \mathbf {u} ,\mathbf {v} \rangle \mathbf {v} =\mathbf {0} }$;[note 1] thus ${\displaystyle \mathbf {u} ={\frac {\langle \mathbf {u} ,\mathbf {v} \rangle }{\|\mathbf {v} \|^{2}}}\mathbf {v} ,}$ which shows that ${\displaystyle \mathbf {u} }$ and ${\displaystyle \mathbf {v} }$ are linearly dependent.[8] Since the (trivial) converse was proved above, the proof of the theorem is complete. ⯀

Details of ${\displaystyle \left\|\|\mathbf {v} \|^{2}\mathbf {u} -\langle \mathbf {u} ,\mathbf {v} \rangle \mathbf {v} \right\|^{2}}$'s elementary expansion are now given for the interested reader. Let ${\displaystyle V=\|\mathbf {v} \|^{2}}$ and ${\displaystyle c=\langle \mathbf {u} ,\mathbf {v} \rangle }$ so that ${\displaystyle {\overline {c}}c=\left|c\right|^{2}=\left|\langle \mathbf {u} ,\mathbf {v} \rangle \right|^{2}}$ and ${\displaystyle {\overline {c}}={\overline {\langle \mathbf {u} ,\mathbf {v} \rangle }}=\langle \mathbf {v} ,\mathbf {u} \rangle .}$ Then

{\displaystyle {\begin{alignedat}{4}\left\|\|\mathbf {v} \|^{2}\mathbf {u} -\langle \mathbf {u} ,\mathbf {v} \rangle \mathbf {v} \right\|^{2}&=\left\|V\mathbf {u} -c\mathbf {v} \right\|^{2}=\left\langle V\mathbf {u} -c\mathbf {v} ,V\mathbf {u} -c\mathbf {v} \right\rangle &&~{\text{ By definition of the norm }}\\&=\left\langle V\mathbf {u} ,V\mathbf {u} \right\rangle -\left\langle V\mathbf {u} ,c\mathbf {v} \right\rangle -\left\langle c\mathbf {v} ,V\mathbf {u} \right\rangle +\left\langle c\mathbf {v} ,c\mathbf {v} \right\rangle &&~{\text{ Expand }}\\&=V^{2}\left\langle \mathbf {u} ,\mathbf {u} \right\rangle -V{\overline {c}}\left\langle \mathbf {u} ,\mathbf {v} \right\rangle -cV\left\langle \mathbf {v} ,\mathbf {u} \right\rangle +c{\overline {c}}\left\langle \mathbf {v} ,\mathbf {v} \right\rangle &&~{\text{ Pull out scalars (note that }}V{\text{ is real) }}\\&=V^{2}\|\mathbf {u} \|^{2}~~-V{\overline {c}}c~~~~~~~~~-cV{\overline {c}}~~~~~~~~~+c{\overline {c}}V&&~{\text{ Use definitions of }}c{\text{ and }}V\\&=V^{2}\|\mathbf {u} \|^{2}~~-V{\overline {c}}c~=~V\left[V\|\mathbf {u} \|^{2}-{\overline {c}}c\right]&&~{\text{ Simplify }}\\&=\|\mathbf {v} \|^{2}\left[\|\mathbf {u} \|^{2}\|\mathbf {v} \|^{2}-\left|\langle \mathbf {u} ,\mathbf {v} \rangle \right|^{2}\right]&&~{\text{ Rewrite in terms of }}\mathbf {u} {\text{ and }}\mathbf {v} .\\\end{alignedat}}}

Note that this expansion does not require ${\displaystyle \mathbf {v} }$ to be non-zero; however, ${\displaystyle \mathbf {v} }$ must be non-zero in order to divide both sides by ${\displaystyle \|\mathbf {v} \|^{2}}$ and to deduce the Cauchy-Schwarz inequality from it. Swapping ${\displaystyle \mathbf {u} }$ and ${\displaystyle \mathbf {v} }$ gives rise to:

${\displaystyle \left\|\|\mathbf {u} \|^{2}\mathbf {v} -{\overline {\langle \mathbf {u} ,\mathbf {v} \rangle }}\mathbf {u} \right\|^{2}=\|\mathbf {u} \|^{2}\left[\|\mathbf {u} \|^{2}\|\mathbf {v} \|^{2}-\left|\langle \mathbf {u} ,\mathbf {v} \rangle \right|^{2}\right]}$

and thus

{\displaystyle {\begin{alignedat}{4}\|\mathbf {u} \|^{2}\|\mathbf {v} \|^{2}\left[\|\mathbf {u} \|^{2}\|\mathbf {v} \|^{2}-\left|\langle \mathbf {u} ,\mathbf {v} \rangle \right|^{2}\right]&=\|\mathbf {u} \|^{2}\left\|\|\mathbf {v} \|^{2}\mathbf {u} -\langle \mathbf {u} ,\mathbf {v} \rangle \mathbf {v} \right\|^{2}\\&=\|\mathbf {v} \|^{2}\left\|\|\mathbf {u} \|^{2}\mathbf {v} -{\overline {\langle \mathbf {u} ,\mathbf {v} \rangle }}\mathbf {u} \right\|^{2}.\\\end{alignedat}}}
Proof 2 —

The special case of ${\displaystyle \mathbf {v} =\mathbf {0} }$ was proven above so it is henceforth assumed that ${\displaystyle \mathbf {v} \neq \mathbf {0} .}$ Let

${\displaystyle \mathbf {z} :=\mathbf {u} -{\frac {\langle \mathbf {u} ,\mathbf {v} \rangle }{\langle \mathbf {v} ,\mathbf {v} \rangle }}\mathbf {v} .}$

It follows from the linearity of the inner product in its first argument that:

${\displaystyle \langle \mathbf {z} ,\mathbf {v} \rangle =\left\langle \mathbf {u} -{\frac {\langle \mathbf {u} ,\mathbf {v} \rangle }{\langle \mathbf {v} ,\mathbf {v} \rangle }}\mathbf {v} ,\mathbf {v} \right\rangle =\langle \mathbf {u} ,\mathbf {v} \rangle -{\frac {\langle \mathbf {u} ,\mathbf {v} \rangle }{\langle \mathbf {v} ,\mathbf {v} \rangle }}\langle \mathbf {v} ,\mathbf {v} \rangle =0.}$

Therefore, ${\displaystyle \mathbf {z} }$ is a vector orthogonal to the vector ${\displaystyle \mathbf {v} }$ (Indeed, ${\displaystyle \mathbf {z} }$ is the projection of ${\displaystyle \mathbf {u} }$ onto the plane orthogonal to ${\displaystyle \mathbf {v} .}$) We can thus apply the Pythagorean theorem to

${\displaystyle \mathbf {u} ={\frac {\langle \mathbf {u} ,\mathbf {v} \rangle }{\langle \mathbf {v} ,\mathbf {v} \rangle }}\mathbf {v} +\mathbf {z} }$

which gives

${\displaystyle \|\mathbf {u} \|^{2}=\left|{\frac {\langle \mathbf {u} ,\mathbf {v} \rangle }{\langle \mathbf {v} ,\mathbf {v} \rangle }}\right|^{2}\|\mathbf {v} \|^{2}+\|\mathbf {z} \|^{2}={\frac {|\langle \mathbf {u} ,\mathbf {v} \rangle |^{2}}{(\|\mathbf {v} \|^{2})^{2}}}\,\|\mathbf {v} \|^{2}+\|\mathbf {z} \|^{2}={\frac {|\langle \mathbf {u} ,\mathbf {v} \rangle |^{2}}{\|\mathbf {v} \|^{2}}}+\|\mathbf {z} \|^{2}\geq {\frac {|\langle \mathbf {u} ,\mathbf {v} \rangle |^{2}}{\|\mathbf {v} \|^{2}}}.}$

The Cauchy–Schwarz inequality follows by multiplying by ${\displaystyle \|\mathbf {v} \|^{2}}$ and then taking the square root. Moreover, if the relation ${\displaystyle \geq }$ in the above expression is actually an equality, then ${\displaystyle \|\mathbf {z} \|^{2}=0}$ and hence ${\displaystyle \mathbf {z} =\mathbf {0} }$; the definition of ${\displaystyle \mathbf {z} }$ then establishes a relation of linear dependence between ${\displaystyle \mathbf {u} }$ and ${\displaystyle \mathbf {v} .}$ The converse was proved at the beginning of this section, so the proof is complete. ⯀

Proof 3 —

The special case of ${\displaystyle \mathbf {v} =\mathbf {0} }$ was proven above so it is henceforth assumed that ${\displaystyle \mathbf {v} \neq \mathbf {0} .}$ Let ${\displaystyle \lambda \in \mathbb {C} }$ be defined by

${\displaystyle \lambda =\langle \mathbf {u} ,\mathbf {v} \rangle /\|\mathbf {v} \|^{2}.}$

Then

{\displaystyle {\begin{aligned}0&\leq \|\mathbf {u} -\lambda \mathbf {v} \|^{2}\\&=\langle \mathbf {u} ,\mathbf {u} \rangle -\langle \lambda \mathbf {v} ,\mathbf {u} \rangle -\langle \mathbf {u} ,\lambda \mathbf {v} \rangle +\langle \lambda \mathbf {v} ,\lambda \mathbf {v} \rangle \\&=\langle \mathbf {u} ,\mathbf {u} \rangle -\lambda \langle \mathbf {v} ,\mathbf {u} \rangle -{\overline {\lambda }}\langle \mathbf {u} ,\mathbf {v} \rangle +\lambda {\overline {\lambda }}\langle \mathbf {v} ,\mathbf {v} \rangle \\&=\|\mathbf {u} \|^{2}-\lambda {\overline {\langle \mathbf {u} ,\mathbf {v} \rangle }}-{\overline {\lambda }}\langle \mathbf {u} ,\mathbf {v} \rangle +\lambda {\overline {\lambda }}\|\mathbf {v} \|^{2}\\&=\|\mathbf {u} \|^{2}-{\frac {|\langle \mathbf {u} ,\mathbf {v} \rangle |^{2}}{\|\mathbf {v} \|^{2}}}-{\frac {|\langle \mathbf {u} ,\mathbf {v} \rangle |^{2}}{\|\mathbf {v} \|^{2}}}+{\frac {|\langle \mathbf {u} ,\mathbf {v} \rangle |^{2}}{\|\mathbf {v} \|^{2}}}\\&=\|\mathbf {u} \|^{2}-{\frac {|\langle \mathbf {u} ,\mathbf {v} \rangle |^{2}}{\|\mathbf {v} \|^{2}}}.\end{aligned}}}

Therefore, ${\displaystyle 0\leq \|\mathbf {u} \|^{2}-{\frac {|\langle \mathbf {u} ,\mathbf {v} \rangle |^{2}}{\|\mathbf {v} \|^{2}}},}$ or ${\displaystyle |\langle \mathbf {u} ,\mathbf {v} \rangle |\leq \|\mathbf {u} \|\|\mathbf {v} \|.}$

If the inequality holds as an equality, then ${\displaystyle \|\mathbf {u} -\lambda \mathbf {v} \|=0,}$ and so ${\displaystyle \mathbf {u} -\lambda \mathbf {v} =\mathbf {0} ,}$ thus ${\displaystyle \mathbf {u} }$ and ${\displaystyle \mathbf {v} }$ are linearly dependent. The converse was proved at the beginning of this section, so the proof is complete. ⯀

Proof 4 —

A well-known way to write Cauchy-Schwarz is, for ${\displaystyle a_{1},a_{2},\ldots ,a_{n},b_{1},b_{2},\ldots ,b_{n}\in \mathbb {R} }$:

${\displaystyle \left(a_{1}^{2}+a_{2}^{2}+\cdots +a_{n}^{2}\right)\left(b_{1}^{2}+b_{2}^{2}+\cdots +b_{n}^{2}\right)\geq \left(a_{1}b_{1}+a_{2}b_{2}+\cdots +a_{n}b_{n}\right)^{2}.}$

Now, to simplify, let

{\displaystyle {\begin{aligned}A&=a_{1}^{2}+a_{2}^{2}+\cdots +a_{n}^{2},\\B&=a_{1}b_{1}+a_{2}b_{2}+\cdots +a_{n}b_{n},\\C&=b_{1}^{2}+b_{2}^{2}+\cdots +b_{n}^{2}.\end{aligned}}}

Thus, the statement we are trying to prove can be written as ${\displaystyle AC\geq B^{2}}$.

This rearranges to ${\displaystyle B^{2}-AC\leq 0}$, and if we have the quadratic equation ${\displaystyle Ax^{2}+2Bx+C}$, the discriminant is ${\displaystyle 4B^{2}-4AC}$.

Therefore, it will be sufficient to prove that this quadratic has no real roots (or one), meaning:

${\displaystyle Ax^{2}+2Bx+C\geq 0.}$

Substituting back in our values of ${\displaystyle A,B,C}$, we get:

${\displaystyle (a_{1}^{2}+a_{2}^{2}+\dotsb +a_{n}^{2})x^{2}+2(a_{1}b_{1}+a_{2}b_{2}+\dotsb +a_{n}b_{n})x+(b_{1}^{2}+b_{2}^{2}+\dotsb +b_{n}^{2})\geq 0.}$

Again, this rearranges to:

${\displaystyle (a_{1}^{2}x^{2}+2a_{1}b_{1}x+b_{1}^{2})+(a_{2}^{2}x^{2}+2a_{2}b_{2}x+b_{2}^{2})+\dotsb +(a_{n}^{2}x^{2}+2a_{n}b_{n}x+b_{n}^{2})\geq 0.}$

This factors to:

${\displaystyle (a_{1}x+b_{1})^{2}+(a_{2}x+b_{2})^{2}+\cdots +(a_{n}x+b_{n})^{2}\geq 0.}$

Which is true by the trivial inequality (https://artofproblemsolving.com/wiki/index.php/Trivial_Inequality).

Therefore, to finish our proof, we only need to show that equality is achievable.

We see that ${\displaystyle a_{i}x=-b_{i}}$ is the equality case for Cauchy-Schwarz after inspecting

${\displaystyle (a_{1}x+b_{1})^{2}+(a_{2}x+b_{2})^{2}+\cdots +(a_{n}x+b_{n})^{2}\geq 0.}$

and equality is achievable. ⯀

## Applications

### Analysis

In any inner product space, the triangle inequality is a consequence of the Cauchy–Schwarz inequality, as is now shown:

{\displaystyle {\begin{alignedat}{4}\|\mathbf {u} +\mathbf {v} \|^{2}&=\langle \mathbf {u} +\mathbf {v} ,\mathbf {u} +\mathbf {v} \rangle &&\\&=\|\mathbf {u} \|^{2}+\langle \mathbf {u} ,\mathbf {v} \rangle +\langle \mathbf {v} ,\mathbf {u} \rangle +\|\mathbf {v} \|^{2}~&&~{\text{ where }}\langle \mathbf {v} ,\mathbf {u} \rangle ={\overline {\langle \mathbf {u} ,\mathbf {v} \rangle }}\\&=\|\mathbf {u} \|^{2}+2\operatorname {Re} \langle \mathbf {u} ,\mathbf {v} \rangle +\|\mathbf {v} \|^{2}&&\\&\leq \|\mathbf {u} \|^{2}+2|\langle \mathbf {u} ,\mathbf {v} \rangle |+\|\mathbf {v} \|^{2}&&\\&\leq \|\mathbf {u} \|^{2}+2\|\mathbf {u} \|\|\mathbf {v} \|+\|\mathbf {v} \|^{2}&&\\&=(\|\mathbf {u} \|+\|\mathbf {v} \|)^{2}.&&\end{alignedat}}}

Taking square roots gives the triangle inequality:

${\displaystyle \|\mathbf {u} +\mathbf {v} \|\leq \|\mathbf {u} \|+\|\mathbf {v} \|.}$

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.[9][10]

### Geometry

The Cauchy–Schwarz inequality allows one to extend the notion of "angle between two vectors" to any real inner-product space by defining:[11][12]

${\displaystyle \cos \theta _{\mathbf {u} \mathbf {v} }={\frac {\langle \mathbf {u} ,\mathbf {v} \rangle }{\|\mathbf {u} \|\|\mathbf {v} \|}}.}$

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) 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,[13][14] as is done when extracting a metric from quantum fidelity.

### Probability theory

Let ${\displaystyle X}$ and ${\displaystyle Y}$ be random variables, then the covariance inequality:[15][16] is given by

${\displaystyle \operatorname {Var} (Y)\geq {\frac {\operatorname {Cov} (Y,X)^{2}}{\operatorname {Var} (X)}}.}$

After defining an inner product on the set of random variables using the expectation of their product,

${\displaystyle \langle X,Y\rangle :=\operatorname {E} (XY),}$

the Cauchy–Schwarz inequality becomes

${\displaystyle |\operatorname {E} (XY)|^{2}\leq \operatorname {E} (X^{2})\operatorname {E} (Y^{2}).}$

To prove the covariance inequality using the Cauchy–Schwarz inequality, let ${\displaystyle \mu =\operatorname {E} (X)}$ and ${\displaystyle \nu =\operatorname {E} (Y),}$ then

{\displaystyle {\begin{aligned}|\operatorname {Cov} (X,Y)|^{2}&=|\operatorname {E} \left((X-\mu )(Y-\nu )\right)|^{2}\\&=|\langle X-\mu ,Y-\nu \rangle |^{2}\\&\leq \langle X-\mu ,X-\mu \rangle \langle Y-\nu ,Y-\nu \rangle \\&=\operatorname {E} \left((X-\mu )^{2}\right)\operatorname {E} \left((Y-\nu )^{2}\right)\\&=\operatorname {Var} (X)\operatorname {Var} (Y),\end{aligned}}}

where ${\displaystyle \operatorname {Var} }$ denotes variance and ${\displaystyle \operatorname {Cov} }$ denotes covariance.

## Generalizations

Various generalizations of the Cauchy–Schwarz inequality exist. Hölder's inequality generalizes it to ${\displaystyle L^{p}}$ 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 ${\displaystyle L^{2}(m),m}$ being a finite measure, the standard inner product gives rise to a positive functional ${\displaystyle \varphi }$ by ${\displaystyle \varphi (g)=\langle g,1\rangle .}$ Conversely, every positive linear functional ${\displaystyle \varphi }$ on ${\displaystyle L^{2}(m)}$ can be used to define an inner product ${\displaystyle \langle f,g\rangle _{\varphi }:=\varphi \left(g^{*}f\right),}$ where ${\displaystyle g^{*}}$ is the pointwise complex conjugate of ${\displaystyle g.}$ In this language, the Cauchy–Schwarz inequality becomes[17]

${\displaystyle \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:

Cauchy–Schwarz inequality for positive functionals on C*-algebras[18][19] — If ${\displaystyle \varphi }$ is a positive linear functional on a C*-algebra ${\displaystyle A,}$ then for all ${\displaystyle a,b\in A,}$ ${\displaystyle \left|\varphi \left(b^{*}a\right)\right|^{2}\leq \varphi \left(b^{*}b\right)\varphi \left(a^{*}a\right).}$

The next two theorems are further examples in operator algebra.

Kadison–Schwarz inequality[20][21] (Named after Richard Kadison) — If ${\displaystyle \varphi }$ is a unital positive map, then for every normal element ${\displaystyle a}$ in its domain, we have ${\displaystyle \varphi (a^{*}a)\geq \varphi \left(a^{*}\right)\varphi (a)}$ and ${\displaystyle \varphi \left(a^{*}a\right)\geq \varphi (a)\varphi \left(a^{*}\right).}$

This extends the fact ${\displaystyle \varphi \left(a^{*}a\right)\cdot 1\geq \varphi (a)^{*}\varphi (a)=|\varphi (a)|^{2},}$ when ${\displaystyle \varphi }$ is a linear functional. The case when ${\displaystyle a}$ is self-adjoint, i.e. ${\displaystyle a=a^{*},}$ is sometimes known as Kadison's inequality.

Cauchy-Schwarz inequality (Modified Schwarz inequality for 2-positive maps[22]) — For a 2-positive map ${\displaystyle \varphi }$ between C*-algebras, for all ${\displaystyle a,b}$ in its domain,

${\displaystyle \varphi (a)^{*}\varphi (a)\leq \Vert \varphi (1)\Vert \varphi \left(a^{*}a\right),{\text{ and }}}$
${\displaystyle \Vert \varphi \left(a^{*}b\right)\Vert ^{2}\leq \Vert \varphi \left(a^{*}a\right)\Vert \cdot \Vert \varphi \left(b^{*}b\right)\Vert .}$

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

Callebaut's Inequality[23] — For reals ${\displaystyle 0\leqslant s\leqslant t\leqslant 1,}$

${\displaystyle \left(\sum _{i=1}^{n}a_{i}b_{i}\right)^{2}~\leqslant ~\left(\sum _{i=1}^{n}a_{i}^{1+s}b_{i}^{1-s}\right)\left(\sum _{i=1}^{n}a_{i}^{1-s}b_{i}^{1+s}\right)~\leqslant ~\left(\sum _{i=1}^{n}a_{i}^{1+t}b_{i}^{1-t}\right)\left(\sum _{i=1}^{n}a_{i}^{1-t}b_{i}^{1+t}\right)~\leqslant ~\left(\sum _{i=1}^{n}a_{i}^{2}\right)\left(\sum _{i=1}^{n}b_{i}^{2}\right).}$

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

## Notes

1. ^ In fact, it follows immediately from Eq. 1 that ${\displaystyle \left|\langle \mathbf {u} ,\mathbf {v} \rangle \right|=\|\mathbf {u} \|\|\mathbf {v} \|}$ if and only if ${\displaystyle \|\mathbf {v} \|^{2}\mathbf {u} =\langle \mathbf {u} ,\mathbf {v} \rangle \mathbf {v} .}$

## Citations

1. ^ a b c Steele, J. Michael (2004). The Cauchy–Schwarz Master Class: an Introduction to the Art of Mathematical Inequalities. The Mathematical Association of America. p. 1. ISBN 978-0521546775. ...there is no doubt that this is one of the most widely used and most important inequalities in all of mathematics.
2. ^ Strang, Gilbert (19 July 2005). "3.2". Linear Algebra and its Applications (4th ed.). Stamford, CT: Cengage Learning. pp. 154–155. ISBN 978-0030105678.
3. ^ a b Hunter, John K.; Nachtergaele, Bruno (2001). Applied Analysis. World Scientific. ISBN 981-02-4191-7.
4. ^ Bachmann, George; Narici, Lawrence; Beckenstein, Edward (2012-12-06). Fourier and Wavelet Analysis. Springer Science & Business Media. p. 14. ISBN 9781461205050.
5. ^ Hassani, Sadri (1999). Mathematical Physics: A Modern Introduction to Its Foundations. Springer. p. 29. ISBN 0-387-98579-4. Equality holds iff <c|c>=0 or |c>=0. From the definition of |c>, we conclude that |a> and |b> must be proportional.
6. ^ Wu, Hui-Hua; Wu, Shanhe (April 2009). "Various proofs of the Cauchy-Schwarz inequality" (PDF). Octogon Mathematical Magazine. 17 (1): 221–229. ISBN 978-973-88255-5-0. ISSN 1222-5657. Retrieved 18 May 2016.
7. ^ Aliprantis, Charalambos D.; Border, Kim C. (2007-05-02). Infinite Dimensional Analysis: A Hitchhiker's Guide. Springer Science & Business Media. ISBN 9783540326960.
8. ^ a b Halmos 1982, pp. 2, 167.
9. ^ Bachman, George; Narici, Lawrence (2012-09-26). Functional Analysis. Courier Corporation. p. 141. ISBN 9780486136554.
10. ^ Swartz, Charles (1994-02-21). Measure, Integration and Function Spaces. World Scientific. p. 236. ISBN 9789814502511.
11. ^ Ricardo, Henry (2009-10-21). A Modern Introduction to Linear Algebra. CRC Press. p. 18. ISBN 9781439894613.
12. ^ Banerjee, Sudipto; Roy, Anindya (2014-06-06). Linear Algebra and Matrix Analysis for Statistics. CRC Press. p. 181. ISBN 9781482248241.
13. ^ Valenza, Robert J. (2012-12-06). Linear Algebra: An Introduction to Abstract Mathematics. Springer Science & Business Media. p. 146. ISBN 9781461209010.
14. ^ Constantin, Adrian (2016-05-21). Fourier Analysis with Applications. Cambridge University Press. p. 74. ISBN 9781107044104.
15. ^ Mukhopadhyay, Nitis (2000-03-22). Probability and Statistical Inference. CRC Press. p. 150. ISBN 9780824703790.
16. ^ Keener, Robert W. (2010-09-08). Theoretical Statistics: Topics for a Core Course. Springer Science & Business Media. p. 71. ISBN 9780387938394.
17. ^ Faria, Edson de; Melo, Welington de (2010-08-12). Mathematical Aspects of Quantum Field Theory. Cambridge University Press. p. 273. ISBN 9781139489805.
18. ^ Lin, Huaxin (2001-01-01). An Introduction to the Classification of Amenable C*-algebras. World Scientific. p. 27. ISBN 9789812799883.
19. ^ Arveson, W. (2012-12-06). An Invitation to C*-Algebras. Springer Science & Business Media. p. 28. ISBN 9781461263715.
20. ^ Størmer, Erling (2012-12-13). Positive Linear Maps of Operator Algebras. Springer Monographs in Mathematics. Springer Science & Business Media. ISBN 9783642343698.
21. ^ Kadison, Richard V. (1952-01-01). "A Generalized Schwarz Inequality and Algebraic Invariants for Operator Algebras". Annals of Mathematics. 56 (3): 494–503. doi:10.2307/1969657. JSTOR 1969657.
22. ^ Paulsen, Vern (2002). Completely Bounded Maps and Operator Algebras. Cambridge Studies in Advanced Mathematics. 78. Cambridge University Press. p. 40. ISBN 9780521816694.
23. ^ Callebaut, D.K. (1965). "Generalization of the Cauchy–Schwarz inequality". J. Math. Anal. Appl. 12 (3): 491–494. doi:10.1016/0022-247X(65)90016-8.
24. ^ Callebaut's inequality. Entry in the AoPS Wiki.
25. ^ Moslehian, M.S.; Matharu, J.S.; Aujla, J.S. (2011). "Non-commutative Callebaut inequality". arXiv:1112.3003 [math.FA].