Short simple proof of the Cauchy-Schwarz inequality

Proposed answer to the following question(s):

In my opinion, the following proof is the shortest, simplest and best proof of the Cauchy-Schwarz inequality. It is a proof developed in The Cauchy-Schwarz Master Class: An Introduction to the Art of Mathematical Inequalities [1]. Below are three variations of the proof at three increasing levels of abstraction. These three variations are expressed respectively in terms of:

  • random variables [2]
  • vectors of any real inner product space [1]
  • vectors of any inner product space (real or complex) [3]

The Cauchy-Schwarz inequality was originally expressed in terms of sequences of numbers [1]. The continuous analogue is in terms of two integrable functions [4].

In terms of random variables

Given any two random variables \(X\) and \(Y\), \[\begin{equation*} {\operatorname{E}\mathchoice{\!\left[{ XY}\right]}{[{ XY}]}{[{ XY}]}{[{ XY}]}}^2 \le {\operatorname{E}\mathchoice{\!\left[{ X^2}\right]}{[{ X^2}]}{[{ X^2}]}{[{ X^2}]}} {\operatorname{E}\mathchoice{\!\left[{ Y^2}\right]}{[{ Y^2}]}{[{ Y^2}]}{[{ Y^2}]}} \end{equation*}\] with equality holding iff \(a X + b Y = 0\) for some constants \(a\) and \(b\), at least one non-zero (i.e. \(X\) and \(Y\) are linearly dependent).

Proof

If either \({\operatorname{E}\mathchoice{\!\left[{ X^2}\right]}{[{ X^2}]}{[{ X^2}]}{[{ X^2}]}} = 0\) or \({\operatorname{E}\mathchoice{\!\left[{ Y^2}\right]}{[{ Y^2}]}{[{ Y^2}]}{[{ Y^2}]}} = 0\) then \({\operatorname{E}\mathchoice{\!\left[{ XY}\right]}{[{ XY}]}{[{ XY}]}{[{ XY}]}} = 0\). Otherwise define \[ \hat{X} := \frac{X}{ \sqrt{{\operatorname{E}\mathchoice{\!\left[{ X^2}\right]}{[{ X^2}]}{[{ X^2}]}{[{ X^2}]}}} } \; \mbox{ and } \; \hat{Y} := \frac{Y}{ \sqrt{{\operatorname{E}\mathchoice{\!\left[{ Y^2}\right]}{[{ Y^2}]}{[{ Y^2}]}{[{ Y^2}]}}} } \] for which \({\operatorname{E}\mathchoice{\!\left[{ \hat{X}^2}\right]}{[{ \hat{X}^2}]}{[{ \hat{X}^2}]}{[{ \hat{X}^2}]}} = {\operatorname{E}\mathchoice{\!\left[{ \hat{Y}^2}\right]}{[{ \hat{Y}^2}]}{[{ \hat{Y}^2}]}{[{ \hat{Y}^2}]}} = 1\). The proof follows from the product of two numbers always being less than or equal to the average of their squares \[\begin{eqnarray*} 0 & \le & {\operatorname{E}\mathchoice{\!\left[{ (\hat{X} - \hat{Y})^2 }\right]}{[{ (\hat{X} - \hat{Y})^2 }]}{[{ (\hat{X} - \hat{Y})^2 }]}{[{ (\hat{X} - \hat{Y})^2 }]}} \\ {\operatorname{E}\mathchoice{\!\left[{ \hat{X} \hat{Y} }\right]}{[{ \hat{X} \hat{Y} }]}{[{ \hat{X} \hat{Y} }]}{[{ \hat{X} \hat{Y} }]}} & \le & {\operatorname{E}\mathchoice{\!\left[{ \frac{ \hat{X}^2 + \hat{Y}^2 }{2} }\right]}{[{ \frac{ \hat{X}^2 + \hat{Y}^2 }{2} }]}{[{ \frac{ \hat{X}^2 + \hat{Y}^2 }{2} }]}{[{ \frac{ \hat{X}^2 + \hat{Y}^2 }{2} }]}} \\ \frac{{\operatorname{E}\mathchoice{\!\left[{ XY}\right]}{[{ XY}]}{[{ XY}]}{[{ XY}]}}}{ \sqrt{{\operatorname{E}\mathchoice{\!\left[{ X^2}\right]}{[{ X^2}]}{[{ X^2}]}{[{ X^2}]}}} \sqrt{{\operatorname{E}\mathchoice{\!\left[{ Y^2}\right]}{[{ Y^2}]}{[{ Y^2}]}{[{ Y^2}]}}} } & \le & \frac{1+1}{2} \\ {\operatorname{E}\mathchoice{\!\left[{ XY}\right]}{[{ XY}]}{[{ XY}]}{[{ XY}]}}^2 & \le & {\operatorname{E}\mathchoice{\!\left[{ X^2}\right]}{[{ X^2}]}{[{ X^2}]}{[{ X^2}]}} {\operatorname{E}\mathchoice{\!\left[{ Y^2}\right]}{[{ Y^2}]}{[{ Y^2}]}{[{ Y^2}]}} \end{eqnarray*}\] If both sides of the inequality are equal, linear dependence follows since either \(X = 0\) or \(Y = 0\) or \[ \frac{1}{\sqrt{{\operatorname{E}\mathchoice{\!\left[{ X^2}\right]}{[{ X^2}]}{[{ X^2}]}{[{ X^2}]}}}} X + \frac{1}{\sqrt{{\operatorname{E}\mathchoice{\!\left[{ Y^2}\right]}{[{ Y^2}]}{[{ Y^2}]}{[{ Y^2}]}}}} Y = \hat{X} - \hat{Y} = 0 \] If \(X\) and \(Y\) are linearly dependent, either \(X = k Y\) or \(Y = k X\) for some constant \(k\), either way both sides of the inequality are equal.

