Additional Topics for the TMUA

Cauchy-Schwarz and AM-GM Inequalities

What you will get from this section. You will learn two useful forms of the Cauchy-Schwarz inequality and the two-variable AM-GM inequality. More importantly, you will learn the kinds of expressions that should make you think of using them. Neither inequality is difficult to prove in the forms we need. In fact, both ultimately come from the very familiar fact that a square cannot be negative.

TMUA Relevance Score: 3/10

Cauchy-Schwarz inequality

For our purposes, we will discuss the following form of the Cauchy-Schwarz inequality:

Proof

The proof is based on the fact that a square is always non-negative. We consider the difference of the two sides:

(a2+b2)(x2+y2)(ax+by)2=a2y2+b2x22abxy=(aybx)2,(a^2+b^2)(x^2+y^2)-(ax+by)^2 = a^2y^2+b^2x^2-2abxy=(ay-bx)^2,

which is a square and is therefore greater than or equal to 00. So

(a2+b2)(x2+y2)(ax+by)20(a2+b2)(x2+y2)(ax+by)2.(a^2+b^2)(x^2+y^2)-(ax+by)^2 \ge 0 \quad\Leftrightarrow\quad (a^2+b^2)(x^2+y^2)\ge (ax+by)^2.

Note that equality occurs exactly when (aybx)2=0(ay-bx)^2=0, so when ay=bxay=bx, or when the pairs (a,b)(a,b) and (x,y)(x,y) are proportional.

The general Cauchy-Schwarz inequality

Cauchy-Schwarz extends to any number of real numbers. For real numbers a1,,an,x1,,xna_1,\ldots,a_n,x_1,\ldots,x_n,

(a12++an2)(x12++xn2)(a1x1++anxn)2.(a_1^2+\cdots+a_n^2)(x_1^2+\cdots+x_n^2) \ge (a_1x_1+\cdots+a_nx_n)^2.

Equality occurs when the two lists of numbers are proportional.

We will not prove the general result here, but it is included here for completeness.

Example 1

Suppose x2+y2=1x^2+y^2=1. Find the greatest possible value of 7x24y7x-24y.

Cauchy-Schwarz gives

(72+(24)2)(x2+y2)(7x24y)2625(7x24y)2,(7^2+(-24)^2)(x^2+y^2)\ge (7x-24y)^2 \quad\Rightarrow\quad 625 \ge (7x-24y)^2,

where the last step uses x2+y2=1x^2+y^2=1. Hence

257x24y.25 \ge 7x-24y.

The upper bound is attained when (x,y)(x,y) is a positive multiple of (7,24)(7,-24), which is clearly possible by inspection, without needing to find the exact values of xx and yy. Therefore the greatest possible value of 7x24y7x-24y is 2525.

Remark: This problem can alternatively be solved geometrically as finding the largest kk for which the line 7x24y=k7x-24y=k still meets the circle x2+y2=1x^2+y^2=1. This occurs when the line is tangent to the circle.

Example 2

For positive real numbers xx and yy, prove that

(x+y)(1x+1y)4.(x+y)\left(\frac{1}{x}+\frac{1}{y}\right)\ge 4.

Apply Cauchy-Schwarz to the pairs

(x,y)and(1x,1y).(\sqrt{x},\sqrt{y}) \quad\text{and}\quad \left(\frac{1}{\sqrt{x}},\frac{1}{\sqrt{y}}\right).

We obtain

(x+y)(1x+1y)(x1x+y1y)2=4.(x+y)\left(\frac{1}{x}+\frac{1}{y}\right) \ge \left(\sqrt{x}\frac{1}{\sqrt{x}}+\sqrt{y}\frac{1}{\sqrt{y}}\right)^2 =4.

This example illustrates the flexibility of the Cauchy-Schwarz inequality: it can be applied with many different choices of aa, bb, xx and yy, which is what makes it useful in a wide range of inequality problems.

Example 3

For x,y0x,y\ge 0, show that

x+y2(x+y).\sqrt{x}+\sqrt{y}\le \sqrt{2(x+y)}.

Apply Cauchy-Schwarz to the pairs (1,1)(1,1) and (x,y)(\sqrt{x},\sqrt{y}):

(12+12)(x+y)(x+y)2.(1^2+1^2)(x+y)\ge (\sqrt{x}+\sqrt{y})^2.

Therefore

2(x+y)(x+y)2.2(x+y)\ge (\sqrt{x}+\sqrt{y})^2.

Both sides are non-negative, so taking square roots gives

x+y2(x+y).\sqrt{x}+\sqrt{y}\le \sqrt{2(x+y)}.

Example 4

The point PP has coordinates (1,2)(1,2). Find the shortest distance from PP to the line

3x+4y=20.3x+4y=20.

Let (x,y)(x,y) be any point on the line. Its distance from PP is

(x1)2+(y2)2.\sqrt{(x-1)^2+(y-2)^2}.

Since 3x+4y=203x+4y=20,

3(x1)+4(y2)=9.3(x-1)+4(y-2)=9.

By Cauchy-Schwarz,

