Home » Blog » Prove an if and only if condition for equality in the Cauchy-Schwarz inequality

Prove an if and only if condition for equality in the Cauchy-Schwarz inequality

Recall the Cauchy-Schwarz inequality,

For arbitrary real numbers a_1, \ldots, a_n and b_1, \ldots, b_n we have

    \[ \left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right) \]

The claim is then that the equality sign holds if and only if there is a real number x such that a_k x + b = 0 for each k =1, \ldots, n.


Proof. (\Rightarrow) If a_k = 0 for all k, then equality clearly holds. Assume then that a_k \neq 0 for at least one k.

    \[ \left( \sum_{k=1}^n a_k b_k \right)^2 = \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right). \]

Then, considering the equation \sum_{k=1}^n (a_k x + b_k)^2 \geq 0 and defining,

    \[ A = \sum_{k=1}^n a_k^2, \qquad B = \sum_{k=1}^n b_k a_k, \qquad C = \sum_{k=1}^n b_k^2. \]

We have,

    \[ Ax^2 + 2Bx + C \geq 0 \ \implies \ x = \frac{-2B \pm \sqrt{4B^2 - 4AC}}{2A} = \frac{-B \pm \sqrt{B^2 - AC}}{A}. \]

But, since we know B^2 = AC (by assumption), we have x = -\frac{B}{A} which is in \mathbb{R} (since A \neq 0 since a_k \neq 0 for at least one k and each term a_k^2 in nonnegative, so the sum is strictly positive).
(\Leftarrow) Assume there exists x \in \mathbb{R} such that a_k x + b_k =0 for each k =1, \ldots, n. Then, a_k x + b_k = 0 \implies b_k = (-x)a_k. So,

    \begin{align*}  \left( \sum_{k=1}^n a_k b_k \right)^2 &= \left( -x \left(\sum_{k=1}^n a_k^2 \right) \right)^2 \\ &= x^2 \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n a_k^2 \right) \\ &= \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n x^2 a_k^2 \right) \\ &= \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n (-xa_k)^2 \right) \\ &= \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right). \qquad \blacksquare \end{align*}

2 comments

  1. Anonymous says:

    The forward implication is actually false. Consider 0 as the a-sequence and 9 as the b-sequence. Then the equality holds but there is no real x which will make ax + b = b = 9 = 0 true.

    • nu creation says:

      I think it might be a mistake in the book. Because the proof technique in the second implication would still work if there is a y s.t. ak + ybk =0.. this would also imply the Cauchy-Schwartz equality which means there’s something’s wrong with the only if since having such an x isn’t the only way to arrive at the equality. Notice if we change the statement to include the bit about the y, his forward implication is true… If sequence a is all zeros, there exists a y st ak + ybk= 0 namely y=0. So make the iff statement require either there is such an x or there is such a y.

Point out an error, ask a question, offer an alternative solution (to use Latex type [latexpage] at the top of your comment):