Tutorials › Linear Algebra › The Real Cauchy-Schwarz Inequality

Inner Products and Norms · Tutorial 611 of 1000

The Real Cauchy-Schwarz Inequality

Learn how minimizing a squared norm gives a rigorous bound on the absolute value of a real inner product.

Intermediate 9 min read

What You'll Learn

  • State the real Cauchy–Schwarz inequality for an inner product space.
  • Expand the squared norm of a real linear combination using symmetry and bilinearity.
  • Find the scalar that minimizes that squared norm when one vector is nonzero.
  • Handle the zero-vector case without dividing by zero.
  • Check the inequality in Euclidean, weighted, and function inner products.
  • Identify a sign error in the quadratic expansion and correct it.

The Inner Product Needs a Bound

An inner product measures how two vectors interact, while its induced norm measures the size of each vector. The real Cauchy–Schwarz inequality connects these quantities: the absolute value of an inner product cannot exceed the product of the two norms. Its proof is a useful model of how positivity can produce an inequality. We examine the squared norm of \(\mathbf{x}-t\mathbf{y}\), choose the real scalar \(t\) that makes it as small as possible, and use the fact that a squared norm cannot be negative.

Throughout this tutorial, the scalar field is \(\mathbb{R}\). A real inner product space is a real vector space equipped with an inner product \(\langle\mathbf{x},\mathbf{y}\rangle\) that is bilinear, symmetric, and positive definite. In particular, symmetry means \(\langle\mathbf{x},\mathbf{y}\rangle=\langle\mathbf{y},\mathbf{x}\rangle\), and positive definiteness means \(\langle\mathbf{x},\mathbf{x}\rangle\ge 0\), with equality exactly when \(\mathbf{x}=\mathbf{0}\). The induced norm is defined by \(\|\mathbf{x}\|=\sqrt{\langle\mathbf{x},\mathbf{x}\rangle}\). The result and proof below do not require the space to be finite-dimensional.

Theorem (Real Cauchy–Schwarz inequality): For any two vectors \(\mathbf{x}\) and \(\mathbf{y}\) in a real inner product space, $$ |\langle\mathbf{x},\mathbf{y}\rangle|\le \|\mathbf{x}\|\,\|\mathbf{y}\|. $$

The absolute value matters because a real inner product may be positive, negative, or zero. The norms are nonnegative, so the right-hand side is always nonnegative. To prove the theorem, we first identify the minimum of a particular squared norm. This calculation uses only the inner product axioms and ordinary algebra.

Minimizing a Squared Norm

Fix vectors \(\mathbf{x}\) and \(\mathbf{y}\), and let \(t\in\mathbb{R}\). By bilinearity and symmetry, the squared norm of \(\mathbf{x}-t\mathbf{y}\) is a quadratic function of \(t\):

$$ \|\mathbf{x}-t\mathbf{y}\|^2 =\langle\mathbf{x}-t\mathbf{y},\mathbf{x}-t\mathbf{y}\rangle =\|\mathbf{x}\|^2-2t\langle\mathbf{x},\mathbf{y}\rangle+t^2\|\mathbf{y}\|^2. $$

When \(\mathbf{y}\ne\mathbf{0}\), positive definiteness gives \(\|\mathbf{y}\|^2>0\). Thus the coefficient of \(t^2\) is positive, and completing the square locates the minimum.

Lemma (Minimum along a real line): If \(\mathbf{y}\ne\mathbf{0}\), then the function \(q(t)=\|\mathbf{x}-t\mathbf{y}\|^2\), for \(t\in\mathbb{R}\), has a unique global minimum at \(t=\dfrac{\langle\mathbf{x},\mathbf{y}\rangle}{\|\mathbf{y}\|^2}\). Its minimum value is \(\|\mathbf{x}\|^2-\dfrac{\langle\mathbf{x},\mathbf{y}\rangle^2}{\|\mathbf{y}\|^2}\).

Proof. Since \(\mathbf{y}\ne\mathbf{0}\), the scalar \(\|\mathbf{y}\|^2\) is positive, so the following division is valid. Starting from the quadratic expansion and completing the square gives $$ q(t)=\|\mathbf{y}\|^2\left(t-\frac{\langle\mathbf{x},\mathbf{y}\rangle}{\|\mathbf{y}\|^2}\right)^2 +\|\mathbf{x}\|^2-\frac{\langle\mathbf{x},\mathbf{y}\rangle^2}{\|\mathbf{y}\|^2}. $$ The first term is nonnegative for every real \(t\), and it is zero exactly when \(t=\dfrac{\langle\mathbf{x},\mathbf{y}\rangle}{\|\mathbf{y}\|^2}\). The remaining terms do not depend on \(t\). Therefore this value of \(t\) gives the global minimum, and it is the unique value that makes the square term zero. Substitution into the expression gives the stated minimum value. \(\square\)

The lemma identifies the best scalar multiple of \(\mathbf{y}\) to subtract from \(\mathbf{x}\) if the goal is to make the remaining squared norm as small as possible. The value of the minimum itself cannot be negative, since it is a squared norm. That fact gives the desired inner-product bound.

