The Cauchy–Schwarz inequality (also called Cauchy–Bunyakovsky–Schwarz inequality) is an upper bound on the absolute value of 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. 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 Augustin-Louis Cauchy (1821). The corresponding inequality for integrals was published by Viktor Bunyakovsky (1859) and Hermann Schwarz (1888). Schwarz gave the modern proof of the integral version.
Statement of the inequality The Cauchy–Schwarz inequality states that for all vectors u {\displaystyle \mathbf {u} } and v {\displaystyle \mathbf {v} } of an inner product space
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 Euclidean ℓ 2 {\displaystyle \ell _{2}} norm, called the canonical or induced norm, where the norm of a vector u {\displaystyle \mathbf {u} } is denoted and defined by
‖ u ‖ := ⟨ u , u ⟩ , {\displaystyle \|\mathbf {u} \|:={\sqrt {\langle \mathbf {u} ,\mathbf {u} \rangle }},} where ⟨ u , u ⟩ {\displaystyle \langle \mathbf {u} ,\mathbf {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:
Moreover, the two sides are equal if and only if u {\displaystyle \mathbf {u} } and v {\displaystyle \mathbf {v} } are linearly dependent.
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 u 1 , u 2 , … , u n {\displaystyle u_{1},u_{2},\dots ,u_{n}} and positive real numbers v 1 , v 2 , … , v n {\displaystyle v_{1},v_{2},\dots ,v_{n}} :
( u 1 + u 2 + ⋯ + u n ) 2 v 1 + v 2 + ⋯ + v n ≤ u 1 2 v 1 + u 2 2 v 2 + ⋯ + u n 2 v n , {\displaystyle {\frac {\left(u_{1}+u_{2}+\cdots +u_{n}\right)^{2}}{v_{1}+v_{2}+\cdots +v_{n}}}\leq {\frac {u_{1}^{2}}{v_{1}}}+{\frac {u_{2}^{2}}{v_{2}}}+\cdots +{\frac {u_{n}^{2}}{v_{n}}},}
or, using summation notation,
( ∑ i = 1 n u i ) 2 ∑ i = 1 n v i ≤ ∑ i = 1 n u i 2 v i . {\displaystyle {\dfrac {\left(\sum \limits _{i=1}^{n}u_{i}\right)^{2}}{\sum \limits _{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 by using the dot product on R n {\displaystyle \mathbb {R} ^{n}} upon substituting u i ′ = u i v i t {\displaystyle u_{i}'={\frac {u_{i}}{\sqrt {v_{i}{\vphantom {t}}}}}} and v i ′ = v i t {\displaystyle v_{i}'={\textstyle {\sqrt {v_{i}{\vphantom {t}}}}}} . This form is especially helpful when the inequality involves fractions where the numerator is a perfect square.
R2 - The plane
The real vector space R 2 {\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 u = ( u 1 , u 2 ) {\displaystyle \mathbf {u} =(u_{1},u_{2})} and v = ( v 1 , v 2 ) {\displaystyle \mathbf {v} =(v_{1},v_{2})} then the Cauchy–Schwarz inequality becomes:
⟨ u , v ⟩ 2 = ( ‖ u ‖ ‖ v ‖ cos θ ) 2 ≤ ‖ u ‖ 2 ‖ v ‖ 2 , {\displaystyle \langle \mathbf {u} ,\mathbf {v} \rangle ^{2}={\bigl (}\|\mathbf {u} \|\|\mathbf {v} \|\cos \theta {\bigr )}^{2}\leq \|\mathbf {u} \|^{2}\|\mathbf {v} \|^{2},}
where θ {\displaystyle \theta } is the angle between u {\displaystyle \mathbf {u} } and v {\displaystyle \mathbf {v} } . The form presented here is perhaps the easiest in which to understand the inequality, as 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 u 1 {\displaystyle u_{1}} , u 2 {\displaystyle u_{2}} , v 1 {\displaystyle v_{1}} , and v 2 {\displaystyle v_{2}} as
( u 1 v 1 + u 2 v 2 ) 2 ≤ ( u 1 2 + u 2 2 ) ( v 1 2 + v 2 2 ) , {\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 ( u 1 , u 2 ) {\displaystyle \left(u_{1},u_{2}\right)} is in the same or opposite direction as the vector ( v 1 , v 2 ) {\displaystyle \left(v_{1},v_{2}\right)} , or if one of them is the zero vector.
Rn: n-dimensional Euclidean space In Euclidean space R n {\displaystyle \mathbb {R} ^{n}} with the standard inner product, which is the dot product, the Cauchy–Schwarz inequality becomes:
( ∑ i = 1 n u i v i ) 2 ≤ ( ∑ i = 1 n u i 2 ) ( ∑ i = 1 n v i 2 ) . {\displaystyle {\biggl (}\sum _{i=1}^{n}u_{i}v_{i}{\biggr )}^{2}\leq {\biggl (}\sum _{i=1}^{n}u_{i}^{2}{\biggr )}{\biggl (}\sum _{i=1}^{n}v_{i}^{2}{\biggr )}.}
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
1 2 ∑ i = 1 n ∑ j = 1 n ( u i v j − u j v i ) 2 ≥ 0 {\displaystyle {\tfrac {1}{2}}\sum _{i=1}^{n}\sum _{j=1}^{n}(u_{i}v_{j}-u_{j}v_{i})^{2}\geq 0} or by considering the following quadratic polynomial in x {\displaystyle x}
( u 1 x + v 1 ) 2 + ⋯ + ( u n x + v n ) 2 = ( ∑ i u i 2 ) x 2 + 2 ( ∑ i u i v i ) x + ∑ i v i 2 . {\displaystyle (u_{1}x+v_{1})^{2}+\cdots +(u_{n}x+v_{n})^{2}={\biggl (}\sum _{i}u_{i}^{2}{\biggr )}x^{2}+2{\biggl (}\sum _{i}u_{i}v_{i}{\biggr )}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,
( ∑ i u i v i ) 2 − ( ∑ i u i 2 ) ( ∑ i v i 2 ) ≤ 0. {\displaystyle {\biggl (}\sum _{i}u_{i}v_{i}{\biggr )}^{2}-{\biggl (}\sum _{i}{u_{i}^{2}}{\biggr )}{\biggl (}\sum _{i}{v_{i}^{2}}{\biggr )}\leq 0.}
Cn: n-dimensional complex space If u , v ∈ C n {\displaystyle \mathbf {u} ,\mathbf {v} \in \mathbb {C} ^{n}} with u = ( u 1 , … , u n ) {\displaystyle \mathbf {u} =(u_{1},\ldots ,u_{n})} and v = ( v 1 , … , v n ) {\displaystyle \mathbf {v} =(v_{1},\ldots ,v_{n})} (where u 1 , … , u n ∈ C {\displaystyle u_{1},\ldots ,u_{n}\in \mathbb {C} } and v 1 , … , v n ∈ C {\displaystyle v_{1},\ldots ,v_{n}\in \mathbb {C} } ) and if the inner product on the vector space C n {\displaystyle \mathbb {C} ^{n}} is the canonical complex inner product (defined by ⟨ u , v ⟩ := u 1 v 1 ¯ + ⋯ + u n v n ¯ , {\displaystyle \langle \mathbf {u} ,\mathbf {v} \rangle :=u_{1}{\overline {v_{1}}}+\cdots +u_{n}{\overline {v_{n}}},} where the bar notation is used for complex conjugation), then the inequality may be restated more explicitly as follows:
| ⟨ u , v ⟩ | 2 = | ∑ k = 1 n u k v ¯ k | 2 ≤ ⟨ u , u ⟩ ⟨ v , v ⟩ = ( ∑ k = 1 n u k u ¯ k ) ( ∑ k = 1 n v k v ¯ k ) = ∑ j = 1 n | u j | 2 ∑ k = 1 n | v k | 2 . {\displaystyle {\bigl |}\langle \mathbf {u} ,\mathbf {v} \rangle {\bigr |}^{2}={\Biggl |}\sum _{k=1}^{n}u_{k}{\bar {v}}_{k}{\Biggr |}^{2}\leq \langle \mathbf {u} ,\mathbf {u} \rangle \langle \mathbf {v} ,\mathbf {v} \rangle ={\biggl (}\sum _{k=1}^{n}u_{k}{\bar {u}}_{k}{\biggr )}{\biggl (}\sum _{k=1}^{n}v_{k}{\bar {v}}_{k}{\biggr )}=\sum _{j=1}^{n}|u_{j}|^{2}\sum _{k=1}^{n}|v_{k}|^{2}.}
That is,
| u 1 v ¯ 1 + ⋯ + u n v ¯ n | 2 ≤ ( | u 1 |
2 + ⋯ + | u n |
2 ) ( | v 1 |
2 + ⋯ + | v n |
2 ) . {\displaystyle {\bigl |}u_{1}{\bar {v}}_{1}+\cdots +u_{n}{\bar {v}}_{n}{\bigr |}^{2}\leq {\bigl (}|u_{1}|{}^{2}+\cdots +|u_{n}|{}^{2}{\bigr )}{\bigl (}|v_{1}|{}^{2}+\cdots +|v_{n}|{}^{2}{\bigr )}.}
L2 For the inner product space of square-integrable complex-valued functions, the following inequality holds.
| ∫ R n f ( x ) g ( x ) ¯ d x | 2 ≤ ∫ R n | f ( x ) | 2 d x ∫ R n | g ( x ) | 2 d x . {\displaystyle \left|\int _{\mathbb {R} ^{n}}f(x){\overline {g(x)}}\,dx\right|^{2}\leq \int _{\mathbb {R} ^{n}}{\bigl |}f(x){\bigr |}^{2}\,dx\int _{\mathbb {R} ^{n}}{\bigl |}g(x){\bigr |}^{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:
‖ u + v ‖ 2 = ⟨ u + v , u + v ⟩ = ‖ u ‖ 2 + ⟨ u , v ⟩ + ⟨ v , u ⟩ + ‖ v ‖ 2 where ⟨ v , u ⟩ = ⟨ u , v ⟩ ¯ = ‖ u ‖ 2 + 2 Re ⟨ u , v ⟩ + ‖ v ‖ 2 ≤ ‖ u ‖ 2 + 2 | ⟨ u , v ⟩ | + ‖ v ‖ 2 ≤ ‖ u ‖ 2 + 2 ‖ u ‖ ‖ v ‖ + ‖ v ‖ 2 using CS = ( ‖ u ‖ + ‖ v ‖ ) 2 . {\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}~&&~{\text{ using CS}}\\&={\bigl (}\|\mathbf {u} \|+\|\mathbf {v} \|{\bigr )}^{2}.&&\end{alignedat}}}
Taking square roots gives the triangle inequality:
‖ u + v ‖ ≤ ‖ u ‖ + ‖ v ‖ . {\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.
Geometry The Cauchy–Schwarz inequality allows one to extend the notion of "angle between two vectors" to any real inner-product space by defining:
cos θ u v = ⟨ u , v ⟩ ‖ u ‖ ‖ v ‖ . {\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, as is done when extracting a metric from quantum fidelity.
Linear algebra The Cauchy-Schwarz inequality can be used to prove the spectral theorem for self-adjoint operators in the finite-dimensional case. Let A {\displaystyle A} be a self-adjoint operator on a finite-dimensional inner product space and u {\displaystyle \mathbf {u} } be a non-zero vector which maximizes ‖ A u ‖ ‖ u ‖ {\displaystyle {\frac {\|A\mathbf {u} \|}{\|\mathbf {u} \|}}} . The existence of u {\displaystyle \mathbf {u} } is guaranteed by the Heine-Borel theorem. If A u = 0 {\displaystyle A\mathbf {u} =\mathbf {0} } then u {\displaystyle \mathbf {u} } is an eigenvector of A {\displaystyle A} . Otherwise the maximizing property of u {\displaystyle \mathbf {u} } implies that
‖ A u ‖ ‖ u ‖ ≥ ‖ A ( A u ) ‖ ‖ A u ‖ . {\displaystyle {\frac {\|A\mathbf {u} \|}{\|\mathbf {u} \|}}\geq {\frac {\|A(A\mathbf {u} )\|}{\|A\mathbf {u} \|}}.} In the other direction, the Cauchy-Schwarz inequality implies that
