Mathwords logoMathwords

Schwarz's Inequality — Definition, Formula & Examples

Schwarz's Inequality states that the absolute value of the inner product of two vectors (or the sum of products of corresponding terms) is always less than or equal to the product of their magnitudes. It provides a fundamental upper bound that appears throughout linear algebra, analysis, and probability.

For vectors u\mathbf{u} and v\mathbf{v} in an inner product space, u,v2u,uv,v|\langle \mathbf{u}, \mathbf{v} \rangle|^2 \leq \langle \mathbf{u}, \mathbf{u} \rangle \cdot \langle \mathbf{v}, \mathbf{v} \rangle, with equality holding if and only if u\mathbf{u} and v\mathbf{v} are linearly dependent. This is also known as the Cauchy–Schwarz inequality.

Key Formula

(i=1naibi)2(i=1nai2)(i=1nbi2)\left(\sum_{i=1}^{n} a_i b_i\right)^2 \leq \left(\sum_{i=1}^{n} a_i^2\right)\left(\sum_{i=1}^{n} b_i^2\right)
Where:
  • aia_i = Components of the first vector or sequence of real numbers
  • bib_i = Components of the second vector or sequence of real numbers
  • nn = Number of components

How It Works

In the finite-dimensional real case, the inequality says (aibi)2(ai2)(bi2)\left(\sum a_i b_i\right)^2 \leq \left(\sum a_i^2\right)\left(\sum b_i^2\right). To verify or apply it, compute each side separately and confirm the left side does not exceed the right. Equality occurs precisely when one list of values is a constant multiple of the other, meaning ai=kbia_i = k \cdot b_i for all ii. The inequality also justifies why the cosine formula cosθ=uvuv\cos\theta = \frac{\mathbf{u} \cdot \mathbf{v}}{\|\mathbf{u}\|\,\|\mathbf{v}\|} always produces a value between 1-1 and 11.

Worked Example

Problem: Verify Schwarz's Inequality for a = (1, 2, 3) and b = (4, 5, 6).
Compute the inner product: Find the dot product of the two vectors.
ab=1(4)+2(5)+3(6)=4+10+18=32a \cdot b = 1(4) + 2(5) + 3(6) = 4 + 10 + 18 = 32
Compute the left side: Square the inner product.
(ab)2=322=1024(a \cdot b)^2 = 32^2 = 1024
Compute the right side: Find the product of the squared magnitudes.
(12+22+32)(42+52+62)=(14)(77)=1078\left(1^2 + 2^2 + 3^2\right)\left(4^2 + 5^2 + 6^2\right) = (14)(77) = 1078
Answer: Since 102410781024 \leq 1078, the inequality holds. Equality does not hold because (1,2,3)(1,2,3) is not a scalar multiple of (4,5,6)(4,5,6).

Why It Matters

Schwarz's Inequality is a prerequisite for proving the triangle inequality in normed spaces and for defining angles between vectors in any dimension. It appears directly in courses on linear algebra, real analysis, and quantum mechanics, and underpins results in statistics such as the correlation coefficient always lying between 1-1 and 11.

Common Mistakes

Mistake: Forgetting to square the inner product on the left side and comparing ab|a \cdot b| directly to a2b2\|a\|^2 \|b\|^2.
Correction: The standard form compares (ab)2(a \cdot b)^2 to a2b2\|a\|^2\|b\|^2. Equivalently, you can compare ab|a \cdot b| to ab\|a\|\,\|b\| (without squaring the norms), but be consistent on both sides.