The Cauchy-Schwarz and Triangle Inequalities

# The Cauchy-Schwarz and Triangle Inequalities

One of the most important inequalities in mathematics is inarguably the famous Cauchy-Schwarz inequality whose use appears in many important proofs. We will prove this important inequality and prove an analogue of the triangle inequality in higher dimension Euclidean $n$-space.

## The Cauchy-Schwarz Inequality

 Theorem 1 (The Cauchy-Schwarz Inequality): If $\mathbf{x} = (x_1, x_2, ..., x_n), \mathbf{y} = (y_1, y_2, ..., y_n) \in \mathbb{R}^n$ then $(\mathbf{x} \cdot \mathbf{y})^2 \leq \| \mathbf{x} \|^2 \| \mathbf{y} \|^2$.
• Proof: Let $\mathbf{x}, \mathbf{y} \in \mathbb{R}^n$. Then we want to prove that:
(1)
\begin{align} \quad ( \mathbf{x} \cdot \mathbf{y} )^2 = \left ( \sum_{i=1}^{n} x_iy_i \right)^2 \leq \left ( \sum_{i=1}^{n} x_i^2 \right ) \left ( \sum_{i=1}^{n} y_i^2 \right ) = \| \mathbf{x} \|^2 \| \mathbf{y} \|^2 \quad (*) \end{align}
• Notice that the sum of squares is always nonnegative, and so for all $t \in \mathbb{R}$ we have that:
(2)
\begin{align} \quad 0 \leq \sum_{i=1}^{n} (x_it + y_i)^2 = \sum_{i=1}^{n} (x_i^2 t^2 + 2x_iy_it + y_i^2) = \sum_{i=1}^{n} x_i^2 t^2 + \sum_{i=1}^{n} 2x_iy_i t + \sum_{i=1}^{n} y_i^2 \end{align}
• Let $\displaystyle{A = \sum_{i=1}^{n} x_i^2}$, $\displaystyle{B = \sum_{i=1}^{n} x_iy_i}$, and $\displaystyle{C = \sum_{i=1}^{n} y_i^2}$. Then:
(3)
\begin{align} \quad 0 \leq At^2 + 2Bt + C \end{align}
• Suppose that $A = 0$. Then $(*)$ reduces to $0 \leq 0$ which is true. If $A > 0$, then let $t = -\frac{B}{A}$. Then:
(4)
\begin{align} \quad 0 \leq A \left ( \frac{-B}{A} \right)^2 + 2B \left(\frac{-B}{A} \right ) + C = \frac{B^2}{A} - \frac{2B^2}{A} + C = - \frac{B^2}{A} + C \end{align}
• Therefore we have that:
(5)
\begin{align} \quad 0 \leq -\frac{B^2}{A} + C \\ \quad 0 \leq -B^2 + AC \\ \quad B^2 \leq AC \\ \quad \left ( \sum_{i=1}^{n} x_iy_i \right )^2 \leq \left ( \sum_{i=1}^{n} x_i^2 \right ) \left ( \sum_{i=1}^{n} y_i^2 \right ) \\ \quad (\mathbf{x} \cdot \mathbf{y})^2 \leq \| \mathbf{x} \|^2 \| \mathbf{y} \|^2 \quad \blacksquare \end{align}

Often times the Cauchy-Schwarz inequality is stated by squaring both sides of the inequality above:

(6)
\begin{align} \quad \mid \mathbf{x} \cdot \mathbf{y} | \leq \| \mathbf{x} \| \| \mathbf{y} \| \end{align}

## The Triangle Inequality

 Theorem 2 (The Triangle Inequality): If $\mathbf{x} = (x_1, x_2, ..., x_n), \mathbf{y} = (y_1, y_2, ..., y_n) \in \mathbb{R}^n$ then $\| \mathbf{x} + \mathbf{y} \| \leq \| \mathbf{x} \| + \| \mathbf{y} \|$.
• Proof: Let $\mathbf{x}, \mathbf{y} \in \mathbb{R}^n$. Then:
(7)
\begin{align} \quad \| \mathbf{x} + \mathbf{y} \| = \| (x_1 + y_1, x_2 + y_2, ..., x_n + y_n) \| = \left ( \sum_{i=1}^{n} (x_i + y_i)^2 \right )^{1/2} \end{align}
• Square both sides of the equation and apply the Cauchy-Schwarz inequality at $(*)$ to get:
(8)
\begin{align} \quad \| \mathbf{x} + \mathbf{y} \|^2 = \sum_{i=1}^{n} (x_i + y_i)^2 \\ \quad \| \mathbf{x} + \mathbf{y} \|^2 = (x_1 + y_1)^2 + (x_2 + y_2)^2 + ... + (x_n + y_n)^2 \\ \quad \| \mathbf{x} + \mathbf{y} \|^2 = (x_1^2 + 2x_1y_1 + y_1^2) + (x_2^2 + 2x_2y_2 + y_2^2) + ... + (x_n^2 + 2x_ny_n + y_n^2) \\ \quad \| \mathbf{x} + \mathbf{y} \|^2 = (x_1^2 + x_2^2 + ... + x_n^2) + 2(x_1y_1 + x_2y_2 + ... + x_ny_n) + (y_1^2 + y_2^2 + ... + y_n^2) \\ \quad \| \mathbf{x} + \mathbf{y} \|^2 = \| \mathbf{x} \|^2 + 2 (\mathbf{x} \cdot \mathbf{y}) + \| \mathbf{y} \|^2 \\ \quad \| \mathbf{x} + \mathbf{y} \|^2 \overset{(*)} \leq \| \mathbf{x} \|^2 + 2 \| \mathbf{x} \| \| \mathbf{y} \| + \| \mathbf{y} \|^2 \\ \quad \| \mathbf{x} + \mathbf{y} \|^2 \leq (\| \mathbf{x} \| + \| \mathbf{y} \|)^2 \end{align}
• Square rooting both sides of the inequality above yields $\| \mathbf{x} + \mathbf{y} \| \leq \| \mathbf{x} \| + \| \mathbf{y} \|$ as desired. $\blacksquare$