Cauchy–Schwarz inequality

Imagine a single mathematical idea that ties together everything from simple geometry to the most complex quantum mechanics. The Cauchy–Schwarz inequality is one of mathematics' most powerful and widely used tools, providing a fundamental limit on how 'aligned' any two mathematical objects can be. Its elegance lies in its profound reach, quietly underpinning countless scientific and engineering breakthroughs. The Cauchy–Schwarz inequality establishes an upper bound on the 'inner product' of two vectors, fundamentally defining their relationship and similarity. It demonstrates remarkable versatility, applying universally across diverse mathematical contexts, from finite sums and infinite series to integrals of functions. This powerful inequality serves as a cornerstone for proving other crucial theorems, including the famous triangle inequality, making it indispensable in modern mathematics.

Source: Wikipedia

AI Summary

Imagine a single mathematical idea that ties together everything from simple geometry to the most complex quantum mechanics. The Cauchy–Schwarz inequality is one of mathematics' most powerful and widely used tools, providing a fundamental limit on how 'aligned' any two mathematical objects can be. Its elegance lies in its profound reach, quietly underpinning countless scientific and engineering breakthroughs.

The Universal Limit: Cauchy–Schwarz Inequality

At its heart, the Cauchy–Schwarz inequality is a profound statement about how two mathematical 'vectors' interact within a special kind of space. It sets a strict upper limit on their 'inner product'—a way of multiplying vectors that tells us how much they point in the same direction—relative to their individual 'sizes' or magnitudes.

This isn't just a niche mathematical curiosit;. It's a foundational result, considered one of the most important inequalities in all of mathematics. Its principles appear across an astonishing array of fields, from probability and statistics to quantum mechanics and signal processing.

A Story of Three Mathematicians

The inequality we know today is a testament to the collaborative, evolving nature of mathematics, bearing the names of three brilliant minds. Augustin-Louis Cauchy first published a version for finite sums in 1821.

Decades later, Viktor Bunyakovsky (in 1859) and Hermann Schwarz (in 1888) independently extended the idea to integrals. Schwarz, in particular, provided the modern proof for the integral form, solidifying its place in mathematical analysis.

Understanding the 'Inner Product'

To truly grasp the Cauchy–Schwarz inequality, we need to understand what an 'inner product space' is. Think of it as a vector space equipped with an operation—the inner product—that takes two vectors and returns a scalar value. This value generalizes familiar concepts like the dot product in everyday geometry.

The inner product is crucial because it allows us to define geometric notions like length (or 'norm') and the angle between vectors. For example, the inner product of a vector with itself gives us the square of its length.

This definition means that the 'norm' or length of any vector 'u' is simply the square root of its inner product with itself. And critically, this inner product of a vector with itself is always a non-negative real number.

\|u\| := \sqrt{\langle u, u \rangle}

The Inequality Unveiled

Now, let's state the Cauchy–Schwarz inequality formally. For any two vectors, 'u' and 'v', in an inner product space, the absolute value of their inner product is always less than or equal to the product of their individual norms.

This is the core mathematical statement. It's often seen in a slightly different, more intuitive form, by taking the square root of both sides, which expresses it directly in terms of vector norms.

|\langle u, v \rangle|^2 \leq \langle u, u \rangle \langle v, v \rangle

This elegant form shows that the inner product (a measure of alignment) can never exceed the product of the magnitudes of the two vectors. It's like saying that two arrows can never be 'more aligned' than their individual lengths allow.

|\langle u, v \rangle| \leq \|u\| \|v\|

When does this inequality become an equality? Precisely when the two vectors, 'u' and 'v', are 'linearly dependent'—meaning one is simply a scalar multiple of the other. In simpler terms, they point in exactly the same or opposite directions, or one of them is the zero vector.

A Geometric Glimpse: R²

Let's bring this abstract concept down to earth, into the familiar 2-dimensional plane, R². Here, the inner product is our everyday dot product. If 'u' and 'v' are vectors, their dot product is defined by their magnitudes and the cosine of the angle 'theta' between them.

If we square both sides and apply the Cauchy–Schwarz inequality, we get something beautifully simple: (\|u\| \|v\| \cos\theta)^2 \leq \|u\|^2 \|v\|^2. This simplifies to \cos^2\theta \leq 1.

