Tutorials › Linear Algebra › Using Cauchy-Schwarz To Bound Inner Products

Inner Products and Norms · Tutorial 613 of 1000

Using Cauchy-Schwarz To Bound Inner Products

Learn to turn inner product expressions into exact upper and lower bounds by calculating the relevant norms rather than evaluating every term of the expression.

Intermediate 8 min read

What You'll Learn

  • Apply Cauchy–Schwarz to bound a real dot product using vector norms.
  • Bound weighted sums by incorporating positive weights into the norms.
  • Bound sums of matrix entry products with Frobenius norms.
  • Use integral norms to bound an integral of a product of functions.
  • Check a proposed bound and identify errors caused by omitting absolute values or weights.

From Inner Products to Bounds

An inner product can be difficult to calculate term by term, especially when it is a sum with many terms, a product of matrix entries, or an integral of a product of functions. Often the useful question is not the exact value, but how large the expression can be. The real Cauchy–Schwarz inequality answers this using only the norms of the two objects being paired.

For a real inner product space, the induced norm is defined by \(\|\mathbf{u}\|=\sqrt{\langle\mathbf{u},\mathbf{u}\rangle}\). In \(\mathbb{R}^n\) with the standard inner product, this is the Euclidean norm, and \(\langle\mathbf{u},\mathbf{v}\rangle=\mathbf{u}^{\top}\mathbf{v}\). We will use the real Cauchy–Schwarz inequality, established in the earlier material on the real Cauchy–Schwarz inequality.

Theorem (Real Cauchy–Schwarz inequality): In a real inner product space, for every pair of vectors \(\mathbf{u}\) and \(\mathbf{v}\), \[ |\langle\mathbf{u},\mathbf{v}\rangle|\leq \|\mathbf{u}\|\,\|\mathbf{v}\|. \] This includes the case where either vector is \(\mathbf{0}\). Equivalently, the inner product lies between \(-\|\mathbf{u}\|\|\mathbf{v}\|\) and \(\|\mathbf{u}\|\|\mathbf{v}\|\).

The absolute value matters: the inner product can be positive or negative. Once the norms are known, Cauchy–Schwarz gives a two-sided bound without requiring the inner product itself to be evaluated. For an upper bound alone, it gives \(\langle\mathbf{u},\mathbf{v}\rangle\leq\|\mathbf{u}\|\|\mathbf{v}\|\); for a bound on magnitude, retain the absolute value.

Dot Products and Weighted Sums

For columns \(\mathbf{x},\mathbf{y}\in\mathbb{R}^n\), the dot product is \(\mathbf{x}^{\top}\mathbf{y}\), and its bound is \(|\mathbf{x}^{\top}\mathbf{y}|\leq\|\mathbf{x}\|\|\mathbf{y}\|\). This is useful when the coordinates make the norms straightforward to calculate, even if expanding the dot product would involve many terms.

Worked Example: Bounding a Dot Product

Let \(\mathbf{x}=\begin{bmatrix}2\\-1\\2\end{bmatrix}\) and \(\mathbf{y}=\begin{bmatrix}1\\3\\-2\end{bmatrix}\). Bound \(|\mathbf{x}^{\top}\mathbf{y}|\) using the norms.

First calculate the squared norms from the coordinates:

$$ \|\mathbf{x}\|^2=2^2+(-1)^2+2^2=4+1+4=9,\qquad \|\mathbf{y}\|^2=1^2+3^2+(-2)^2=1+9+4=14. $$

Thus \(\|\mathbf{x}\|=3\) and \(\|\mathbf{y}\|=\sqrt{14}\). Applying Cauchy–Schwarz gives

$$ |\mathbf{x}^{\top}\mathbf{y}|\leq 3\sqrt{14}, \qquad -3\sqrt{14}\leq\mathbf{x}^{\top}\mathbf{y}\leq3\sqrt{14}. $$

Check: the norm calculations square to \(9\) and \(14\), respectively, and their product is \(3\sqrt{14}\), as used in the bound. If we additionally evaluate the dot product as a check, it is \(2-3-4=-5\); indeed, \(25\leq126=(3\sqrt{14})^2\).

Positive weights can be handled by absorbing their square roots into the coordinates. Suppose \(w_1,\dots,w_n\) are positive real numbers and \(a_i,b_i\) are real. The resulting bound is useful for weighted sums because it accounts for each weight in both norm factors.