Proof of the Inequality

Proof of the Real Cauchy–Schwarz inequality. Let \(\mathbf{x}\) and \(\mathbf{y}\) be arbitrary vectors in a real inner product space. We separate the case \(\mathbf{y}=\mathbf{0}\), because the minimizing scalar in the lemma has \(\|\mathbf{y}\|^2\) in its denominator.

If \(\mathbf{y}=\mathbf{0}\), bilinearity gives \(\langle\mathbf{x},\mathbf{y}\rangle=0\), and \(\|\mathbf{y}\|=0\). Hence $$ |\langle\mathbf{x},\mathbf{y}\rangle|=0=\|\mathbf{x}\|\,\|\mathbf{y}\|. $$ Now suppose \(\mathbf{y}\ne\mathbf{0}\). The lemma gives a minimum value of \(q(t)=\|\mathbf{x}-t\mathbf{y}\|^2\), and every value of \(q(t)\) is nonnegative. In particular, its minimum is nonnegative: $$ 0\le \|\mathbf{x}\|^2-\frac{\langle\mathbf{x},\mathbf{y}\rangle^2}{\|\mathbf{y}\|^2}. $$ Multiplying by the positive number \(\|\mathbf{y}\|^2\) gives $$ \langle\mathbf{x},\mathbf{y}\rangle^2 \le \|\mathbf{x}\|^2\|\mathbf{y}\|^2. $$ Both sides are nonnegative. Taking nonnegative square roots yields $$ |\langle\mathbf{x},\mathbf{y}\rangle| \le \|\mathbf{x}\|\,\|\mathbf{y}\|. $$ This proves the inequality in both cases. \(\square\)

The zero-vector case is not an optional detail: it is the case in which the minimizing-scalar formula is unavailable. Separating it ensures that every division in the proof is justified. Otherwise, the argument needs no assumption about dimension, coordinates, or a particular formula for the inner product.

Worked Applications

Worked Example: The Standard Dot Product in \(\mathbb{R}^3\)

Let \(\mathbf{x}=(1,2,2)^{\top}\) and \(\mathbf{y}=(2,1,0)^{\top}\), with the standard dot product. Compute both sides of the inequality and verify the result.

The inner product and squared norms are $$ \langle\mathbf{x},\mathbf{y}\rangle =1\cdot2+2\cdot1+2\cdot0=4, $$ $$ \|\mathbf{x}\|^2=1^2+2^2+2^2=9, \qquad \|\mathbf{y}\|^2=2^2+1^2+0^2=5. $$ Thus \(\|\mathbf{x}\|=3\), \(\|\mathbf{y}\|=\sqrt{5}\), and the claimed comparison is \(4\le 3\sqrt{5}\). Both sides are nonnegative; squaring verifies it exactly: $$ 4^2=16\le 45=(3\sqrt{5})^2. $$

Check: The minimizing scalar from the lemma is \(t=\dfrac{4}{5}\). Directly, $$ \mathbf{x}-\frac45\mathbf{y} =\begin{bmatrix}1\\2\\2\end{bmatrix} -\begin{bmatrix}\frac85\\\frac45\\0\end{bmatrix} =\begin{bmatrix}-\frac35\\\frac65\\2\end{bmatrix}, \qquad \left\|\mathbf{x}-\frac45\mathbf{y}\right\|^2 =\frac9{25}+\frac{36}{25}+4=\frac{29}{5}. $$ The lemma's formula gives \(9-\dfrac{4^2}{5}=9-\dfrac{16}{5}=\dfrac{29}{5}\), agreeing with the direct calculation.

Worked Example: A Weighted Inner Product

On \(\mathbb{R}^2\), use \(\langle\mathbf{x},\mathbf{y}\rangle=2x_1y_1+3x_2y_2\). For \(\mathbf{x}=(1,2)^{\top}\) and \(\mathbf{y}=(2,1)^{\top}\), evaluate the two sides and check the inequality.

The weighted inner product is $$ \langle\mathbf{x},\mathbf{y}\rangle =2(1)(2)+3(2)(1)=4+6=10. $$ The induced squared norms are $$ \|\mathbf{x}\|^2=2(1)^2+3(2)^2=2+12=14, \qquad \|\mathbf{y}\|^2=2(2)^2+3(1)^2=8+3=11. $$ Consequently, \(|\langle\mathbf{x},\mathbf{y}\rangle|=10\), while \(\|\mathbf{x}\|\,\|\mathbf{y}\|=\sqrt{14}\sqrt{11}=\sqrt{154}\). Both are nonnegative, and squaring gives $$ 10^2=100\le154=(\sqrt{154})^2. $$

Check: Here \(t=\dfrac{10}{11}\). The minimizing squared norm from the lemma is $$ 14-\frac{10^2}{11}=14-\frac{100}{11}=\frac{54}{11}\ge0. $$ This also verifies the nonnegative quantity used by the proof for this pair.

Worked Example: An Integral Inner Product