QED

In terms of vectors of a real inner product space

The probabilistic proof can be generalized to any real inner product space as shown in [1].

Given any vectors \(x, y\) from a real inner product space, the Cauchy-Schwarz inequality is \[\begin{equation*} \left\langle{ x}, { y}\right\rangle \le \left\|{ x}\right\| \left\|{ y}\right\| \end{equation*}\] with equality holding iff \(x\) and \(y\) are linearly dependent.

Proof

If either \(\left\|{ x}\right\| = 0\) or \(\left\|{ y}\right\| = 0\) then \(\left\langle{ x}, { y}\right\rangle = 0\). Otherwise define \[ \hat{x} := \frac{x}{ \left\|{ x}\right\| } \; \mbox{ and } \; \hat{y} := \frac{y}{ \left\|{ y}\right\| } \] for which \(\left\|{ \hat{x}}\right\| = \left\|{ \hat{y}}\right\| = 1\). \[\begin{eqnarray*} 0 & \le & \left\langle{ \hat{x} - \hat{y}}, { \hat{x} - \hat{y}}\right\rangle \\ 2 \left\langle{ \hat{x}}, { \hat{y}}\right\rangle & \le & \left\langle{ \hat{x}}, { \hat{x}}\right\rangle + \left\langle{ \hat{y}}, { \hat{y}}\right\rangle \\ 2 \; \frac{ \left\langle{ x}, { y}\right\rangle }{ \left\|{ x}\right\| \left\|{ y}\right\| } & \le & 1+1 \\ \left\langle{ x}, { y}\right\rangle & \le & \left\|{ x}\right\| \left\|{ y}\right\| \end{eqnarray*}\] If both sides of the inequality are equal, linear dependence follows since either \(x = \vec{0}\) or \(y = \vec{0}\) or \[ \frac{1}{\left\|{ x}\right\|} x + \frac{1}{\left\|{ y}\right\|} y = \hat{x} - \hat{y} = \vec{0} \] If \(x\) and \(y\) are linearly dependent, either \(x = \lambda y\) or \(y = \lambda x\) for some scaler \(\lambda\), either way both sides of the inequality are equal.

QED

In terms of vectors of an inner product space

This section considers the Cauchy-Schwarz inequality for vectors of a real or complex inner product space.