\langle u, v \rangle = \|u\| \|v\| \cos\theta

This makes perfect sense! The square of the cosine of any angle is always between 0 and 1. The inequality becomes an equality when \cos^2\theta = 1, meaning \cos\theta = \pm 1. This happens when the vectors are perfectly aligned (\theta = 0) or perfectly anti-aligned (\theta = \pi).

Extending to Higher Dimensions (Rⁿ)

In n-dimensional Euclidean space, Rⁿ, the inner product is the standard dot product—a sum of the products of corresponding components. The Cauchy–Schwarz inequality elegantly translates into a powerful statement about these sums.

This form is immensely useful in areas like statistics, where you might be comparing sequences of data points. It essentially says that the square of the sum of element-wise products is bounded by the product of the sums of their squares.

\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)

Complex Spaces (Cⁿ)

The inequality isn't limited to real numbers. In complex vector spaces like Cⁿ, where vector components can be complex numbers, the inner product involves complex conjugation. The result is just as powerful.

Here, \overline{vk} denotes the complex conjugate of vk, which ensures that the inner product retains properties suitable for defining norms and distances in complex spaces. The inequality holds strong, bounding the complex inner product.

\left|\sum_{k=1}^{n} u_k \overline{v_k}\right|^2 \leq \left(\sum_{k=1}^{n} |u_k|^2\right) \left(\sum_{k=1}^{n} |v_k|^2\right)

Infinite Dimensions: Functions (L²)

The concept scales up beautifully to infinite-dimensional spaces, like the space of square-integrable functions, L². Here, vectors are functions, and the inner product is defined through integration. This is vital in quantum mechanics and Fourier analysis.

This integral form applies to functions, where the absolute value of the integral of the product of two functions (one conjugated) is bounded by the product of the integrals of their squared absolute values. It's a cornerstone for proving convergence and existence in analysis.

\left|\int_{\mathbb{R}^n} f(x) \overline{g(x)} dx\right|^2 \leq \left(\int_{\mathbb{R}^n} |f(x)|^2 dx\right) \left(\int_{\mathbb{R}^n} |g(x)|^2 dx\right)

A Foundation for Other Truths

Beyond its direct applications, the Cauchy–Schwarz inequality is a fundamental building block for many other mathematical results. One of its most famous progeny is the triangle inequality—a cornerstone of geometry and analysis.

The triangle inequality states that the shortest distance between two points is a straight line, or that the length of one side of a triangle is always less than or equal to the sum of the lengths of the other two sides. Proving this simply requires applying Cauchy–Schwarz, showcasing its power as an analytical tool.

\|u + v\| \leq \|u\| + \|v\|

Article