Theorem (Weighted Cauchy–Schwarz bound): For positive real weights \(w_1,\dots,w_n\) and real numbers \(a_1,\dots,a_n,b_1,\dots,b_n\), \[ \left|\sum_{i=1}^{n}w_i a_i b_i\right| \leq \left(\sum_{i=1}^{n}w_i a_i^2\right)^{1/2} \left(\sum_{i=1}^{n}w_i b_i^2\right)^{1/2}. \]

Proof. Form the real columns \(\mathbf{u}=(\sqrt{w_1}a_1,\dots,\sqrt{w_n}a_n)^{\top}\) and \(\mathbf{v}=(\sqrt{w_1}b_1,\dots,\sqrt{w_n}b_n)^{\top}\). Their dot product is \(\mathbf{u}^{\top}\mathbf{v}=\sum_{i=1}^{n}w_i a_i b_i\), while \(\|\mathbf{u}\|^2=\sum_{i=1}^{n}w_i a_i^2\) and \(\|\mathbf{v}\|^2=\sum_{i=1}^{n}w_i b_i^2\). Applying real Cauchy–Schwarz to \(\mathbf{u}\) and \(\mathbf{v}\) proves the stated inequality. \(\square\)

Worked Example: A Weighted Sum

Use weights \(w_1=1,w_2=2,w_3=3\), with \(a_1=1,a_2=-2,a_3=1\) and \(b_1=2,b_2=1,b_3=-1\), to bound the magnitude of \(\sum_{i=1}^{3}w_i a_i b_i\).

The first weighted sum of squares is

$$ \sum_{i=1}^{3}w_i a_i^2 =1(1^2)+2((-2)^2)+3(1^2) =1+8+3=12. $$

The second is

$$ \sum_{i=1}^{3}w_i b_i^2 =1(2^2)+2(1^2)+3((-1)^2) =4+2+3=9. $$

Therefore the bound is \(\sqrt{12}\sqrt{9}=2\sqrt{3}\cdot3=6\sqrt{3}\). Hence \(\left|\sum_{i=1}^{3}w_i a_i b_i\right|\leq6\sqrt{3}\). Check: the sum itself is \(1(1)(2)+2(-2)(1)+3(1)(-1)=2-4-3=-5\), and \(25\leq108=(6\sqrt{3})^2\).

Matrix Entry Products

For real matrices \(\mathbf{A},\mathbf{B}\) of the same size, their Frobenius inner product is the sum of products of corresponding entries. The Frobenius norm is the square root of the sum of squared entries. These definitions make a matrix a vector of its entries for the purpose of applying Cauchy–Schwarz. The matrix sizes must agree so that corresponding entries can be paired.

Consequence: If \(\mathbf{A},\mathbf{B}\in\mathbb{R}^{m\times n}\), then \[ \left|\sum_{i=1}^{m}\sum_{j=1}^{n}a_{ij}b_{ij}\right| \leq \left(\sum_{i=1}^{m}\sum_{j=1}^{n}a_{ij}^{2}\right)^{1/2} \left(\sum_{i=1}^{m}\sum_{j=1}^{n}b_{ij}^{2}\right)^{1/2}. \]

To justify this consequence, list the \(mn\) entries of each matrix in the same order as coordinates of two real columns. Their dot product is exactly the sum on the left, and their Euclidean norms are the two factors on the right. Real Cauchy–Schwarz therefore applies, including when one of the matrices is zero.

Worked Example: Bounding a Matrix Entry Product

Let \(\mathbf{A}=\begin{bmatrix}1&2\\-1&2\end{bmatrix}\) and \(\mathbf{B}=\begin{bmatrix}2&0\\1&-2\end{bmatrix}\). Bound the magnitude of the sum of products of corresponding entries.

For \(\mathbf{A}\), the squared Frobenius norm is \(1^2+2^2+(-1)^2+2^2=1+4+1+4=10\), so its Frobenius norm is \(\sqrt{10}\). For \(\mathbf{B}\), the squared Frobenius norm is \(2^2+0^2+1^2+(-2)^2=4+0+1+4=9\), so its Frobenius norm is \(3\). Cauchy–Schwarz gives

$$ |1(2)+2(0)+(-1)(1)+2(-2)|\leq\sqrt{10}\cdot3=3\sqrt{10}. $$

Check: the entry-product sum is \(2+0-1-4=-3\), and \(9\leq90=(3\sqrt{10})^2\). The computed sum satisfies the bound.

Integrals of Products

Let \(f\) and \(g\) be real continuous functions on a closed interval \([a,b]\). With the integral inner product \(\langle f,g\rangle=\int_a^b f(t)g(t)\,dt\), the induced norm is \(\|f\|=\left(\int_a^b f(t)^2\,dt\right)^{1/2}\). The real Cauchy–Schwarz inequality in this inner product gives an integral bound. Continuity ensures these integrals exist; the same inequality applies in any real inner product function space where the functions have finite norms.