(32+42)((x1)2+(y2)2)(3(x1)+4(y2))2.(3^2+4^2)\left((x-1)^2+(y-2)^2\right) \ge \left(3(x-1)+4(y-2)\right)^2.

Hence

25((x1)2+(y2)2)81,25\left((x-1)^2+(y-2)^2\right)\ge 81,

so

(x1)2+(y2)295.\sqrt{(x-1)^2+(y-2)^2}\ge \frac{9}{5}.

Equality occurs when (x1,y2)(x-1,y-2) is proportional to (3,4)(3,4), so the bound can be attained.

Therefore the shortest distance from PP to the line is 95\frac{9}{5}.

Remark: This problem can, of course, also be solved by finding the line through PP perpendicular to the given line and then finding their point of intersection. Here, Cauchy-Schwarz did the heavy lifting without us having to approach the problem geometrically.

AM-GM inequality

Here is the AM-GM inequality for two positive real numbers aa and bb,

The name AM-GM simply refers to the fact that the arithmetic mean a+b2\frac{a+b}{2} is at least as large as the geometric mean ab\sqrt{ab}.

Proof

Since a,b>0a,b>0, both a\sqrt a and b\sqrt b are real. Therefore

(ab)20.(\sqrt a-\sqrt b)^2\ge 0.

Expanding gives

a+b2ab0a+b2aba+b2aba+b-2\sqrt{ab}\ge 0 \quad\Leftrightarrow\quad a+b\ge 2\sqrt{ab} \quad\Leftrightarrow\quad \frac{a+b}{2}\ge \sqrt{ab}

Equality occurs when a=b\sqrt a=\sqrt b, so when a=ba=b.

The general AM-GM inequality

AM-GM extends to any number of positive real numbers. For a1,a2,,an>0a_1,a_2,\ldots,a_n>0,

a1+a2++anna1a2ann.\frac{a_1+a_2+\cdots+a_n}{n}\ge \sqrt[n]{a_1a_2\cdots a_n}.

Equality occurs when a1=a2==ana_1=a_2=\cdots=a_n.

Again, we will not prove the general result here, but it is included here for completeness.

Example 5

For all positive real numbers aa and bb, the inequality

a3+b3cab(a+b)a^3+b^3\ge cab(a+b)

holds. Find the greatest possible value of the constant cc.

Viewing a3+b3a^3+b^3 as a polynomial in aa, notice that a=ba=-b is a root, so (a+b)(a+b) is a factor, and we can factorise the left-hand side:

a3+b3=(a+b)(a2ab+b2).a^3+b^3=(a+b)(a^2-ab+b^2).

Since a,b>0a,b>0, we may divide by the positive quantity ab(a+b)ab(a+b) to obtain

ab+ba1c.\frac{a}{b}+\frac{b}{a}-1\ge c.

By AM-GM,

ab+ba2abba=1.\frac{\frac{a}{b}+\frac{b}{a}}{2} \ge \sqrt{\frac{a}{b}\cdot\frac{b}{a}} =1.

Therefore

ab+ba2ab+ba11.\frac{a}{b}+\frac{b}{a}\ge 2 \quad \Leftrightarrow \quad \frac{a}{b}+\frac{b}{a}-1\ge 1.

Equality occurs when ab=ba\frac{a}{b}=\frac{b}{a}, which for positive aa and bb gives a=ba=b. Therefore the greatest possible value of cc is 11.

Example 6

Positive real numbers xx, yy, and zz satisfy

x+y+z=12.x+y+z=12.

Find the maximum possible value of xyzxyz.

Using the three-variable AM-GM inequality,

x+y+z3xyz3.\frac{x+y+z}{3}\ge \sqrt[3]{xyz}.

Since x+y+z=12x+y+z=12,

4xyz3.4\ge \sqrt[3]{xyz}.

Cubing both sides gives

xyz64.xyz\le 64.

Equality occurs when x=y=zx=y=z. Since their sum is 1212, equality occurs at

x=y=z=4.x=y=z=4.

Therefore the maximum possible value of xyzxyz is 6464.

Cauchy-Schwarz or AM-GM?

There is some overlap between what these inequalities can do, and occasionally a problem can be solved using either one. However, as a rough guide:

  • Think Cauchy-Schwarz when you see two sums of squares together with a linear combination, or when an expression can be rearranged into that structure.
  • Think AM-GM when you see positive quantities whose sum or product is fixed, especially expressions such as x+kxx+\frac{k}{x}.

Do not try to force either inequality into every optimisation problem. Completing the square, factorisation, or ordinary quadratic reasoning may still be simpler.

Summary

The two-variable Cauchy-Schwarz inequality for all real numbers a,b,x,ya,b,x,y is

The two-variable AM-GM inequality for a,b>0a, b>0 is

The general Cauchy-Schwarz inequality for all real numbers a1,,an,x1,,xna_1,\ldots,a_n,x_1,\ldots,x_n is

The general AM-GM inequality for a1,,an>0a_1,\ldots,a_n>0 is

For AM-GM, equality occurs when all the numbers are equal. For Cauchy-Schwarz, equality occurs when the two lists of numbers are proportional.

PDF versionQuestions · Solutions