Cauchy–Schwarz inequality

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 ((/wiki/Cauchy–Schwarzinequality#CITEREFCauchy1821)). The corresponding inequality for integrals was published by Viktor Bunyakovsky ((/wiki/Cauchy–Schwarzinequality#CITEREFBunyakovsky1859)) and Hermann Schwarz ((/wiki/Cauchy–Schwarzinequality#CITEREFSchwarz1888)). Schwarz gave the modern proof of the integral version.

Statement of the inequality

Cauchy–Schwarz inequality

The Cauchy–Schwarz inequality states that for all vectors ${\displaystyle \mathbf {u} }$ and ${\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 ${\displaystyle \ell {2}}$ norm, called the canonical or induced norm, where the norm of a vector ${\displaystyle \mathbf {u} }$ is denoted and defined by ${\displaystyle \|\mathbf {u} \|:={\sqrt {\langle \mathbf {u} ,\mathbf {u} \rangle }},}$ where ${\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 ${\displaystyle \mathbf {u} }$ and ${\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 ${\displaystyle u{1},u{2},\dots ,u{n}}$ and positive real numbers ${\displaystyle v{1},v{2},\dots ,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, ${\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 ${\displaystyle \mathbb {R} ^{n}}$ upon substituting ${\displaystyle u{i}'={\frac {u{i}}{\sqrt {v{i}{\vphantom {t}}}}}}$ and ${\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

${\displaystyle |\mathbf {u} \cdot \mathbf {v} |=\|\mathbf {v} \|\cdot (\|\mathbf {u} \||\cos \theta |)\leq \|\mathbf {u} \|\cdot \|\mathbf {v} \|}$

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 {u} =(u{1},u{2})}$ and ${\displaystyle \mathbf {v} =(v{1},v{2})}$ then the Cauchy–Schwarz inequality becomes: ${\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 ${\displaystyle \mathbf {u} }$ and ${\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 ${\displaystyle u{1}}$, ${\displaystyle u{2}}$, ${\displaystyle v{1}}$, and ${\displaystyle v{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 \left(u{1},u{2}\right)}$ 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.

Rn: 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 {\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 ${\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 ${\displaystyle x}$ ${\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, ${\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 ${\displaystyle \mathbf {u} ,\mathbf {v} \in \mathbb {C} ^{n}}$ with ${\displaystyle \mathbf {u} =(u{1},\ldots ,u{n})}$ and ${\displaystyle \mathbf {v} =(v{1},\ldots ,v{n})}$ (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}}},}$ where the bar notation is used for complex conjugation), then the inequality may be restated more explicitly as follows: ${\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, ${\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. ${\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: ${\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: ${\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: ${\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.

Probability theory

Let ${\displaystyle X}$ and ${\displaystyle Y}$ be random variables. Then the covariance inequality is given by: ${\displaystyle \operatorname {Var} (X)\geq {\frac {\operatorname {Cov} (X,Y)^{2}}{\operatorname {Var} (Y)}}.}$

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 {\bigl |}\operatorname {E} (XY){\bigr |}^{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}{\bigl |}\operatorname {Cov} (X,Y){\bigr |}^{2}&={\bigl |}\operatorname {E} ((X-\mu )(Y-\nu )){\bigr |}^{2}\\&={\bigl |}\langle X-\mu ,Y-\nu \rangle {\bigr |}^{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.

Proofs

Cauchy–Schwarz inequality

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 ${\displaystyle \mathbb {R} }$ and not ${\displaystyle \mathbb {C} .}$

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 ${\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 of the Equality Characterization given above; that is, it proves that if ${\displaystyle \mathbf {u} }$ and ${\displaystyle \mathbf {v} }$ are linearly dependent then ${\displaystyle {\bigl |}\langle \mathbf {u} ,\mathbf {v} \rangle {\bigr |}=\|\mathbf {u} \|\|\mathbf {v} \|.}$

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 orthogonal projection

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

Cauchy-Schwarz inequality as a consequence of Pythagorean theorem

Let ${\displaystyle \mathbf {z}:=\mathbf {u} -{\frac {\langle \mathbf {u} ,\mathbf {v} \rangle }{\langle \mathbf {v} ,\mathbf {v} \rangle }}\mathbf {v} .}$If we look at its length, we will see${\displaystyle {\begin{aligned}\|\mathbf {z} \|^{2}&=\left\langle \mathbf {u} -{\frac {\langle \mathbf {u} ,\mathbf {v} \rangle }{\langle \mathbf {v} ,\mathbf {v} \rangle }}\mathbf {v} ,\mathbf {u} -{\frac {\langle \mathbf {u} ,\mathbf {v} \rangle }{\langle \mathbf {v} ,\mathbf {v} \rangle }}\mathbf {v} \right\rangle \\&=\langle \mathbf {u} ,\mathbf {u} \rangle -2{\frac {\langle \mathbf {u} ,\mathbf {v} \rangle }{\langle \mathbf {v} ,\mathbf {v} \rangle }}\langle \mathbf {u} ,\mathbf {v} \rangle +{\frac {\langle \mathbf {u} ,\mathbf {v} \rangle ^{2}}{\langle \mathbf {v} ,\mathbf {v} \rangle ^{2}}}\langle \mathbf {v} ,\mathbf {v} \rangle \\&=\langle \mathbf {u} ,\mathbf {u} \rangle -{\frac {\langle \mathbf {u} ,\mathbf {v} \rangle ^{2}}{\langle \mathbf {v} ,\mathbf {v} \rangle }}=\|\mathbf {u} \|^{2}-{\frac {\langle \mathbf {u} ,\mathbf {v} \rangle ^{2}}{\|\mathbf {v} \|^{2}}}\end{aligned}}}$Since the length of any vector is always non-negative, we get${\displaystyle {\begin{aligned}\|\mathbf {u} \|^{2}-{\frac {\langle \mathbf {u} ,\mathbf {v} \rangle ^{2}}{\|\mathbf {v} \|^{2}}}=\|\mathbf {z} \|^{2}\geq 0\end{aligned}}}$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. ${\displaystyle \blacksquare }$

Proof by analyzing a quadratic

Consider an arbitrary pair of vectors ${\displaystyle \mathbf {u} ,\mathbf {v} }$. Define the function ${\displaystyle p:\mathbb {R} \to \mathbb {R} }$ defined by ${\displaystyle p(t)=\langle t\alpha \mathbf {u} +\mathbf {v} ,t\alpha \mathbf {u} +\mathbf {v} \rangle }$, where ${\displaystyle \alpha }$ is a complex number satisfying ${\displaystyle |\alpha |=1}$ and ${\displaystyle \alpha \langle \mathbf {u} ,\mathbf {v} \rangle =|\langle \mathbf {u} ,\mathbf {v} \rangle |}$. Such an ${\displaystyle \alpha }$ exists since if ${\displaystyle \langle \mathbf {u} ,\mathbf {v} \rangle =0}$ then ${\displaystyle \alpha }$ can be taken to be 1.

Since the inner product is positive-definite, ${\displaystyle p(t)}$ only takes non-negative real values. On the other hand, ${\displaystyle p(t)}$ can be expanded using the bilinearity of the inner product: ${\displaystyle {\begin{aligned}p(t)&=\langle t\alpha \mathbf {u} ,t\alpha \mathbf {u} \rangle +\langle t\alpha \mathbf {u} ,\mathbf {v} \rangle +\langle \mathbf {v} ,t\alpha \mathbf {u} \rangle +\langle \mathbf {v} ,\mathbf {v} \rangle \\&=t\alpha t{\overline {\alpha }}\langle \mathbf {u} ,\mathbf {u} \rangle +t\alpha \langle \mathbf {u} ,\mathbf {v} \rangle +t{\overline {\alpha }}\langle \mathbf {v} ,\mathbf {u} \rangle +\langle \mathbf {v} ,\mathbf {v} \rangle \\&=\lVert \mathbf {u} \rVert ^{2}t^{2}+2|\langle \mathbf {u} ,\mathbf {v} \rangle |t+\lVert \mathbf {v} \rVert ^{2}\end{aligned}}}$ Thus, ${\displaystyle p}$ is a polynomial of degree ${\displaystyle 2}$ (unless ${\displaystyle \mathbf {u} =0,}$ which is a case that was checked earlier). Since the sign of ${\displaystyle p}$ does not change, the discriminant of this polynomial must be non-positive: ${\displaystyle \Delta =4{\bigl (}\,|\langle \mathbf {u} ,\mathbf {v} \rangle |^{2}-\Vert \mathbf {u} \Vert ^{2}\Vert \mathbf {v} \Vert ^{2}{\bigr )}\leq 0.}$ The conclusion follows.

For the equality case, notice that ${\displaystyle \Delta =0}$ happens if and only if ${\displaystyle p(t)={\bigl (}t\Vert \mathbf {u} \Vert +\Vert \mathbf {v} \Vert {\bigr )}^{2}.}$ If ${\displaystyle t{0}=-\Vert \mathbf {v} \Vert /\Vert \mathbf {u} \Vert ,}$ then ${\displaystyle p(t{0})=\langle t{0}\alpha \mathbf {u} +\mathbf {v} ,t{0}\alpha \mathbf {u} +\mathbf {v} \rangle =0,}$ and hence ${\displaystyle \mathbf {v} =-t{0}\alpha \mathbf {u} .}$

Generalizations

Cauchy–Schwarz inequality

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 ${\displaystyle {\bigl |}\varphi (g^{}f){\bigr |}^{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 ${\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, that is, ${\displaystyle 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. There are also non-commutative versions for operators and tensor products of matrices.

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