Integral bound: For real continuous \(f,g\) on \([a,b]\), \[ \left|\int_a^b f(t)g(t)\,dt\right| \leq \left(\int_a^b f(t)^2\,dt\right)^{1/2} \left(\int_a^b g(t)^2\,dt\right)^{1/2}. \]

This follows by using \(f\) and \(g\) as the two vectors in the real inner product space of continuous functions on \([a,b]\), with the integral inner product just defined. The right-hand side requires the two squared-norm integrals, but not the integral of the product.

Worked Example: Bounding an Integral

On \([0,1]\), use the integral bound for \(f(t)=t\) and \(g(t)=1-t\).

Calculate the two squared-norm integrals separately:

$$ \int_0^1 f(t)^2\,dt=\int_0^1 t^2\,dt=\left[\frac{t^3}{3}\right]_0^1=\frac13, $$

and

$$ \int_0^1 g(t)^2\,dt =\int_0^1(1-t)^2\,dt =\int_0^1(1-2t+t^2)\,dt =\left[t-t^2+\frac{t^3}{3}\right]_0^1 =\frac13. $$

Thus Cauchy–Schwarz gives \(\left|\int_0^1 t(1-t)\,dt\right|\leq\sqrt{1/3}\sqrt{1/3}=1/3\). Check: evaluating the integral gives \(\int_0^1(t-t^2)\,dt=\left[t^2/2-t^3/3\right]_0^1=1/2-1/3=1/6\), and \(1/6\leq1/3\).

Common Pitfalls and a Practical Method

Omitting the absolute value can invalidate a magnitude bound. For example, with \(\mathbf{u}=\begin{bmatrix}1\\0\end{bmatrix}\) and \(\mathbf{v}=\begin{bmatrix}-2\\0\end{bmatrix}\), a tempting but wrong claim is \(\mathbf{u}^{\top}\mathbf{v}\leq-\|\mathbf{u}\|\|\mathbf{v}\|\). The left side is \(-2\), while the right side is \(-2\), so this particular example is equality; it does not establish a general lower bound. A wrong calculation that does fail is \(\mathbf{u}=\begin{bmatrix}1\\0\end{bmatrix}\), \(\mathbf{v}=\begin{bmatrix}-1\\1\end{bmatrix}\): claiming \(\mathbf{u}^{\top}\mathbf{v}\leq-\|\mathbf{u}\|\|\mathbf{v}\|\) says \(-1\leq-\sqrt{2}\), which is false. The correction is to use the valid two-sided statement \(-\|\mathbf{u}\|\|\mathbf{v}\|\leq\mathbf{u}^{\top}\mathbf{v}\leq\|\mathbf{u}\|\|\mathbf{v}\|\), or equivalently its absolute-value form.

Do not drop positive weights. In a weighted sum the bound involves \(\sum w_i a_i^2\) and \(\sum w_i b_i^2\), not unweighted sums. For the weighted example above, using unweighted norms would give \(\sqrt{1+4+1}\sqrt{4+1+1}=6\), while the correct weighted bound is \(6\sqrt{3}\). The smaller number is not justified by the weighted Cauchy–Schwarz inequality. Incorporate each weight, or explicitly transform the coordinates by \(\sqrt{w_i}\).

For a new expression, first identify the two objects being paired and the inner product that produces the expression. Then calculate their norms, keeping any weights, matrix entries, or integral domain intact. Apply Cauchy–Schwarz, and finally check that the inequality concerns the intended quantity: an absolute value for a magnitude bound, or a one-sided inequality if only an upper or lower bound is needed.

Check Your Understanding

For each question, identify the relevant norms before applying the inequality. Verify any numerical bound by substituting the expression or checking the norm calculations.

  1. Bound \(|\mathbf{x}^{\top}\mathbf{y}|\) for \(\mathbf{x}=\begin{bmatrix}1\\2\end{bmatrix}\) and \(\mathbf{y}=\begin{bmatrix}-2\\1\end{bmatrix}\).
  2. Use weights \(w_1=2,w_2=5\) to bound \(|2a_1b_1+5a_2b_2|\) in terms of weighted sums of squares.
  3. What norm factors bound the magnitude of the sum of corresponding entries of two real \(2\times3\) matrices?
  4. On \([0,1]\), use integral norms to bound \(\left|\int_0^1 t\cdot 1\,dt\right|\).
  5. Explain why the estimate for a dot product's magnitude must use an absolute value, and write the corresponding two-sided inequality.

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