The proof for real inner produce spaces does not work for complex inner product spaces because \(\left\langle{ y}, { x}\right\rangle = \overline{\left\langle{ x}, { y}\right\rangle}\) (complex conjugate).

The proof is effectively the same as the previous proof for real inner product spaces. But the normalized vectors \(\hat{x}\) and \(\hat{y}\) must be “rotated” in the complex plane so that both sides of the inequality remain real. This rotation will be done via a multiplier \(\alpha\).

Proof

Let \(\hat{x}\) and \(\hat{y}\) be defined as in the proof for real inner product spaces. If \(\left\langle{ \hat{x}}, { \hat{y}}\right\rangle = 0\) the inequality holds, otherwise let \[ \alpha := \sqrt{ \frac{\left\langle{ \hat{y}}, { \hat{x}}\right\rangle}{\left|{ \left\langle{ \hat{x}}, { \hat{y}}\right\rangle}\right|} } \] for which the following convenient properties hold \[ \alpha \overline{\alpha} = 1 = \overline{\alpha} \alpha \] \[ \alpha^2 \left\langle{ \hat{x}}, { \hat{y}}\right\rangle = \frac{\left\langle{ \hat{y}}, { \hat{x}}\right\rangle\left\langle{ \hat{x}}, { \hat{y}}\right\rangle}{\left|{ \left\langle{ \hat{x}}, { \hat{y}}\right\rangle}\right|} = \frac{\left|{ \left\langle{ \hat{x}}, { \hat{y}}\right\rangle}\right|^2}{\left|{ \left\langle{ \hat{x}}, { \hat{y}}\right\rangle}\right|} = \left|{ \left\langle{ \hat{x}}, { \hat{y}}\right\rangle}\right| = \overline{\alpha}^2 \left\langle{ \hat{y}}, { \hat{x}}\right\rangle \]

The proof proceeds like with a real inner product space but using \(\alpha\), \[\begin{eqnarray*} 0 & \le & \left\langle{ \alpha \hat{x} - \overline{\alpha} \hat{y}}, { \alpha \hat{x} - \overline{\alpha} \hat{y}}\right\rangle \\ & = & \alpha \overline{\alpha} \left\langle{ \hat{x}}, { \hat{x}}\right\rangle - \alpha^2 \left\langle{ \hat{x}}, { \hat{y}}\right\rangle - \overline{\alpha}^2 \left\langle{ \hat{y}}, { \hat{x}}\right\rangle + \overline{\alpha} \alpha \left\langle{ \hat{y}}, { \hat{y}}\right\rangle \\ 2 \left|{ \left\langle{ \hat{x}}, { \hat{y}}\right\rangle}\right| & \le & \left\langle{ \hat{x}}, { \hat{x}}\right\rangle + \left\langle{ \hat{y}}, { \hat{y}}\right\rangle \\ 2 \; \frac{ \left|{ \left\langle{ x}, { y}\right\rangle}\right| }{ \left\|{ x}\right\| \left\|{ y}\right\| } & \le & 1+1 \\ \left|{ \left\langle{ x}, { y}\right\rangle}\right| & \le & \left\|{ x}\right\| \left\|{ y}\right\| \end{eqnarray*}\] If both sides of the inequality are equal, linear dependence follows since either \(x = \vec{0}\) or \(y = \vec{0}\) or \[ \frac{\alpha}{\left\|{ x}\right\|} x + \frac{\overline{\alpha}}{\left\|{ y}\right\|} y = \alpha \hat{x} - \overline{\alpha} \hat{y} = \vec{0} \] If \(x\) and \(y\) are linearly dependent, either \(x = \lambda y\) or \(y = \lambda x\) for some scaler \(\lambda\), either way both sides of the inequality are equal.

QED

References

1. Steele JM (2004) The Cauchy-Schwarz master class: An introduction to the art of mathematical inequalities. Cambridge University Press, Cambridge ; New York

2. DeGroot MH, Schervish MJ (2002) Probability and statistics, 3rd ed. Addison-Wesley, Boston

3. Wikipedia contributors (2021) Cauchy–schwarz inequality — Wikipedia, the free encyclopedia

4. Weisstein EW Schwarz’s inequality. From mathworld–a wolfram web resource.