Cauchy–Schwarz Inequality Explained with Worked Examples

For any vectors and , , with equality exactly when the vectors are parallel. In components, .

Write 2x or 2*x to multiply, ^ for powers, and ; between simultaneous equations. You can also type factor, expand, derivative of, integrate … from a to b, limit … as x->0 or 15% of 80.

Try an example

Before you start

This page is easier if you are comfortable with:

What Cauchy–Schwarz inequality means

Since (see the scalar product) and , the inequality follows at once. Equality needs , so the vectors point along the same line (parallel vectors).

It is the reason the angle formula always gives a valid cosine, and it proves the triangle inequality for lengths. It also gives quick bounds in algebra, such as the largest value of on a circle.

A related inequality is the AM–GM inequality, and in statistics it shows that a correlation coefficient lies between and . In finite-dimensional spaces it is used in the Rayleigh quotient bounds.

What is it used for?

The Cauchy–Schwarz inequality says a dot product can never be bigger than the product of the two lengths. It is one of the most useful inequalities in mathematics.

How to use cauchy–schwarz inequality

  1. Compute the dot product.
  2. Compute the two lengths and multiply them.
  3. Compare the absolute value of the dot product with this product.
  4. If they are equal, the vectors are parallel.

Graph

|a · b| = |a||b||cos θ| never exceeds |a||b|equality (parallel)perpendicular02040608010012014016018000.20.40.60.811.2|a · b| = |a||b||cos θ| never exceeds |a||b|θ (degrees)|cos θ||cos θ|Graph with x from 0 to 180 and y from 0 to 1.2. Shows the curve |cos θ|; point equality (parallel) at (0, 1); point perpendicular at (90, 0).

The factor |cos θ| is never more than 1, and it equals 1 only when the vectors are parallel.

Worked examples

These examples are worked by hand, step by step, so you can compare your own working.

Example 1: three-component vectors

Check the inequality for , .

Worked example
Answer
32≤32.8332\le32.83
  1. Dot product
  2. Lengths

Example 2: equality for parallel vectors

Check , .

Worked example
Answer
10=10 (parallel)10=10\ \text{(parallel)}
  1. Dot product
  2. Lengths

Example 3: the form with squares

Verify for .

Worked example
Answer
121≤125121\le125
  1. Left side
  2. Right side

Special cases

A few situations come up again and again. Knowing them saves time and helps you spot answers that cannot be right.

a = (1, 2), b = (3, 4)

(a·b)²

121.

same

|a|²|b|²

125.

a = (1, 2), b = (2, 4)

both sides

100 = 100.

a = (3, 0), b = (0, 5)

(a·b)²

0.

Word problems

|a·b| ≤ |a||b|, with equality iff a and b are parallel. In components, (a₁b₁ + a₂b₂)² ≤ (a₁² + a₂²)(b₁² + b₂²).

Left side

(1·3 + 2·4)².

  1. 11²
  2. Check: ✓121

Right side

(1 + 4)(9 + 16).

  1. 5 × 25
  2. Check: 121 ≤ 125 ✓125

Parallel vectors Higher

b = 2a: (2 + 8)².

  1. 100
  2. Check: = 5 × 20 ✓100

Perpendicular Higher

a·b = 0.

  1. 0
  2. Check: ✓0

Common mistakes

Strict always

< ✗

≤ ✓

Equality for parallel.

Forgetting the squares

a·b ≤ |a||b|² ✗

(a·b)² ≤ |a|²|b|² ✓

Consistent.

Applies to angles > 90° only

restricted ✗

any angle ✓

|cos θ| ≤ 1.

Equal when perpendicular

equal ✗

perpendicular gives a·b = 0 ✓

Equality at parallel.

Exam tips

  1. |a·b| ≤ |a||b|.
  2. Equality iff parallel.
  3. Follows from |cos θ| ≤ 1.
  4. Use for bounds.
  5. Check with small vectors.

Practice questions

Try each one on paper, then open the answer. Use the solver above to see the full working.

1. (a·b)²: a = (2, 1), b = (1, 3) Foundation

25

2. |a|²|b|²: a = (2, 1), b = (1, 3) Foundation

50

3. Slack: |a|²|b|² − (a·b)² for the same Foundation

25

4. (a·b)²: a = (1, 1, 1), b = (1, 2, 3) Higher

36

5. |a|²|b|²: a = (1, 1, 1), b = (1, 2, 3) Higher

42

6. Slack for a = (1, 0), b = (1, 1) Higher

1

Practice generator

Unlimited fresh questions with instant marking. Choose a level, work it out on paper, then type your answer.

Solve: …

Key terms

Cauchy–Schwarz inequality
Scalar product
a·b.
Magnitude
Parallel vectors
Equality case.
Perpendicular
a·b = 0.
Component form
Sum of products.

Frequently asked questions

What is the Cauchy–Schwarz inequality?

|a·b| ≤ |a||b|.

When is there equality?

When a and b are parallel.

Why is it true?

Because |cos θ| ≤ 1.

What is the component form?

(Σaᵢbᵢ)² ≤ (Σaᵢ²)(Σbᵢ²).

Which page covers the scalar product?

scalar product.

Which page covers AM–GM?

AM–GM inequality.

More in Vectors and matrices and the formula sheets.