throughout our mathematical journey, equalities are always the very basics of most conclusion, and that is also which we start to learn math for. However, inequalities are not such a know thing as equalities. Inequalities have many tricky characteristics so that we have to take with care, or things could go wrong. This chapter covers the fundamentals of inequality as a crucial tool for problem-solving in Computer Science.

Inequality basics

We all know about inequalities, and the first thing to clarify is the relationship between sizes. How to determine the size relationship between certain numbers? Since the basis for comparing “numbers” with each other corresponds to one, it is stipulated on the number line that the points increase from left to right, and therefore the numbers they represent increase in turn. Listed in ascending order, that is:

Let a,ba, b be two real numbers, and the points on the number line are denoted as A,BA, B respectively. If AA is to the right of BB, we say a>ba > b; if AA is to the left of BB, we say a<ba < b; if AA coincides with BB, we say a=ba = b.

Thus, for any two real numbers, one and only one of the following three situations must hold:

a>b;a=b;a<b.a > b; \quad a = b; \quad a < b.

The above relationship is also known as the one-dimensional coordinate law.

a>bab>0a<bab<0a=bab=0\begin{aligned} a > b &\Leftrightarrow a - b > 0 \\ a < b &\Leftrightarrow a - b < 0 \\ a = b &\Leftrightarrow a - b = 0 \end{aligned}

Where the symbol "\Leftrightarrow" (double arrow), read as “if and only if,” means that the truth of two propositions depends on each other. That is to say, if one proposition is true, then the other proposition is also true; conversely, if one proposition is false, then the other proposition is also false.

Based on the derivation of inequalities, in most cases, the above principles are sufficient. The following mathematical laws involve the geometric and algebraic meanings of the sizes of real numbers and the relationship between them. They are the basis for comparing the sizes of two real numbers and for proving inequalities by comparison. Let’s review some basic properties of inequalities that are the foundation for our further study.

  • Symmetry: a>ba > b if and only if b<ab < a.

  • Transitivity: If a>ba > b and b>cb > c, then a>ca > c.

  • Addition (Subtraction): If a>ba > b, then a+c>b+ca + c > b + c.

  • Multiplication (Division): If a>ba > b and c>0c > 0, then ac>bcac > bc; if a>ba > b and c<0c < 0, then ac<bcac < bc.

  • Exponentiation: If a>ba > b, then an>bna^n > b^n, where nn is a positive integer, and n2n \geq 2.

  • Root Extraction (Power Root): If a>b>0a > b > 0, then an>bn\sqrt[n]{a} > \sqrt[n]{b}, where nn is a positive integer, and n2n \geq 2.

  • If a>ba > b and c>dc > d, then a+c>b+da + c > b + d.

  • If a>b>0a > b > 0 and c>d>0c > d > 0, then ac>bdac > bd.

Exercises

Exercise

Explain the following statement.

  1. If a>ba > b, then ac>bc\frac{a}{c} > \frac{b}{c};

  2. If ac<bcac < bc, then a<ba < b;

  3. If a<ba < b, then 1a>1b\frac{1}{a} > \frac{1}{b};

  4. If ac2>bc2ac^2 > bc^2, then a>ba > b;

  5. If a>ba > b, then an>bna^n > b^n.

Solution:

  1. If c>0c > 0, multiplying both sides of a>ba > b by the positive number 1c\frac{1}{c} preserves the inequality, hence ac>bc\frac{a}{c} > \frac{b}{c}. If c<0c < 0, the direction of the inequality would be reversed, which is not given in the condition, hence we assume c>0c > 0.

  2. Dividing both sides of ac<bcac < bc by cc (assuming c0c \neq 0), we get a<ba < b because division by a positive number preserves the inequality, and division by a negative number reverses it.

  3. Taking the reciprocal of both sides of a<ba < b reverses the inequality because aa and bb are on opposite sides of the fraction line, hence 1a>1b\frac{1}{a} > \frac{1}{b} (assuming a,b>0a, b > 0 to avoid division by zero).

  4. Dividing both sides of ac2>bc2ac^2 > bc^2 by c2c^2 (assuming c0c \neq 0) preserves the inequality, hence a>ba > b because c2c^2 is positive regardless of whether cc is positive or negative.

  5. Raising both sides of a>ba > b to a power nn (assuming nn is a positive integer) preserves the inequality because both aa and bb are raised to the same power, hence an>bna^n > b^n.

Exercise

Given the inequality a>b>0a > b > 0, c<d<0c < d < 0, f<0f < 0, show that: fac>fbd.\frac{f}{a - c} > \frac{f}{b - d}.

Proof

Since a>b>0a > b > 0 and c<d<0c < d < 0, then ac>bda - c > b - d because subtracting a smaller negative number is the same as adding a larger positive number. Given that f<0f < 0, when dividing by a larger positive number, the result is smaller because a negative number divided by a positive number yields a negative result, and the further away the divisor is from zero, the smaller the quotient.

Therefore: fac>fbd.\frac{f}{a - c} > \frac{f}{b - d}.

Solving Quadratic Inequality

Recall that, when we solve Quadratic equations, we use discriminant to solve equations, which is also applicable to inequalities. For a quadratic inequality of the form ax2+bx+c>0ax^2 + bx + c > 0 or ax2+bx+c<0ax^2 + bx + c < 0 (where a>0a > 0), the solution set can be determined by the discriminant Δ=b24ac\Delta = b^2 - 4ac:

  1. If Δ>0\Delta > 0, the quadratic equation ax2+bx+c=0ax^2 + bx + c = 0 has two distinct real roots x1x_1 and x2x_2, and x1<x2x_1 < x_2. The solution set for y=ax2+bx+cy = ax^2 + bx + c being greater than zero (when y=0y = 0) is for values of xx either less than x1x_1 or greater than x2x_2, and the solution set for ax2+bx+c<0ax^2 + bx + c < 0 is {xx1<x<x2}\{ x \mid x_1 < x < x_2 \}.

  2. If Δ=0\Delta = 0, then ax2+bx+c=0ax^2 + bx + c = 0 has one real root, specifically x1=x2=b2ax_1 = x_2 = -\frac{b}{2a}. The solution set for y=ax2+bx+cy = ax^2 + bx + c being greater than zero is all xx except xb2ax \neq -\frac{b}{2a}, and there is no solution set where ax2+bx+c<0ax^2 + bx + c < 0.

  3. If Δ<0\Delta < 0, then ax2+bx+c=0ax^2 + bx + c = 0 has no real roots, and the parabola y=ax2+bx+cy = ax^2 + bx + c does not intersect the x-axis. The solution set for ax2+bx+c>0ax^2 + bx + c > 0 is all real numbers, and there is no solution set where ax2+bx+c<0ax^2 + bx + c < 0.

Figure pending: Quadratic function graphs based on the discriminant.

Example

Solve the following quadratic inequalities:

  1. 4x2+6x+2<04x^2 + 6x + 2 < 0;

  2. 4x2+4x+1<04x^2 + 4x + 1 < 0;

  3. 3x2+x6<0-3x^2 + x - 6 < 0.

Solution:

  1. The discriminant Δ=624×4×2=4>0\Delta = 6^2 - 4 \times 4 \times 2 = 4 > 0, so the quadratic equation 4x2+6x+2=04x^2 + 6x + 2 = 0 has two real roots x1=1x_1 = -1, x2=12x_2 = -\frac{1}{2}. Hence, the solution set for the inequality is x(,1)(12,)x \in \left(-\infty, -1\right) \cup \left(-\frac{1}{2}, \infty\right).

  2. The discriminant Δ=424×4×1=0\Delta = 4^2 - 4 \times 4 \times 1 = 0, so the quadratic equation 4x2+4x+1=04x^2 + 4x + 1 = 0 has one real double root. Therefore, the inequality has no solution set.

  3. The discriminant Δ=124×(3)×(6)=71<0\Delta = 1^2 - 4 \times (-3) \times (-6) = -71 < 0, so the quadratic equation 3x2+x6=0-3x^2 + x - 6 = 0 has no real roots. Therefore, the solution set for the inequality 3x2x+6>03x^2 - x + 6 > 0 is all real numbers, and thus the solution set for the given inequality is also all real numbers.

important Inequalities

In this part, we explore two fundamental inequalities in mathematics: the Triangle Inequality and the Arithmetic-Geometric Mean (AGM) Inequality. Each section provides a comprehensive overview, including detailed proofs and corollaries.

The Triangle Inequality

The Triangle Inequality is a fundamental relation in geometry and analysis, asserting that the sum of the lengths of any two sides of a triangle must be greater than or equal to the length of the remaining side.

Definition

For any real numbers aa and bb, the Triangle Inequality is given by: a+ba+b|a + b| \leq |a| + |b|

Proof

The proof of the Triangle Inequality considers the sign of aa and bb:

  • Case 1: If aa and bb have the same sign, the inequality follows directly.

  • Case 2: If aa and bb have opposite signs, assume a>0a > 0 and b<0b < 0. Then, a+bab=a+b|a + b| \leq a - b = |a| + |b|.

Thus, the Triangle Inequality is proven.

Remark

This important inequality will also be seen in other chapters.

We also have the following conclusion by preliminary algebra: a+ba+ba+b2(a+b)2(a+b)2a2+2ab+b2a2+2ab+b2a2+2ab+b2abababab.\begin{aligned} |a{+}b|{\leqslant}|a|+|b|& \Leftrightarrow|a{+}b|^2{\leqslant}(|a|{+}|b|)^2 \\ &\Leftrightarrow(a+b)^2\leqslant|a|^2+2|a||b|+|b|^2 \\ &\Leftrightarrow a^2+2ab+b^2\leqslant a^2+2|a|\mid b|+b^2 \\ &\Leftrightarrow ab{\leqslant}|a|\left|b\right| \\ &\Leftrightarrow ab\leqslant\lvert ab\rvert. \end{aligned} The quality holds only when ab0ab \geq 0.

Geometric Explanation of Triangular Inequality

Consider aa and bb are random numbers on a number axis:

  • If ab0ab \geq 0, then they are both in the same half-axis (both positive or negative). In this case, the distance between aa and b-b is the sum of the distance from both points to the origin of the number axis.

  • Now consider ab<0ab < 0, either of them is positive, and the other is negative. In this case, the distance between aa and b-b is shorter than the sum of the distance from both points to the origin of the number axis.

Figure pending: Triangular Inequality: ab < 0

We also have:

Theorem

For a,b,cRa, b, c\in \mathbb{R}, acab+bc|a-c|\leq |a-b| + |b-c|.

Figure pending: AGM when x2 = 0

As we increase the x2\displaystyle x_{2} value, the GM curve rise up, and the intersection moves on the right direction, remaining on the AM curve. Below is the visualization for x2=5\displaystyle x_{2} =5. There is no any overlap between graphs except the intersection (5,5)\displaystyle ( 5,5).

Figure pending: AGM when x2 = 5

Problem

Where will the intersection go if we have x2=10x_2 = 10 for this model?

Now, I think everything is clear, but only things so far. From now on, we will extend the understanding of function graph to a new dimension, in the 3 dimension space. Functions in the 3D space is extremely important for multi-variable calculus, and learning linear algebra also requires us to abstract numbers in more than 3 dimension, but goes up to n dimension space. But don’t worry, the discussion here only involve simple concepts.

We have three variables: x1,x2,yx_1, x_2, y, where yy is the value of AM or GM from x1x_1 and x2x_2. Coincidently, we have three coordinate axis in a 3D space. In the three-dimensional coordinate system, we assign two preimages x1x_1, x2x_2 to xx and yy axis, and the mean to the zz axis. In this way we can get two function graphs, or surface, in the real sense, in the coordinate, which look like in the figure below.

Figure pending: AGM 3D Visualization

The plane in blue represents the set of all possible arithmetic mean derived from all combinations of x1 and x2x_1 \text{ and }x_2 with x1,x2[0,10]x_1,x_2\in [0,10], and the other surface, almost below the AM plane, is exactly the geometric mean curve that has a similar definition to the former. This is quite different from the functions we have known, since they are only a line or a curve in the Cartesian coordinate, yet in the 3D coordinate, function could be surface. We will explore more about multi-variable functions in the future.

It is noticeable that the two surfaces are actually independent. They intersect in a line that go across the space. That specific line is actually a set of all the ordered pairs (x1,x2)(x_1,x_2) where x1=x2x_1 = x_2. We can actually relate it to the graph in the Cartesian coordinate. If we change the view point to the front of the curves shaped in the 3D space, we see something like this picture.

Figure pending: AGM 3D Visualization (Front)

Isn’t this quite similar to the 2D graph? Actually, the first image is exactly a horizontal cross-section of the 3D function graph, and the intersection in the 2D graph changes as the position of intersection line changes. These explain AGM inequality’s geometric meaning.

Conclusions of AGM inequality

AGM inequality has brought us to these conclusions:

Corollary

If x,y>0x, y > 0, then 2xyx+yxyx+y2.\frac{2xy}{x+y} \leq \sqrt{xy} \leq \frac{x+y}{2}. Equality holds in each inequality only when x=yx = y.

Proof

Proposition AGM yields xyx+y2\sqrt{xy} \leq \frac{x+y}{2}. We obtain the other inequality from this by multiplying both sides by the positive number 2xyx+y\frac{2\sqrt{xy}}{x+y}, leading to: xy2xyx+yx+y22xyx+y,\sqrt{xy} \cdot \frac{2\sqrt{xy}}{x+y} \leq \frac{x+y}{2} \cdot \frac{2\sqrt{xy}}{x+y}, which simplifies to: 2xyx+yxy.\frac{2xy}{x+y} \leq \sqrt{xy}. Thus, we have shown that 2xyx+yxyx+y2\frac{2xy}{x+y} \leq \sqrt{xy} \leq \frac{x+y}{2}, with equality if and only if x=yx = y.

The expression 2xyx+y\frac{2xy}{x+y} is the harmonic mean of xx and yy. It arises in the study of average rates. For example, consider traveling a distance dd at rate r1r_1 in time t1t_1 and making the return trip at rate r2r_2 in time t2t_2. The harmonic mean gives us the average rate rr for the full trip.

Assuming we travel the same distance dd for both trips, we have: r1t1=dr2t2=d\begin{aligned} r_1t_1 &= d \\ r_2t_2 &= d \end{aligned}

The average rate rr for the full trip is computed as follows: r=2dt1+t2=2ddr1+dr2=2dr1r2(t1+t2)r1r2=2r1r2r1+r2\begin{aligned} r &= \frac{2d}{t_1 + t_2} = \frac{2d}{\frac{d}{r_1} + \frac{d}{r_2}} = \frac{2d}{\frac{r_1r_2(t_1 + t_2)}{r_1r_2}} =\frac{2r_1r_2}{r_1 + r_2}\\ \end{aligned}

The other important corollary of AGM inequality is:

Corollary

a2+b22aba^2+b^2 \geq 2ab

Proof

a2+b22ab    a2+b22ab0    (ab)20.a^2 + b^2 \geq 2ab \iff a^2 + b^2 - 2ab \geq 0 \iff (a - b)^2 \geq 0.

Exercises

Exercise

Prove that for any triangle with sides aa, bb, and cc, the following inequality holds: ab+c+ba+c+ca+b>1\frac{a}{b + c} + \frac{b}{a + c} + \frac{c}{a + b} > 1

Proof

Given a triangle with sides aa, bb, and cc, we know that for any triangle, the sum of the lengths of any two sides is greater than the length of the third side. Therefore, a<b+ca < b + c, b<a+cb < a + c, and c<a+bc < a + b.

Now, consider the inequality ab+c>aa+b+c\frac{a}{b + c} > \frac{a}{a + b + c}. This is true because b+c>ab + c > a implies that the denominator of the left-hand side is smaller than that of the right-hand side while keeping the numerator constant.

Similarly, we can show that ba+c>ba+b+c\frac{b}{a + c} > \frac{b}{a + b + c} and ca+b>ca+b+c\frac{c}{a + b} > \frac{c}{a + b + c}.

Adding these three inequalities, we get: ab+c+ba+c+ca+b>a+b+ca+b+c\frac{a}{b + c} + \frac{b}{a + c} + \frac{c}{a + b} > \frac{a + b + c}{a + b + c}

Simplifying the right-hand side, we obtain: ab+c+ba+c+ca+b>1\frac{a}{b + c} + \frac{b}{a + c} + \frac{c}{a + b} > 1

Thus, the inequality is proven.

Exercise

Given ε>0\varepsilon > 0, if xa<ε4|x - a| < \frac{\varepsilon}{4} and yb<ε6|y - b| < \frac{\varepsilon}{6}, prove that:

2x+3y2a3b<ε.|2x + 3y - 2a - 3b| < \varepsilon.

Hint: Rearrange it in a form that is good for using triangle inequality.

Proof

2x+3y2a3b=2(xa)+3(yb)2(xa)+3(yb)=2xa+3yb<2×ε4+3×ε6=ε.\begin{aligned} |2x + 3y - 2a - 3b| &= |2(x - a) + 3(y - b)| \\ &\leq |2(x - a)| + |3(y - b)| \\ &= 2|x - a| + 3|y - b| \\ &< 2 \times \frac{\varepsilon}{4} + 3 \times \frac{\varepsilon}{6} \\ &= \varepsilon. \end{aligned}

Exercise

Prove for any real numbers a,b,c,da, b, c, d that: ab+bc+cd+daac+bd|a - b| + |b - c| + |c - d| + |d - a| \geq |a - c| + |b - d|

Proof
  1. Application of the Triangle Inequality: The triangle inequality states that for any real numbers x,y,zx, y, z: xyxz+zy|x - y| \leq |x - z| + |z - y| We can apply this inequality to certain terms in our original problem. For example, consider ac|a - c| and bd|b - d|.

  2. Separate Applications of the Triangle Inequality: For ac|a - c|, we have: acab+bc|a - c| \leq |a - b| + |b - c| For bd|b - d|, we have: bdbc+cd|b - d| \leq |b - c| + |c - d|

  3. Combining Inequalities: Adding the above two inequalities, we get: ac+bdab+2bc+cd|a - c| + |b - d| \leq |a - b| + 2|b - c| + |c - d|

  4. Simplification and Rearrangement: Notice that 2bc2|b - c| appears on the right side of the inequality. However, since bc|b - c| is non-negative, we can remove one bc|b - c| and the inequality still holds. Hence, we have: ac+bdab+bc+cd|a - c| + |b - d| \leq |a - b| + |b - c| + |c - d| This is the reverse of the inequality in our original problem, so we can conclude: ab+bc+cd+daac+bd|a - b| + |b - c| + |c - d| + |d - a| \geq |a - c| + |b - d|

  5. Conclusion: Therefore, the original inequality is proved.

Exercise

Prove that for any real numbers x,y,zx, y, z, the following inequality holds: x+y+zx+y+z|x + y + z| \leq |x| + |y| + |z|

Proof

We will use the triangle inequality which states that for any real numbers aa and bb: a+ba+b|a + b| \leq |a| + |b|

First, apply the triangle inequality to xx and yy: x+yx+y|x + y| \leq |x| + |y|

Now, let a=x+ya = x + y and b=zb = z, and apply the triangle inequality again: (x+y)+zx+y+z|(x + y) + z| \leq |x + y| + |z|

Substitute the first inequality into the second one: x+y+zx+y+z|x + y + z| \leq |x| + |y| + |z|

This completes the proof.

Exercise

Prove that for any sequence of real numbers x1,x2,,xnx_1, x_2, \ldots, x_n, the following inequality holds: x1+x2++xnx1+x2++xn\left|x_1 + x_2 + \ldots + x_n\right| \leq \left|x_1\right| + \left|x_2\right| + \ldots + \left|x_n\right|

Proof

We will prove this by induction on the number of terms nn.

Base case (n=1n = 1): For a single real number x1x_1, the inequality trivially holds as: x1=x1\left|x_1\right| = \left|x_1\right|

Inductive step: Assume the inequality holds for some n=kn = k, i.e., x1+x2++xkx1+x2++xk\left|x_1 + x_2 + \ldots + x_k\right| \leq \left|x_1\right| + \left|x_2\right| + \ldots + \left|x_k\right| Now, consider the case when n=k+1n = k + 1. By the triangle inequality, we have: x1+x2++xk+xk+1x1+x2++xk+xk+1\left|x_1 + x_2 + \ldots + x_k + x_{k+1}\right| \leq \left|x_1 + x_2 + \ldots + x_k\right| + \left|x_{k+1}\right|

Using the induction hypothesis, we can then write: x1+x2++xk+xk+1(x1+x2++xk)+xk+1\left|x_1 + x_2 + \ldots + x_k + x_{k+1}\right| \leq \left(\left|x_1\right| + \left|x_2\right| + \ldots + \left|x_k\right|\right) + \left|x_{k+1}\right| x1+x2++xk+xk+1x1+x2++xk+xk+1\left|x_1 + x_2 + \ldots + x_k + x_{k+1}\right| \leq \left|x_1\right| + \left|x_2\right| + \ldots + \left|x_k\right| + \left|x_{k+1}\right|

This completes the inductive step and thus, by the principle of mathematical induction, the inequality holds for all positive integers nn.

Exercise

Let aa, bb, cc be positive real numbers. Prove the inequality: (a+b+c)(a2+b2+c2)>9abc.(a+b+c)(a^2+b^2+c^2) > 9abc.

Proof

By the Arithmetic Mean-Geometric Mean Inequality (AM-GM Inequality), we have: a2+b2+c23a2b2c23,\frac{a^2+b^2+c^2}{3} \geq \sqrt[3]{a^2b^2c^2}, a+b+c3abc3.\frac{a+b+c}{3} \geq \sqrt[3]{abc}.

Cubing both sides of the inequalities, we get: (a2+b2+c2)327a2b2c2,(a^2+b^2+c^2)^3 \geq 27a^2b^2c^2, (a+b+c)327abc.(a+b+c)^3 \geq 27abc.

Multiplying the resulting inequalities, we obtain: (a2+b2+c2)3(a+b+c)3(27a2b2c2)(27abc).(a^2+b^2+c^2)^3(a+b+c)^3 \geq (27a^2b^2c^2)(27abc).

Taking the cube root of both sides, we arrive at: (a2+b2+c2)(a+b+c)9abc.(a^2+b^2+c^2)(a+b+c) \geq 9abc.

Note that the inequality is strict when aa, bb, cc are positive real numbers, thus: (a2+b2+c2)(a+b+c)>9abc.(a^2+b^2+c^2)(a+b+c) > 9abc.

Exercise

Given non-negative real numbers a,b,ca, b, c such that a+b+c=1a + b + c = 1, we want to prove that: a2+b2+c213.a^2 + b^2 + c^2 \geq \frac{1}{3}.

Proof

We will use the Arithmetic Mean-Geometric Mean Inequality (AM-GM Inequality) which states that for any non-negative real numbers x,y,zx, y, z, the following holds: x+y+z3xyz3.\frac{x + y + z}{3} \geq \sqrt[3]{xyz}.

Applying this to a,b,ca, b, c, we have: a+b+c3abc313abc3.\frac{a + b + c}{3} \geq \sqrt[3]{abc} \Rightarrow \frac{1}{3} \geq \sqrt[3]{abc}.

Cubing both sides of the inequality yields: 127abc.\frac{1}{27} \geq abc.

Now, by AM-GM applied to a2,b2,c2a^2, b^2, c^2, we get: a2+b2+c23a2b2c23.\frac{a^2 + b^2 + c^2}{3} \geq \sqrt[3]{a^2b^2c^2}.

Since a2b2c2a^2b^2c^2 is the square of abcabc, it follows that: a2+b2+c23(abc)23.\frac{a^2 + b^2 + c^2}{3} \geq (abc)^{\frac{2}{3}}.

Given 127abc\frac{1}{27} \geq abc, we have: (abc)23(127)23=19.(abc)^{\frac{2}{3}} \leq \left(\frac{1}{27}\right)^{\frac{2}{3}} = \frac{1}{9}.

Therefore, we can conclude that: a2+b2+c2319.\frac{a^2 + b^2 + c^2}{3} \geq \frac{1}{9}.

Multiplying through by 3, we obtain the desired inequality: a2+b2+c213.a^2 + b^2 + c^2 \geq \frac{1}{3}.

Hence, we have proved that a2+b2+c213a^2 + b^2 + c^2 \geq \frac{1}{3} as required.

Exercise

Consider the function f(x,y,z)=xy+yz+zxf(x, y, z) = \frac{x}{y} + \frac{y}{z} + \frac{z}{x} for all positive real numbers x,y,x, y, and zz. Find the minimal value of the function.

Proof

For (x,y,z)(x, y, z) positive real numbers, we have f(x,y,z)=xy+yz+zxf(x, y, z) = \frac{x}{y} + \frac{y}{z} + \frac{z}{x} can be rewritten as f(x,y,z)=6(16xy+16yz+16zx+16xy+16yz+16zx)f(x, y, z) = 6 \cdot \left( \frac{1}{6} \cdot \frac{x}{y} + \frac{1}{6} \cdot \frac{y}{z} + \frac{1}{6} \cdot \frac{z}{x} + \frac{1}{6} \cdot \frac{x}{y} + \frac{1}{6} \cdot \frac{y}{z} + \frac{1}{6} \cdot \frac{z}{x} \right) Setting x1=xy,x2=x3=12yz,x4=x5=x6=13zxx_1 = \frac{x}{y}, x_2 = x_3 = \frac{1}{2} \cdot \frac{y}{z}, x_4 = x_5 = x_6 = \frac{1}{3} \cdot \frac{z}{x}, and applying the AM-GM inequality for n=6n = 6, we get f(x,y,z)6x1x2x3x4x5x66=6122333xyyzzx6f(x, y, z) \geq 6 \cdot \sqrt[6]{x_1 \cdot x_2 \cdot x_3 \cdot x_4 \cdot x_5 \cdot x_6} = 6 \cdot \sqrt[6]{\frac{1}{2 \cdot 2 \cdot 3 \cdot 3 \cdot 3} \cdot \frac{x}{y} \cdot \frac{y}{z} \cdot \frac{z}{x}} which simplifies to f(x,y,z)6122336=22/331/2f(x, y, z) \geq 6 \cdot \sqrt[6]{\frac{1}{2^2 \cdot 3^3}} = 2^{2/3} \cdot 3^{1/2} Further, we know that the two sides are equal exactly when all the terms of the mean are equal. Thus, f(x,y,z)=22/331/2f(x, y, z) = 2^{2/3} \cdot 3^{1/2} when xy=12yz=13zx\frac{x}{y} = \frac{1}{2} \cdot \frac{y}{z} = \frac{1}{3} \cdot \frac{z}{x} All the points (x,y,z)(x, y, z), satisfying these conditions lie on a half-line starting at the origin and are given by, (x,y,z)=(t,323t,323t)(x, y, z) = \left( t, \frac{3}{2}\sqrt{3}t, \frac{3}{2}\sqrt{3}t \right) with t>0t > 0.

Cauchy-Schwarz Inequality

Cauchy-Schwarz inequality is another important inequality that is used for mathematical proofs.

Theorem

Let a1,,ana_1, \ldots, a_n and b1,,bnb_1, \ldots, b_n be real numbers. Then (a1b1+a2b2)2(a12+a22)(b12+b22)(a_1b_1 + a_2b_2)^2 \leq (a_1^2 + a_2^2)(b_1^2 + b_2^2)

Proof
(a_1 + a_2)(b_1^2 + b_2^2) - (a_1b_1 + a_2b_2)^2 \geq 0$$ $$\Leftrightarrow a_1^2b_1^2 + a_2^2b_2^2 + a_1^2b_2^2 + a_2^2b_1^2 - a_1^2b_1^2 - a_2^2b_2^2 - 2a_1a_2b_1b_2 \geq 0$$ $$\Leftrightarrow a_1^2b_2^2 - 2a_1a_2b_1b_2 + a_2^2b_1^2 \geq 0$$ $$\Leftrightarrow (a_1b_2 - a_2b_1)^2 \geq 0$$ Hence, the equality holds if an only if when $a_1b_2=a_2b_1$.

This is not a difficult proof, but it does not show all the implications of the inequality, especially in geometry. Let’s take a look at how we can derive its vector form.

In the inequality of the inner product in vector space, let α\alpha and β\beta be the directed line segments determined by vectors a\mathbf{a} and b\mathbf{b} respectively, with terminal coordinates a1,a2a_1, a_2 and b1,b2b_1, b_2, and let α=(a1,a2),β=(b1,b2),\alpha = (a_1, a_2), \quad \beta = (b_1, b_2), Then, α\alpha and β\beta are not both zero, and the angle between them is denoted as α,β\langle \alpha, \beta \rangle, with the convention that 0α,βπ.0 \leq \langle \alpha, \beta \rangle \leq \pi. The cosα,β\cos \langle \alpha, \beta \rangle is called the cosine of the angle (inner product) between vectors α\alpha and β\beta, denoted as αβ\alpha \cdot \beta, and αβ=a1b1+a2b2,\alpha \cdot \beta = a_1b_1 + a_2b_2, α=αα=a12+a22,|\alpha| = \sqrt{\alpha \cdot \alpha} = \sqrt{a_1^2 + a_2^2}, β=ββ=b12+b22,|\beta| = \sqrt{\beta \cdot \beta} = \sqrt{b_1^2 + b_2^2}, Therefore, cosα,β=a1b1+a2b2a12+a22b12+b22,\cos\langle \alpha, \beta \rangle = \frac{a_1b_1 + a_2b_2}{\sqrt{a_1^2 + a_2^2} \sqrt{b_1^2 + b_2^2}}, cos2α,β=(a1b1+a2b2a12+a22b12+b22)21,\cos^2\langle \alpha, \beta \rangle = \left(\frac{a_1b_1 + a_2b_2}{\sqrt{a_1^2 + a_2^2} \sqrt{b_1^2 + b_2^2}}\right)^2 \leq 1, which implies (a12+a22)(b12+b22)(a1b1+a2b2)2,(a_1^2 + a_2^2)(b_1^2 + b_2^2) \geq (a_1b_1 + a_2b_2)^2, and since a12+a22b12+b22a1b1+a2b2.\sqrt{a_1^2 + a_2^2} \sqrt{b_1^2 + b_2^2} \geq |a_1b_1 + a_2b_2|.

It is evident that cos2α,β=1\cos^2\langle \alpha, \beta \rangle = 1 implies α,β=0\langle \alpha, \beta \rangle = 0 or π\pi, which corresponds to vectors α\alpha and β\beta being parallel or anti-parallel. When the angle is 0, vectors A and B are in the same direction, which is the condition for equality.

Theorem

Assume that α=(a1,a2)\alpha = (a_1, a_2) and β=(b1,b2)\beta = (b_1, b_2) are two planar vectors, then αβαβ|\alpha||\beta|\geq |\alpha \cdot \beta| and$$\sqrt{a_1^2 + a_2^2} \sqrt{b_1^2 + b_2^2} \geq |a_1b_1 + a_2b_2|

It is noticeable that when we take a2=b2=0a_2=b_2=0, we have a1+b1a1+b1|a_1|+|b_1|\geq|a_1+b_1| which is exactly the triangle inequality for vector that we have discussed earlier.

Rearrangement Inequality

This section introduces Rearrangement Inequality, whose direct conclusions are the QM-AM-GM-HM inequality.

We start with an example. Suppose there are four boxes containing $10, $20, $50 and $100 bills, respectively. You may take 2 bills from one box, 3 bills from another, 4 bills from another, and 5 bills from the remaining box. What is the maximum amount of money you can get?

Clearly, you’d want to take as many bills as possible from the box with largest-value bills! So you would take 5 $100 bills, 4 $50 bills, 3 $20 bills, and 2 $10 bills, for a grand total of 5 \cdot \100 + 4 \cdot $50 + 3 \cdot $20 + 2 \cdot $10 = $780.$

Suppose instead that your arch-nemesis (who isn’t very good at math) is picking the bills instead, and he asks you how many bills he should take from each box. In this case, to minimize the amount of money he gets, you’d want him to take as many bills as possible from the box with lowest-value bills. So you tell him to take 5 $10 bills, 4 $20 bills, 3 $50 bills, and 2 $100 bills, for a grand total of 5 \cdot \10 + 4 \cdot $20 + 3 \cdot $50 + 2 \cdot $100 = $480.$

The maximum is attained when the number of bills taken and the denominations are similarly sorted as in Eq. eq4.3 and the minimum is attained when they are oppositely sorted as in eq4.4. The Rearrangement Inequality formalizes this observation.

Theorem

Rearrangement Let x1,x2,,xnx_1, x_2, \ldots, x_n and y1,y2,,yny_1, y_2, \ldots, y_n be real numbers (not necessarily positive) with x1x2xn,andy1y2yn,x_1 \leq x_2 \leq \ldots \leq x_n, \quad \text{and} \quad y_1 \leq y_2 \leq \ldots \leq y_n, and let σ\sigma be a permutation of {1,2,,n}\{1, 2, \ldots, n\}. (That is, σ\sigma sends each of 1,2,,n1, 2, \ldots, n to a different value in {1,2,,n}\{1, 2, \ldots, n\}.) Then the following inequality holds: x1yn+x2yn1++xny1x1yσ(1)+x2yσ(2)++xnyσ(n)x1y1+x2y2++xnyn.x_1y_n + x_2y_{n-1} + \ldots + x_ny_1 \leq x_1y_{\sigma(1)} + x_2y_{\sigma(2)} + \ldots + x_ny_{\sigma(n)} \leq x_1y_1 + x_2y_2 + \ldots + x_ny_n.

Proof

We prove the inequality on the right by induction on nn. The statement is obvious for n=1n = 1. Suppose it true for n1n - 1. Let mm be an integer such that σ(m)=n\sigma(m) = n. Since xnxmandynyσ(n),x_n \geq x_m \quad \text{and} \quad y_n \geq y_{\sigma(n)}, we have 0(xnxm)(ynyσ(n))0 \leq (x_n - x_m)(y_n - y_{\sigma(n)}) \quad     xmyn+xnyσ(n)xmyσ(n)+xnyn.\implies x_my_n + x_ny_{\sigma(n)} \leq x_my_{\sigma(n)} + x_ny_n.

Hence x1yσ(1)++xmyσ(m)++xnyσ(n)x1yσ(1)++xmyn++xnyn.x_1y_{\sigma(1)} + \ldots + x_my_{\sigma(m)} + \ldots + x_ny_{\sigma(n)} \leq x_1y_{\sigma(1)} + \ldots + x_my_n + \ldots + x_ny_n.

By the induction hypothesis, x1yσ(1)++xmyn++xnyσ(n1)x1y1++xmym++xnyn1.x_1y_{\sigma(1)} + \ldots + x_my_n + \ldots + x_ny_{\sigma(n-1)} \leq x_1y_1 + \ldots + x_my_m + \ldots + x_ny_{n-1}.

Thus the RHS is at most x1y1++xn1yn1+xnynx_1y_1 + \ldots + x_{n-1}y_{n-1} + x_ny_n, as needed. To prove the LHS, apply the above with yi-y_i instead of yiy_i (noting that negating an inequality reverses the sign).

Remark

The equality holds if and only if a1=a2=ana_1 = a_2 =\cdots a_n or b1=b2=bnb_1 = b_2 =\cdots b_n

Exercises

Exercise

Prove that for any real numbers aa, bb, cc, and dd, the following inequality holds: a2+b2+c2+d2ab+bc+cd+da.a^2 + b^2 + c^2 + d^2 \geq ab + bc + cd + da.

Proof

Consider the sequences (a,b,c,d)(a, b, c, d) and (b,c,d,a)(b, c, d, a). By the Cauchy-Schwarz inequality, we have: (a2+b2+c2+d2)(b2+c2+d2+a2)(ab+bc+cd+da)2.(a^2 + b^2 + c^2 + d^2)(b^2 + c^2 + d^2 + a^2) \geq (ab + bc + cd + da)^2. (a2+b2+c2+d2)2(ab+bc+cd+da)2\left(a^2+b^2+c^2+d^2\right)^2 \geq (ab + bc + cd + da)^2 a2+b2+c2+d2ab+bc+cd+da.a^2 + b^2 + c^2 + d^2 \geq ab + bc + cd + da. This completes the proof.

Exercise

In mathematics, the QM-AM-GM-HM inequalities, also known as the mean inequality chain, state the relationship between the harmonic mean, geometric mean, arithmetic mean, and quadratic mean (also known as root mean square). It follows that: 0<n1x1+1x2++1xnx1x2xnnx1+x2++xnnx12+x22++xn2n0<\frac{n}{\frac{1}{x_{1}}+\frac{1}{x_{2}}+\cdots+\frac{1}{x_{n}}} \leq \sqrt[n]{x_{1} x_{2} \cdots x_{n}} \leq \frac{x_{1}+x_{2}+\cdots+x_{n}}{n} \leq \sqrt{\frac{x_{1}^{2}+x_{2}^{2}+\cdots+x_{n}^{2}}{n}} The right part of the inequality is a direct conclusion from Cauchy-Schwarz inequality. Prove it by substituting special values to fit the relation.

Proof

Cauchy-Schwarz inequality states that: (a12+a22++an2)(b12+b22++bn2)(a1b1+a2b2++anbn)2\left(a_{1}^{2}+a_{2}^{2}+\cdots+a_{n}^{2}\right)\left(b_{1}^{2}+b_{2}^{2}+\cdots+b_{n}^{2}\right) \geq\left(a_{1} b_{1}+a_{2} b_{2}+\cdots+a_{n} b_{n}\right)^{2} where all terms are real numbers. Let b1=b2==bn=1b_1=b_2=\cdots=b_n=1, we have: (x12+x22++xn2)(1+1++1)(x1+x2++xn)2\left(x_{1}^{2}+x_{2}^{2}+\cdots+x_{n}^{2}\right)(1+1+\cdots+1) \geq\left(x_{1}+x_{2}+\cdots+x_{n}\right)^{2}

\frac{x_{1}^{2}+x_{2}^{2}+\cdots+x_{n}^{2}}{n} \geq\left(\frac{x_{1}+x_{2}+\cdots+x_{n}}{n}\right)^{2}$$ $$\sqrt{\frac{x_{1}^{2}+\cdots+x_{n}^{2}}{n}} \geq \frac{x_{1}+\cdots+x_{n}}{n}$$ This completes the proof.

If you are interested in the complete proof, check this link.

Exercise

Prove that for arbitrary real ak,bk,cka_{k}, b_{k}, c_{k} we have $$\left(\sum_{k=1}^{n} a_{k} b_{k} c_{k}\right)^{4} \leq\left(\sum_{k=1}^{n} a_{k}^{4}\right)\left(\sum_{k=1}^{n} b_{k}^{2}\right)^{2}\left(\sum_{k=1}^{n} c_{k}^{4}\right)

Solution

By using Cauchy-Schwartz inequality twice, we have:

(k=1nakbkck)4=[(k=1nakbkck)2]2(k=1nak2ck2)2(k=1nbk2)2((k=1nak4)(k=1nck4))(k=1nbk2)2=(k=1nak4)(k=1nck4)(k=1nbk2)2=(k=1nak4)(k=1nbk2)2(k=1nck4).\begin{aligned} \left( \sum_{k=1}^{n} a_k b_k c_k \right)^4 &= \left[ \left( \sum_{k=1}^{n} a_k b_k c_k \right)^2 \right]^2 \\ &\leq \left( \sum_{k=1}^{n} a_k^2 c_k^2 \right)^2 \left( \sum_{k=1}^{n} b_k^2 \right)^2 \\ &\leq \left( \left( \sum_{k=1}^{n} a_k^4 \right) \left( \sum_{k=1}^{n} c_k^4 \right) \right) \left( \sum_{k=1}^{n} b_k^2 \right)^2 \\ &= \left( \sum_{k=1}^{n} a_k^4 \right) \left( \sum_{k=1}^{n} c_k^4 \right) \left( \sum_{k=1}^{n} b_k^2 \right)^2 \\ &= \left( \sum_{k=1}^{n} a_k^4 \right) \left( \sum_{k=1}^{n} b_k^2 \right)^2 \left( \sum_{k=1}^{n} c_k^4 \right). \end{aligned}

Exercise

Prove that, let a,b,ca, b, c be positive real numbers such that a+b+c=1a + b + c = 1. Then the following inequality holds: 1a+1b+1c9.\frac{1}{a} + \frac{1}{b} + \frac{1}{c} \geq 9.

Proof

By applying the Cauchy-Schwarz inequality to the sequences (a,b,c)(\sqrt{a}, \sqrt{b}, \sqrt{c}) and (1a,1b,1c)(\frac{1}{\sqrt{a}}, \frac{1}{\sqrt{b}}, \frac{1}{\sqrt{c}} ), we have: ((a)2+(b)2+(c)2)((1a)2+(1b)2+(1c)2)\left( (\sqrt{a})^2 + (\sqrt{b})^2 + (\sqrt{c})^2 \right) \left( \left(\frac{1}{\sqrt{a}}\right)^2 + \left(\frac{1}{\sqrt{b}}\right)^2 + \left(\frac{1}{\sqrt{c}}\right)^2 \right) (a1a+b1b+c1c)2\geq \left( \sqrt{a} \cdot \frac{1}{\sqrt{a}} + \sqrt{b} \cdot \frac{1}{\sqrt{b}} + \sqrt{c} \cdot \frac{1}{\sqrt{c}} \right)^2 Simplifying both sides of the inequality gives us: (a+b+c)(1a+1b+1c)(1+1+1)2(a + b + c) \left( \frac{1}{a} + \frac{1}{b} + \frac{1}{c} \right) \geq (1 + 1 + 1)^2 Given that a+b+c=1a + b + c = 1, substituting this into the inequality yields: 1(1a+1b+1c)321 \cdot \left( \frac{1}{a} + \frac{1}{b} + \frac{1}{c} \right) \geq 3^2 Therefore, we have: 1a+1b+1c9.\frac{1}{a} + \frac{1}{b} + \frac{1}{c} \geq 9. This completes the proof.

Exercise

We have proven the Cauchy-Schwarz inequality for planar vectors, can you expand theorem CSvector to 3D vectors? Hint: Express your solution in the form of Eq. CSvec. No extra thinking is needed.

Solution:

In the 3D space, we have

Corollary

Assume that α=(a1,a2,a3)\alpha = (a_1, a_2, a_3) and β=(b1,b2,b3)\beta = (b_1, b_2, b_3) are two 3D vectors: a12+a22+a32b12+b22+b32a1b1+a2b2+a3b3.\sqrt{a_1^2 + a_2^2 + a_3^2}\sqrt{b_1^2 + b_2^2 + b_3^2} \geq |a_1b_1 + a_2b_2 + a_3b_3|.

Proof

In the inequality of the inner product in vector space, let α\alpha and β\beta be the directed line segments determined by vectors a\mathbf{a} and b\mathbf{b} respectively, with terminal coordinates a1,a2,a3a_1, a_2, a_3 and b1,b2,b3b_1, b_2, b_3, and let α=(a1,a2,a3),β=(b1,b2,b3),\alpha = (a_1, a_2, a_3), \quad \beta = (b_1, b_2, b_3), Then, α\alpha and β\beta are not both zero, and the angle between them is denoted as α,β\langle \alpha, \beta \rangle, with the convention that 0α,βπ.0 \leq \langle \alpha, \beta \rangle \leq \pi. The cosα,β\cos\langle \alpha, \beta \rangle is called the cosine of the angle (inner product) between vectors α\alpha and β\beta, denoted as αβ\alpha \cdot \beta, and αβ=a1b1+a2b2+a3b3,\alpha \cdot \beta = a_1b_1 + a_2b_2 + a_3b_3, α=αα=a12+a22+a32,|\alpha| = \sqrt{\alpha \cdot \alpha} = \sqrt{a_1^2 + a_2^2 + a_3^2}, β=ββ=b12+b22+b32,|\beta| = \sqrt{\beta \cdot \beta} = \sqrt{b_1^2 + b_2^2 + b_3^2}, Therefore, cosα,β=a1b1+a2b2+a3b3a12+a22+a32b12+b22+b32,\cos\langle \alpha, \beta \rangle = \frac{a_1b_1 + a_2b_2 + a_3b_3}{\sqrt{a_1^2 + a_2^2 + a_3^2}\sqrt{b_1^2 + b_2^2 + b_3^2}}, cos2α,β=(a1b1+a2b2+a3b3a12+a22+a32b12+b22+b32)21,\cos^2\langle \alpha, \beta \rangle = \left(\frac{a_1b_1 + a_2b_2 + a_3b_3}{\sqrt{a_1^2 + a_2^2 + a_3^2}\sqrt{b_1^2 + b_2^2 + b_3^2}}\right)^2 \leq 1, which implies (a12+a22+a32)(b12+b22+b32)(a1b1+a2b2+a3b3)2,(a_1^2 + a_2^2 + a_3^2)(b_1^2 + b_2^2 + b_3^2) \geq (a_1b_1 + a_2b_2 + a_3b_3)^2, and since a12+a22+a32b12+b22+b32a1b1+a2b2+a3b3.\sqrt{a_1^2 + a_2^2 + a_3^2}\sqrt{b_1^2 + b_2^2 + b_3^2} \geq |a_1b_1 + a_2b_2 + a_3b_3|. which completes the proof.

Exercise

We have shown that the Cauchy-Schwarz inequality still works in the 3-dimensional space, why not try to show that it holds for all vectors in the n-dimension space? Think about the strategy to be used and show your meticulous proof for nD vector. Hint: We are actually trying to find a generalized form of the inequality. Try to express it in an open form (summation).

Solutions:

Theorem

We consider vectors in n-dimentional space. Let a=(a1,a2,,an)\mathbf{a} = (a_1, a_2, \ldots, a_n) and b=(b1,b2,,bn)\mathbf{b} = (b_1, b_2, \ldots, b_n) be two nn-dimensional vectors. Then the following inequality holds: (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)

Proof

We will prove the Cauchy-Schwarz inequality for nn-dimensional vectors using mathematical induction.

Base Case: For n=1n = 1, we have: (a1b1)2(a12)(b12)(a_1b_1)^2 \leq (a_1^2)(b_1^2) which is obviously true, as both sides are equal.

Inductive Step: Assume the inequality holds for n=kn = k, that is: (i=1kaibi)2(i=1kai2)(i=1kbi2)\left(\sum_{i=1}^{k} a_ib_i\right)^2 \leq \left(\sum_{i=1}^{k} a_i^2\right)\left(\sum_{i=1}^{k} b_i^2\right) We need to show that it also holds for n=k+1n = k+1: (i=1k+1aibi)2(i=1k+1ai2)(i=1k+1bi2)\left(\sum_{i=1}^{k+1} a_ib_i\right)^2 \leq \left(\sum_{i=1}^{k+1} a_i^2\right)\left(\sum_{i=1}^{k+1} b_i^2\right)

Expanding both sides, we get:

LHS: (i=1kaibi+ak+1bk+1)2=(i=1kaibi)2+2ak+1bk+1i=1kaibi+ak+12bk+12\left(\sum_{i=1}^{k} a_ib_i + a_{k+1}b_{k+1}\right)^2 = \left(\sum_{i=1}^{k} a_ib_i\right)^2 + 2a_{k+1}b_{k+1}\sum_{i=1}^{k} a_ib_i + a_{k+1}^2b_{k+1}^2

RHS: (i=1kai2+ak+12)(i=1kbi2+bk+12)\left(\sum_{i=1}^{k} a_i^2 + a_{k+1}^2\right)\left(\sum_{i=1}^{k} b_i^2 + b_{k+1}^2\right) =(i=1kai2)(i=1kbi2)+bk+12i=1kai2+ak+12i=1kbi2+ak+12bk+12= \left(\sum_{i=1}^{k} a_i^2\right)\left(\sum_{i=1}^{k} b_i^2\right) + b_{k+1}^2\sum_{i=1}^{k} a_i^2 + a_{k+1}^2\sum_{i=1}^{k} b_i^2 + a_{k+1}^2b_{k+1}^2

By the inductive hypothesis, we have: (i=1kaibi)2(i=1kai2)(i=1kbi2)\left(\sum_{i=1}^{k} a_ib_i\right)^2 \leq \left(\sum_{i=1}^{k} a_i^2\right)\left(\sum_{i=1}^{k} b_i^2\right)

It remains to show that the additional terms also satisfy the inequality: 2ak+1bk+1i=1kaibi+ak+12bk+12bk+12i=1kai2+ak+12i=1kbi2+ak+12bk+122a_{k+1}b_{k+1}\sum_{i=1}^{k} a_ib_i + a_{k+1}^2b_{k+1}^2 \leq b_{k+1}^2\sum_{i=1}^{k} a_i^2 + a_{k+1}^2\sum_{i=1}^{k} b_i^2 + a_{k+1}^2b_{k+1}^2

This is equivalent to showing: i=1k(ak+1biaibk+1)20\sum_{i=1}^{k} (a_{k+1}b_i - a_ib_{k+1})^2 \geq 0 Which is true since it is a sum of squares.

Hence, by mathematical induction, the inequality holds for all nn-dimensional vectors.

Remark: If this is not quite clear for you, here’s the explanation:

Cancel ak+12bk+12a_{k+1}^2b_{k+1}^2 on both sides, we have: 2ak+1bk+1 i=1kaibi ak+12i=1kbi2+bk+12i=1kai2\begin{aligned} 2a_{k+1} b_{k+1} \ \sum _{i=1}^{k} a_{i} b_{i} & \leq \ a_{k+1}^{2}\sum _{i=1}^{k} b_{i}^{2} +b_{k+1}^{2}\sum _{i=1}^{k} a_{i}^{2} \end{aligned} Moving the terms on the same side of the inequality sign:  ak+12i=1kbi2+bk+12i=1kai2 2ak+1bk+1 i=1kaibi0\begin{aligned} \ a_{k+1}^{2}\sum _{i=1}^{k} b_{i}^{2} +b_{k+1}^{2}\sum _{i=1}^{k} a_{i}^{2} \ -2a_{k+1} b_{k+1} \ \sum _{i=1}^{k} a_{i} b_{i} & \geq 0 \end{aligned} This is an interesting expression since the coefficients and the terms of the summation can all fit the terms of sum of square: (a±b)2=a2+b2±2ab(a\pm b)^2 = a^2+b^2\pm 2ab. we can expand LHS as: LHS=ak+12(b12+b22++bk2)+bk+12(a12+a22++ak2)2ak+1bk+1(a1b1+a2b2++akbk)LHS =a_{k+1}^{2}\left( b_{1}^{2} +b_{2}^{2} +\cdots +b_{k}^{2}\right) +b_{k+1}^{2}\left( a_{1}^{2} +a_{2}^{2} +\cdots +a_{k}^{2}\right) -2a_{k+1} b_{k+1}( a_{1} b_{1} +a_{2} b_{2} +\cdots +a_{k} b_{k})

Fitting it into sum of square formula (a±b)2=a2+b2±2ab(a\pm b)^2 = a^2+b^2\pm 2ab with a=ak+1bia = a_{k+1}b_i and b=aibk+1b=a_ib_{k+1}.

We have: i=1k(ak+1biaibk+1)2=LHS\sum_{i=1}^{k} (a_{k+1}b_i - a_ib_{k+1})^2 = LHS

Exercise

Having proven the generalized Cauchy-Schwarz Inequality by using vector properties, you must have built up some confidence. These problems that seem tricky are actually easy to prove. Now we have one last proof for Cauchy-Schwarz Inequality (it’s true I promise, no more proof for this inequality.). Since we have proved the generalized form by using vector, recall that we also prove it by pure algebra analysis in theorem CSineq. Now, prove the generalized form without using vector, and think about the similarity and difference of the two proofs.

solution:

Proof

The equality holds if and only if a1b1=a2b2==anbn\frac{a_1}{b_1} = \frac{a_2}{b_2} = \ldots = \frac{a_n}{b_n} (assuming bi0b_i \neq 0 for all ii; if bj=0b_j = 0, then aj=0a_j = 0, for j=1,2,,nj = 1, 2, \ldots, n).

Case 1: If all ai=0a_i = 0, the inequality obviously holds.

Case 2: If not all ai=0a_i = 0, consider the following quadratic in xx: f(x)=(a1x+b1)2+(a2x+b2)2++(anx+bn)2f(x) = (a_1x + b_1)^2 + (a_2x + b_2)^2 + \ldots + (a_nx + b_n)^2 It is clear that for all xx, f(x)0f(x) \geq 0 since it is a sum of squares.

Expanding f(x)f(x), we get: f(x)=(a12+a22++an2)x2+2(a1b1+a2b2++anbn)x+(b12+b22++bn2)f(x) = (a_1^2 + a_2^2 + \ldots + a_n^2)x^2 + 2(a_1b_1 + a_2b_2 + \ldots + a_nb_n)x + (b_1^2 + b_2^2 + \ldots + b_n^2) The discriminant Δ\Delta of this quadratic is: Δ=4(a1b1+a2b2++anbn)24(a12+a22++an2)(b12+b22++bn2)\Delta = 4(a_1b_1 + a_2b_2 + \ldots + a_nb_n)^2 - 4(a_1^2 + a_2^2 + \ldots + a_n^2)(b_1^2 + b_2^2 + \ldots + b_n^2) For f(x)0f(x) \geq 0 to hold for all xx, the discriminant Δ\Delta must be less than or equal to zero. This leads to: (a1b1+a2b2++anbn)2(a12+a22++an2)(b12+b22++bn2)0(a_1b_1 + a_2b_2 + \ldots + a_nb_n)^2 - (a_1^2 + a_2^2 + \ldots + a_n^2)(b_1^2 + b_2^2 + \ldots + b_n^2) \leq 0 Hence, the inequality is proven. Equality holds if and only if the numbers are proportional.

Exercise

Prove Minkowski’s inequality: (k=1n(ak+bk)2)1/2(k=1nak2)1/2+(k=1nbk2)1/2\left(\sum_{k=1}^{n}\left(a_{k}+b_{k}\right)^{2}\right)^{1 / 2} \leq\left(\sum_{k=1}^{n} a_{k}^{2}\right)^{1 / 2}+\left(\sum_{k=1}^{n} b_{k}^{2}\right)^{1 / 2} Which basic inequality do you find that is related to this?

Solution

Consider k=1n(ak+bk)2=k=1nak2+k=1nbk2+2k=1nakbkk=1nak2+k=1nbk2+2(k=1nak2)1/2(k=1nbk2)1/2(by Cauchy-Schwarz inequality)=((k=1nak2)1/2+(k=1nbk2)1/2)2\begin{aligned} \sum_{k=1}^{n} (a_k + b_k)^2 &= \sum_{k=1}^{n} a_k^2 + \sum_{k=1}^{n} b_k^2 + 2 \sum_{k=1}^{n} a_k b_k \\ &\leq \sum_{k=1}^{n} a_k^2 + \sum_{k=1}^{n} b_k^2 + 2 \left( \sum_{k=1}^{n} a_k^2 \right)^{1/2} \left( \sum_{k=1}^{n} b_k^2 \right)^{1/2} \quad \text{(by Cauchy-Schwarz inequality)} \\ &= \left( \left( \sum_{k=1}^{n} a_k^2 \right)^{1/2} + \left( \sum_{k=1}^{n} b_k^2 \right)^{1/2} \right)^2 \end{aligned}

Taking the square root on both sides, we obtain (k=1n(ak+bk)2)1/2(k=1nak2)1/2+(k=1nbk2)1/2\left( \sum_{k=1}^{n} (a_k + b_k)^2 \right)^{1/2} \leq \left( \sum_{k=1}^{n} a_k^2 \right)^{1/2} + \left( \sum_{k=1}^{n} b_k^2 \right)^{1/2}

Remark: The inequality can also be written as (i=1nxi+yip)1/p(i=1nxip)1/p+(i=1nyip)1/p\left(\sum_{i=1}^n\left|x_i+y_i\right|^p\right)^{1 / p} \leq\left(\sum_{i=1}^n\left|x_i\right|^p\right)^{1 / p}+\left(\sum_{i=1}^n\left|y_i\right|^p\right)^{1 / p} Where when p=1p=1, we get triangle inequality.

Exercise

If one did not know the Cauchy Schwarz inequality, but knew Lagrange’s identity, then how could one derive the Cauchy-Schwarz inequality.

Lagrange’s identity: Let a1,,ana_1, \ldots, a_n and b1,,bnb_1, \ldots, b_n be real numbers. Then (k=1nak2)(k=1nbk2)(k=1nakbk)2=i=1n1j=i+1n(aibjajbi)2\left(\sum_{k=1}^{n} a_{k}^{2}\right)\left(\sum_{k=1}^{n} b_{k}^{2}\right)-\left(\sum_{k=1}^{n} a_{k} b_{k}\right)^{2}=\sum_{i=1}^{n-1} \sum_{j=i+1}^{n}\left(a_{i} b_{j}-a_{j} b_{i}\right)^{2}

Prove this identity with summation form of generalized Cauchy-Schwarz inequality. Hint: Loosely speaking, Lagrange’s identity says that the left-hand side in the Cauchy- Schwarz inequality is off from the right-hand side of the Cauchy-Schwarz inequality by the error term.

Proof

Cauchy Inequality states that: (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) Assuming the Cauchy-Schwarz inequality is true, we aim to demonstrate Lagrange’s Identity. The inequality gives us the left-hand side of the identity directly. To arrive at the right-hand side, we need to show the existence of an error term which is the sum of squares of the differences between the products of the components of a\mathbf{a} and b\mathbf{b}.

Consider the expression i=1n1j=i+1n(aibjajbi)2\sum_{i=1}^{n-1} \sum_{j=i+1}^{n} (a_i b_j - a_j b_i)^2, which expands to include all combinations of the product differences. Each term is of the form ai2bj22aibiajbj+aj2bi2a_i^2 b_j^2 - 2 a_i b_i a_j b_j + a_j^2 b_i^2, and when summed over all ii and jj, the middle terms 2aibiajbj-2 a_i b_i a_j b_j combine to give us 2(k=1nakbk)2-2 \left( \sum_{k=1}^{n} a_k b_k \right)^2, which is the term we subtract on the left-hand side of the identity to obtain the equality.

Thus, by rearranging the terms and recognizing that the right-hand side sum is always non-negative, we establish Lagrange’s Identity as an equality.

The complete working is below. (i=1nai2)(i=1nbi2)=i=1nj=1nai2bj2=(i=1naibi)2+1i<jn(aibjajbi)2=i=1nj=1naiajbibj+1i<jn(ai2bj22aiajbibj+aj2bi2)=i=1nj=1naiajbibj+1i<jn(ai2bj2+aj2bi22aiajbibj)=i=1nai2bi2+i=1njiaiajbibj+1i<jn(ai2bj2+aj2bi22aiajbibj)=i=1nai2bi2+1i<jn(ai2bj2+aj2bi22aiajbibj)=(i=1nai2)(i=1nbi2)=(i=1naibi)2+1i<jn(aibjajbi)2\begin{aligned} &\left( \sum_{i=1}^{n} a_i^2 \right) \left( \sum_{i=1}^{n} b_i^2 \right) \\ =& \sum_{i=1}^{n} \sum_{j=1}^{n} a_i^2 b_j^2 \\ =& \left( \sum_{i=1}^{n} a_i b_i \right)^2 + \sum_{1 \leq i < j \leq n} (a_i b_j - a_j b_i)^2 \\ =& \sum_{i=1}^{n} \sum_{j=1}^{n} a_i a_j b_i b_j + \sum_{1 \leq i < j \leq n} (a_i^2 b_j^2 - 2a_i a_j b_i b_j + a_j^2 b_i^2) \\ =& \sum_{i=1}^{n} \sum_{j=1}^{n} a_i a_j b_i b_j + \sum_{1 \leq i < j \leq n} (a_i^2 b_j^2 + a_j^2 b_i^2 - 2a_i a_j b_i b_j) \\ =& \sum_{i=1}^{n} a_i^2 b_i^2 + \sum_{i=1}^{n} \sum_{j \neq i} a_i a_j b_i b_j + \sum_{1 \leq i < j \leq n} (a_i^2 b_j^2 + a_j^2 b_i^2 - 2a_i a_j b_i b_j) \\ =& \sum_{i=1}^{n} a_i^2 b_i^2 + \sum_{1 \leq i < j \leq n} (a_i^2 b_j^2 + a_j^2 b_i^2 - 2a_i a_j b_i b_j) \\ =& \left( \sum_{i=1}^{n} a_i^2 \right) \left( \sum_{i=1}^{n} b_i^2 \right) = \left( \sum_{i=1}^{n} a_i b_i \right)^2 + \sum_{1 \leq i < j \leq n} (a_i b_j - a_j b_i)^2 \end{aligned}

Exercise

Consider the function f(x)=(x+k)2x2+1f(x) = \frac{(x+k)^2}{x^2+1} where kk is a positive whole number. Show that f(x)k2+1f(x) \leq k^2 + 1.

Hint: Try to fit Cauchy-Schwarz inequality. There are more than one method.

Proof

We aim to show that (x+k)2x2+1k2+1\frac{(x+k)^2}{x^2+1} \leq k^2 + 1 for all xRx \in \mathbb{R} and kZ+k \in \mathbb{Z}^+. This is equivalent to proving (x+k)2(k2+1)(x2+1)(x+k)^2 \leq (k^2 + 1)(x^2 + 1) Starting with the left-hand side and applying the distributive property, we have (x+k)2=x2+2kx+k2(x+k)^2 = x^2 + 2kx + k^2 We can rewrite the right-hand side as (k2+1)(x2+1)=k2x2+x2+k2+1(k^2 + 1)(x^2 + 1) = k^2x^2 + x^2 + k^2 + 1 Combining the two, we want to show that x2+2kx+k2k2x2+x2+k2+1x^2 + 2kx + k^2 \leq k^2x^2 + x^2 + k^2 + 1 which simplifies to 0k2x22kx+10 \leq k^2x^2 - 2kx + 1 Notice that this can be written as a square of a binomial: 0(kx1)20 \leq (kx - 1)^2 Since the square of any real number is non-negative, the inequality holds true for all xx. Hence, the original inequality is proven.\ \ Below is how you can construct a new inequality to prove it.\ \ Firstly, we utilize the vector dot product form of the Cauchy-Schwarz Inequality over the real numbers. To apply the vector dot product form, we identify corresponding elements for two vectors. Let’s choose vectors a\mathbf{a} and b\mathbf{b}:

a=[xk],b=[11x]\mathbf{a} = \begin{bmatrix} x \\ k \\ \end{bmatrix}, \quad \mathbf{b} = \begin{bmatrix} 1 \\ \frac{1}{x} \\ \end{bmatrix}

The Cauchy-Schwarz Inequality is stated as:

(ab)2(aa)(bb)(\mathbf{a} \cdot \mathbf{b})^2 \leq (\mathbf{a} \cdot \mathbf{a})(\mathbf{b} \cdot \mathbf{b})

Applying this to our case:

(x1+k1x)2(x2+k2)(12+(1x)2)\left( x \cdot 1 + k \cdot \frac{1}{x} \right)^2 \leq (x^2 + k^2)\left( 1^2 + \left(\frac{1}{x}\right)^2 \right)

(x+kx)2(x2+k2)(1+1x2)\left( \frac{x + k}{x} \right)^2 \leq (x^2 + k^2)\left( 1 + \frac{1}{x^2} \right)

((x+k)2x2)(x2+k2)(x2+1x2)\left(\frac{(x+k)^2}{x^2}\right) \leq (x^2 + k^2)\left( \frac{x^2+1}{x^2} \right)

(x+k)2x2+1k2+1\frac{(x+k)^2}{x^2+1} \leq k^2 + 1

Therefore, we have proved the given inequality f(x)=(x+k)2x2+1k2+1f(x) = \frac{(x+k)^2}{x^2+1} \leq k^2 + 1 using the Cauchy-Schwarz Inequality.

Exercise

For a,b,c>0a, b, c > 0 prove that

  1. aabbccabbccaa^{a}b^{b}c^{c} \geq a^{b}b^{c}c^{a}.

  2. aabbcc(abc)a+b+c3a^{a}b^{b}c^{c} \geq (abc)^{\frac{a+b+c}{3}}.

Proof

Since ln\ln is an increasing function, we take the ln\ln of both sides to find that the inequalities are equivalent to alna+blnb+clncblna+clnb+alncalna+blnb+clnca+b+c3(lna+lnb+lnc).\begin{aligned} a\ln a + b\ln b + c\ln c &\geq b\ln a + c\ln b + a\ln c \\ a\ln a + b\ln b + c\ln c &\geq \frac{a+b+c}{3}(\ln a + \ln b + \ln c). \end{aligned}

Exercise

Chebyshev inequality is an important conclusion about random variables. It states that: Let a1,a2,,an;b1,b2,,bna_1, a_2, \ldots, a_n; b_1, b_2, \ldots, b_n be real numbers arranged in ascending order for aia_i and in descending order for bib_i, such that:

  1. If a1a2ana_1 \leq a_2 \leq \ldots \leq a_n and b1b2bnb_1 \geq b_2 \geq \ldots \geq b_n, then a1b1+a2b2++anbnn(a1+a2++ann)(b1+b2++bnn)\frac{a_1b_1 + a_2b_2 + \ldots + a_nb_n}{n} \geq \left( \frac{a_1 + a_2 + \ldots + a_n}{n} \right)\left( \frac{b_1 + b_2 + \ldots + b_n}{n} \right)

  2. If a1a2ana_1 \leq a_2 \leq \ldots \leq a_n but b1b2bnb_1 \leq b_2 \leq \ldots \leq b_n, then a1b1+a2b2++anbnn(a1+a2++ann)(b1+b2++bnn)\frac{a_1b_1 + a_2b_2 + \ldots + a_nb_n}{n} \leq \left( \frac{a_1 + a_2 + \ldots + a_n}{n} \right)\left( \frac{b_1 + b_2 + \ldots + b_n}{n} \right)

Proof

For (1)(1) where a1a2ana_1 \leq a_2 \leq \ldots \leq a_n, and b1b2bnb_1 \geq b_2 \geq \ldots \geq b_n, we have the following:

a1b1+a2b2++anbn=a1b1+a2b2++anbna1b1+a2b2++anbna1b2+a2b3++anb1a1b1+a2b2++anbna1b3+a2b4++an1b1+anb2a1b1+a2b2++anbna1bn+a2b1++anbn1.\begin{aligned} a_1b_1 + a_2b_2 + \ldots + a_nb_n &= a_1b_1 + a_2b_2 + \ldots + a_nb_n \\ a_1b_1 + a_2b_2 + \ldots + a_nb_n &\geq a_1b_2 + a_2b_3 + \ldots + a_nb_1 \\ a_1b_1 + a_2b_2 + \ldots + a_nb_n &\geq a_1b_3 + a_2b_4 + \ldots + a_{n-1}b_1 + a_nb_2 \\ &\vdots \\ a_1b_1 + a_2b_2 + \ldots + a_nb_n &\geq a_1b_n + a_2b_1 + \ldots + a_nb_{n-1}. \end{aligned}

Adding these nn inequalities together, we obtain: n(a1b1+a2b2++anbn)(a1+a2++an)(b1+b2++bn).n(a_1b_1 + a_2b_2 + \ldots + a_nb_n) \geq (a_1 + a_2 + \ldots + a_n)(b_1 + b_2 + \ldots + b_n).

After dividing by n2n^2, it follows that: a1b1+a2b2++anbnn(a1+a2++ann)(b1+b2++bnn).\frac{a_1b_1 + a_2b_2 + \ldots + a_nb_n}{n} \geq \left( \frac{a_1 + a_2 + \ldots + a_n}{n} \right)\left( \frac{b_1 + b_2 + \ldots + b_n}{n} \right).

This holds especially if a1=a2==ana_1 = a_2 = \ldots = a_n and b1=b2==bnb_1 = b_2 = \ldots = b_n, which is trivial.

For (2)(2) where the sequences are oppositely sorted, the proof is similar.

Exercise

Suppose a1,a2,,an>0a_1, a_2, \ldots, a_n > 0 and let s=a1++ans = a_1 + \ldots + a_n. Prove that a1sa1++ansannn1\frac{a_1}{s - a_1} + \ldots + \frac{a_n}{s - a_n} \geq \frac{n}{n - 1}

Proof

The left-hand side of the inequality can be seen as the average of nn fractions where the numerators are the aia_i‘s and the denominators are sais - a_i‘s.

Since the sum of the numerators equals the sum of the aia_i‘s and the sum of the denominators is n(ssn)=(n1)sn(s - \frac{s}{n}) = (n-1)s, we can apply Chebyshev’s Inequality because it states that if a1ana_1 \leq \ldots \leq a_n and b1bnb_1 \leq \ldots \leq b_n, then the arithmetic mean of the products aibia_ib_i is greater than or equal to the product of the arithmetic means of aia_i and bib_i.

By rearranging the terms, we can match the aia_i‘s with the inverses of denominators in a way that corresponds to the conditions of Chebyshev’s Inequality:

i=1nai1sai1ni=1nai1ni=1n1sai.\sum_{i=1}^n a_i \cdot \frac{1}{s - a_i} \geq \frac{1}{n} \sum_{i=1}^n a_i \cdot \frac{1}{n} \sum_{i=1}^n \frac{1}{s - a_i}.

This simplifies to:

a1sa1++ansans(n1)s=nn1.\frac{a_1}{s - a_1} + \ldots + \frac{a_n}{s - a_n} \geq \frac{s}{(n-1)s} = \frac{n}{n-1}.

Therefore, we have shown that:

a1sa1++ansannn1.\frac{a_1}{s - a_1} + \ldots + \frac{a_n}{s - a_n} \geq \frac{n}{n - 1}.

This completes the proof.

Exercise

Prove the following for x,y,z>0x, y, z > 0:

  1. x2y+y2xx+y\frac{x^2}{y} + \frac{y^2}{x} \geq x + y.

  2. x2y2+y2z2+z2x2xz+yx+zy\frac{x^2}{y^2} + \frac{y^2}{z^2} + \frac{z^2}{x^2} \geq \frac{x}{z} + \frac{y}{x} + \frac{z}{y}.

  3. xyz2+yzx2+zxy2xy+yz+zx\frac{xy}{z^2} + \frac{yz}{x^2} + \frac{zx}{y^2} \geq \frac{x}{y} + \frac{y}{z} + \frac{z}{x}.

Proof
  1. Without loss of generality, xyx \geq y. Then x2y2x^2 \geq y^2 and 1y1x\frac{1}{y} \geq \frac{1}{x}, i.e., (x2,y2)(x^2, y^2) and (1y,1x)(\frac{1}{y}, \frac{1}{x}) are similarly sorted. Thus x2y+y2xx2x+y2y=x+y.\frac{x^2}{y} + \frac{y^2}{x} \geq \frac{x^2}{x} + \frac{y^2}{y} = x + y.

  2. Letting a=xya = \frac{x}{y}, b=yzb = \frac{y}{z}, c=zxc = \frac{z}{x}, the inequality is equivalent to a2+b2+c2ab+bc+ca.a^2 + b^2 + c^2 \geq ab + bc + ca. This is true by the rearrangement inequality applied to the similarly sorted sequences (a,b,c)(a, b, c) and (a,b,c)(a, b, c).

  3. Let a=1x1y1/31z1/3a = \frac{1}{x}\frac{1}{y^{1/3}}\frac{1}{z^{1/3}}, b=1y1z1/31x1/3b = \frac{1}{y}\frac{1}{z^{1/3}}\frac{1}{x^{1/3}}, and c=1z1x1/31y1/3c = \frac{1}{z}\frac{1}{x^{1/3}}\frac{1}{y^{1/3}}. Then the inequality to prove becomes a3+b3+c3a2b+b2c+c2aa^3 + b^3 + c^3 \geq a^2b + b^2c + c^2a which was proved in problem 1.