For continuous real-valued functions on \([0,1]\), use \(\langle f,g\rangle=\int_0^1 f(x)g(x)\,dx\). Take \(f(x)=1+x\) and \(g(x)=x\). Compute the inner product and norms, then verify the comparison.

The inner product is $$ \langle f,g\rangle =\int_0^1(x+x^2)\,dx =\left[\frac{x^2}{2}+\frac{x^3}{3}\right]_0^1 =\frac12+\frac13=\frac56. $$ For the first squared norm, $$ \|f\|^2 =\int_0^1(1+x)^2\,dx =\int_0^1(1+2x+x^2)\,dx =\left[x+x^2+\frac{x^3}{3}\right]_0^1 =\frac73. $$ For the second, $$ \|g\|^2=\int_0^1 x^2\,dx =\left[\frac{x^3}{3}\right]_0^1=\frac13. $$ Thus \(\|f\|\,\|g\|=\sqrt{\frac73}\sqrt{\frac13}=\frac{\sqrt7}{3}\). Since \(\frac56\) and \(\frac{\sqrt7}{3}\) are nonnegative, square the comparison: $$ \left(\frac56\right)^2=\frac{25}{36} \le \frac{28}{36}=\frac79 =\left(\frac{\sqrt7}{3}\right)^2. $$ Therefore \(|\langle f,g\rangle|\le\|f\|\,\|g\|\), as required.

Check: The minimizing scalar is \(t=\dfrac{5/6}{1/3}=\dfrac52\). The lemma gives the minimum squared norm $$ \frac73-\frac{(5/6)^2}{1/3} =\frac73-\frac{25}{12} =\frac{28}{12}-\frac{25}{12} =\frac14\ge0. $$

Why the Minimization Argument Is Useful

The proof works across different real inner product spaces because it does not depend on how vectors are represented. In \(\mathbb{R}^n\), the inner product may be computed by coordinate sums; in a weighted space, the weights enter the same bilinear expansion; for functions, the inner product may be an integral. In every case, symmetry makes the two cross terms equal, and positive definiteness ensures that a nonzero \(\mathbf{y}\) has \(\|\mathbf{y}\|^2>0\). These are exactly the features the minimization proof needs.

The key mechanism is not merely that a quadratic has a minimum. It is that the expression being minimized is a squared norm and therefore is nonnegative for every real choice of \(t\). Completing the square makes the minimum explicit; its nonnegativity then bounds the square of the inner product. Taking square roots gives the absolute-value version of the inequality. The approach also indicates which hypotheses matter: real scalars allow the ordinary symmetric cross term \(-2t\langle\mathbf{x},\mathbf{y}\rangle\), and positive definiteness supplies both nonnegativity and the valid denominator when \(\mathbf{y}\ne\mathbf{0}\).

Common Pitfalls

Using the wrong sign in the cross term. For \(\mathbf{x}=(1,0)^{\top}\), \(\mathbf{y}=(1,1)^{\top}\), and \(t=1\), direct calculation gives \(\mathbf{x}-t\mathbf{y}=(0,-1)^{\top}\), so \(\|\mathbf{x}-t\mathbf{y}\|^2=1\). The correct expansion gives $$ \|\mathbf{x}\|^2-2t\langle\mathbf{x},\mathbf{y}\rangle+t^2\|\mathbf{y}\|^2 =1-2+2=1. $$ Replacing the minus sign with a plus sign would give \(1+2+2=5\), contradicting the direct calculation. The minus sign comes from expanding \(\mathbf{x}-t\mathbf{y}\); symmetry combines the two cross terms into \(-2t\langle\mathbf{x},\mathbf{y}\rangle\).

Dividing when \(\mathbf{y}=\mathbf{0}\). If \(\mathbf{x}=(1,2)^{\top}\) and \(\mathbf{y}=(0,0)^{\top}\) in the standard inner product, then \(\langle\mathbf{x},\mathbf{y}\rangle=0\) and \(\|\mathbf{y}\|^2=0\). Substituting into \(t=\dfrac{\langle\mathbf{x},\mathbf{y}\rangle}{\|\mathbf{y}\|^2}\) would produce \(0/0\), which is undefined. The correction is to handle \(\mathbf{y}=\mathbf{0}\) separately: both sides of the inequality are zero. The minimizing formula is used only after establishing \(\mathbf{y}\ne\mathbf{0}\).

Check Your Understanding

Use the minimization argument and the inner product axioms to justify your answers.

  1. For nonzero \(\mathbf{y}\), expand \(\|\mathbf{x}-t\mathbf{y}\|^2\) and identify the coefficient of \(t^2\).
  2. Why is \(\|\mathbf{y}\|^2\) a valid denominator in the minimizing scalar formula when \(\mathbf{y}\ne\mathbf{0}\)?
  3. For the standard dot product, verify the inequality for \(\mathbf{x}=(1,0)^{\top}\) and \(\mathbf{y}=(1,1)^{\top}\).
  4. For \(f(x)=1\) and \(g(x)=x\) on \([0,1]\), compute the inner product and both norms, then check the inequality.
  5. Explain why the proof treats \(\mathbf{y}=\mathbf{0}\) separately before using the minimizing scalar.

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon