Formal Book

20 In praise of inequalities

Theorem 20.1
#

Let \(\langle a, b \rangle \) be an inner product on a real vector space \(V\) (with the norm \(|a|^2 := \langle a, a \rangle \)). Then

\[ \langle a, b \rangle ^2 \leq |a|^2 |b|^2 \]

holds for all vectors \(a, b \in V\), with equality if and only if \(a\) and \(b\) are linearly dependent.

Proof

The following (folklore) proof is probably the shortest. Consider the quadratic function

\[ |x a + b|^2 = x^2 |a|^2 + 2x \langle a, b \rangle + |b|^2 \]

in the variable \(x\). We may assume \(a \neq 0\). If \(b = \lambda a\), then clearly

\[ \langle a, b \rangle ^2 = |a|^2 |b|^2. \]

If, on the other hand, \(a\) and \(b\) are linearly independent, then \(|x a + b|^2 {\gt} 0\) for all \(x\), and thus the discriminant \(\langle a, b \rangle ^2 - |a|^2 |b|^2\) is less than 0.

Theorem 20.2 First proof
#

Let \(a_1, \dots , a_n\) be positive real numbers, then

\[ \frac{n}{\frac{1}{a_1}+\dots +\frac{1}{a_n}} \le \sqrt[n]{a_1a_2\dots a_n} \le \frac{a_1+\dots + a_n}{n} \]

with equality in both cases if and only if all \(a_i\)’s are equal.

Proof

The following beautiful nonstandard induction proof is attributed to Cauchy. Let \(P(n)\) be the statement of the second inequality, written in the form

\[ a_1 a_2 \cdots a_n \le \left(\frac{a_1 + \cdots + a_n}{n}\right)^n. \]

For \(n=2\), we have \(a_1 a_2 \le \left(\frac{a_1+a_2}{2}\right)^2 \iff (a_1-a_2)^2 \ge 0\), which is true. Now we proceed in the following two steps:

  1. \(P(n) \implies P(n-1)\)

  2. \(P(n)\) and \(P(2) \implies P(2n)\)

which will clearly imply the full result.

To prove (A), set \(A := \frac{\sum _{k=1}^{n-1} a_k}{n-1}\), then

\[ \left(\prod _{k=1}^{n-1} a_k\right) A \stackrel{P(n)}{\le } \left(\frac{\sum _{k=1}^{n-1} a_k + A}{n}\right)^n = \left(\frac{(n-1)A + A}{n}\right)^n = A^n \]

and hence \(\prod _{k=1}^{n-1} a_k \le A^{n-1}\).

For (B), we see

\[ \prod _{k=1}^{2n} a_k = \left(\prod _{k=1}^{n} a_k\right)\left(\prod _{k=n+1}^{2n} a_k\right) \stackrel{P(n)}{\le } \left(\frac{\sum _{k=1}^{n} a_k}{n}\right)^n \left(\frac{\sum _{k=n+1}^{2n} a_k}{n}\right)^n \stackrel{P(2)}{\le } \left(\frac{\sum _{k=1}^{2n} a_k}{2n}\right)^{2n}. \]

The condition for equality is derived just as easily.

The left-hand inequality, between the harmonic and the geometric mean, follows now by considering \(\frac{1}{a_1}, \dots , \frac{1}{a_n}\).

Theorem 20.3 Another Proof
#

Let \(a_1, \dots , a_n\) be positive real numbers, then

\[ \frac{n}{\frac{1}{a_1}+\dots +\frac{1}{a_n}} \le \sqrt[n]{a_1a_2\dots a_n} \le \frac{a_1+\dots + a_n}{n} \]

with equality in both cases if and only if all \(a_i\)’s are equal.

Proof

Of the many other proofs of the arithmetic-geometric mean inequality, let us single out a particularly striking one by Horst Alzer, with some shortenings due to France Dacar. As a matter of fact, this proof yields the stronger inequality

\[ a_1^{p_1} a_2^{p_2} \cdots a_n^{p_n} \le p_1 a_1 + p_2 a_2 + \cdots + p_n a_n \]

for any positive numbers \(a_1, \dots , a_n\), \(p_1, \dots , p_n\) with \(\sum _{i=1}^n p_i = 1\). Let us denote the expression on the left side by \(G\), and on the right side by \(A\). Fix \(c {\gt} 0\) and define the function \(f(t) := \frac{1}{c} - \frac{1}{t}\) on \(\mathbb {R}_{{\gt}0}\). Since \(f(t) {\lt} 0\) for \(t {\lt} c\) and \(f(t) {\gt} 0\) for \(t {\gt} c\), we get the inequality

\[ \int _c^x f(t)\, dt \ge 0 \]

for every \(x {\gt} 0\), with equality if and only if \(x = c\). Now

\[ 0 \le \int _c^x f(t)\, dt = \left[\frac{t}{c} - \log t\right]_c^x = \frac{x}{c} - 1 - \log \frac{x}{c}, \]

and setting \(c = G\) and \(x = a_i\) we conclude that

\[ \frac{a_i}{G} - 1 \ge \log a_i - \log G \qquad \text{for } i = 1, 2, \dots , n. \]

Multiplying this inequality by \(p_i\) and summing over all \(i\) gives

\[ \sum _{i=1}^n p_i \frac{a_i}{G} - \sum _{i=1}^n p_i \ge \sum _{i=1}^n p_i \log a_i - \sum _{i=1}^n p_i \log G. \]

With \(\sum p_i = 1\), the left side equals \(\frac{A}{G} - 1\), while the right side is \(\log \left(\prod a_i^{p_i}\right) - \log G = \log G - \log G = 0\). We conclude \(\frac{A}{G} - 1 \ge 0\), which is \(A \ge G\). In the case of equality, all inequalities must be equalities, which implies \(a_1 = \cdots = a_n = G\).

Theorem 20.4 Still another Proof
#

Let \(a_1, \dots , a_n\) be positive real numbers, then

\[ \frac{n}{\frac{1}{a_1}+\dots +\frac{1}{a_n}} \le \sqrt[n]{a_1a_2\dots a_n} \le \frac{a_1+\dots + a_n}{n} \]

with equality in both cases if and only if all \(a_i\)’s are equal.

Proof

There is another nice proof, due to Michael D. Hirschhorn. It uses Bernoulli’s inequality, which says

\[ (1+t)^{n+1} \ge 1 + (n+1)t \qquad \text{for real } t \ge -1. \]

Suppose \(a_1, a_2, \dots , a_{n+1} {\gt} 0\) and set

\[ t = \frac{\frac{a_1 + \cdots + a_{n+1}}{n+1}}{\frac{a_1 + \cdots + a_n}{n}} - 1. \]

By Bernoulli,

\[ \left(\frac{\frac{a_1 + \cdots + a_{n+1}}{n+1}}{\frac{a_1 + \cdots + a_n}{n}}\right)^{n+1} \ge 1 + (n+1)\left(\frac{\frac{a_1 + \cdots + a_{n+1}}{n+1}}{\frac{a_1 + \cdots + a_n}{n}} - 1\right) = \frac{n\, a_{n+1}}{a_1 + \cdots + a_n}, \]

which translates into

\[ \left(\frac{a_1 + \cdots + a_{n+1}}{n+1}\right)^{n+1} \ge a_{n+1} \left(\frac{a_1 + \cdots + a_n}{n}\right)^n, \]

and the arithmetic-geometric mean inequality follows by induction.

Theorem 20.5
#

Suppose all roots of the polynomial \(x^n + a_{n-1}x^{n-1} + \dots + a_0\) are real. Then the roots are contained in the interval with the endpoints

\[ -\frac{a_{n-1}}{n}\pm \frac{n-1}{n}\sqrt{a_{n-1}^2 - \frac{2n}{n-1}a_{n-2}}. \]
Proof

Let \(y\) be one of the roots and \(y_1, \dots , y_{n-1}\) the others. Then the polynomial is \((x-y)(x-y_1)\cdots (x-y_{n-1})\). Thus by comparing coefficients

\begin{align*} -a_{n-1} & = y + y_1 + \cdots + y_{n-1}, \\ a_{n-2} & = y(y_1 + \cdots + y_{n-1}) + \sum _{i{\lt}j} y_i y_j, \end{align*}

and so \(a_{n-1}^2 - 2a_{n-2} - y^2 = \sum _{i=1}^{n-1} y_i^2\).

By Cauchy’s inequality applied to \((y_1, \dots , y_{n-1})\) and \((1, \dots , 1)\),

\[ (a_{n-1} + y)^2 = (y_1 + \cdots + y_{n-1})^2 \le (n-1)\sum _{i=1}^{n-1} y_i^2 = (n-1)(a_{n-1}^2 - 2a_{n-2} - y^2), \]

or

\[ y^2 + \frac{2a_{n-1}}{n}y + \frac{2(n-1)}{n}a_{n-2} - \frac{n-2}{n}a_{n-1}^2 \le 0. \]

Thus \(y\) (and hence all \(y_i\)) lie between the two roots of the quadratic function, and these roots are our bounds.

Theorem 20.6
#

Let \(f(x)\) be a real polynomial of degree \(n \ge 2\) with only real roots, such that \(f(x){\gt} 0\) for \( -1 {\lt} x {\lt} 1\) amd \(f(-1) = f(1) = 0\). Then

\[ \frac{2}{3}T \le A \le \frac{2}{3}R, \]

and equality holds in both cases only for \(n=2\).

Proof

Proof of \(\frac{2}{3}T \le A\). Since \(f(x)\) has only real roots, and none of them in the open interval \((-1,1)\), it can be written (apart from a constant positive factor which cancels out) in the form

\[ f(x) = (1-x^2)\prod _i (\alpha _i - x)\prod _j (\beta _j + x) \]

with \(\alpha _i \ge 1\), \(\beta _j \ge 1\). Hence \(A = \int _{-1}^{1} f(x)\, dx\).

By making the substitution \(x \to -x\), we find that also \(A = \int _{-1}^{1} (1-x^2)\prod _i(\alpha _i + x)\prod _j(\beta _j - x)\, dx\), and hence by the inequality of the arithmetic and the geometric mean (note that all factors are \(\ge 0\)):

\begin{align*} A & = \int _{-1}^{1} \frac{1}{2}\left[(1-x^2)\prod (\alpha _i - x)\prod (\beta _j + x) + (1-x^2)\prod (\alpha _i + x)\prod (\beta _j - x)\right] dx \\ & \ge \int _{-1}^{1} (1-x^2)\left[\prod (\alpha _i^2 - x^2)\prod (\beta _j^2 - x^2)\right]^{1/2} dx \\ & \ge \int _{-1}^{1} (1-x^2)\left[\prod (\alpha _i^2 - 1)\prod (\beta _j^2 - 1)\right]^{1/2} dx \\ & = \frac{4}{3}\left[\prod (\alpha _i^2 - 1)\prod (\beta _j^2 - 1)\right]^{1/2}. \end{align*}

Computing \(f'(1)\) and \(f'(-1)\) from the product form, we find \(f'(1) = -2\prod (\alpha _i - 1)\prod (\beta _j + 1)\) and \(f'(-1) = 2\prod (\alpha _i + 1)\prod (\beta _j - 1)\), hence \(-f'(1)f'(-1) = 4\prod (\alpha _i^2-1)\prod (\beta _j^2-1)\), so

\[ A \ge \frac{2}{3}(-f'(1)f'(-1))^{1/2}. \]

Applying the inequality of the harmonic and geometric mean to \(-f'(1)\) and \(f'(-1)\), we arrive by formula (2) for \(T\) at

\[ A \ge \frac{2}{3}\cdot \frac{2}{\frac{1}{-f'(1)} + \frac{1}{f'(-1)}} = \frac{4}{3}\cdot \frac{f'(1)f'(-1)}{f'(1)-f'(-1)} = \frac{2}{3}T. \]

The inequality \(A \le \frac{2}{3}R\): The book notes “The reader is invited to search for an equally inspired proof of the second inequality in Theorem 2.” This half is not formalized in Lean.

Theorem 20.7
#

Suppose \(G\) is a graph on \(n\) vertices without triangles. Then \(G\) has at most \(\frac{n^2}{4}\) edges, and equality holds only when \(n\) is even and \(G\) is the complete bipartite graph \(K_{n/2, n/2}\).

Proof

This proof, using Cauchy’s inequality, is due to Mantel. Let \(V = \{ 1, \dots , n\} \) be the vertex set and \(E\) the edge set of \(G\). By \(d_i\) we denote the degree of \(i\), hence \(\sum _{i \in V} d_i = 2|E|\) (see chapter 28). Suppose \(ij\) is an edge. Since \(G\) has no triangles, we find \(d_i + d_j \leq n\) since no vertex is a neighbor of both \(i\) and \(j\).

It follows that

\[ \sum _{ij \in E} (d_i + d_j) \leq n|E|. \]

Note that \(d_i\) appears exactly \(d_i\) times in the sum, so we get

\[ n|E| \geq \sum _{ij \in E} (d_i + d_j) = \sum _{i \in V} d_i^2, \]

and hence with Cauchy’s inequality applied to the vectors \((d_1, \dots , d_n)\) and \((1, \dots , 1)\),

\[ n|E| \geq \sum _{i \in V} d_i^2 \geq \frac{\left( \sum d_i \right)^2}{n} = \frac{4|E|^2}{n}, \]

and the result follows. In the case of equality we find \(d_i = d_j\) for all \(i, j\), and further \(d_i = \frac{n}{2}\) (since \(d_i + d_j = n\)). Since \(G\) is triangle-free, \(G = K_{n/2, n/2}\) is immediately seen from this.

Theorem 20.8
#

Suppose \(G\) is a graph on \(n\) vertices without triangles. Then \(G\) has at most \(\frac{n^2}{4}\) edges, and equality holds only when \(n\) is even and \(G\) is the complete bipartite graph \(K_{n/2, n/2}\).

Proof

The following proof of Theorem 3, using the inequality of the arithmetic and the geometric mean, is a folklore Book Proof. Let \(\alpha \) be the size of a largest independent set \(A\), and set \(\beta = n - \alpha \). Since \(G\) is triangle-free, the neighbors of a vertex \(i\) form an independent set, and we infer \(d_i \le \alpha \) for all \(i\).

The set \(B = V \setminus A\) of size \(\beta \) meets every edge of \(G\). Counting the edges of \(G\) according to their endvertices in \(B\), we obtain \(|E| \le \sum _{i \in B} d_i\). The inequality of the arithmetic and geometric mean now yields

\[ |E| \le \sum _{i \in B} d_i \le \alpha \beta \le \left(\frac{\alpha + \beta }{2}\right)^2 = \frac{n^2}{4}, \]

and again the case of equality is easily dealt with.