I was watching a Khan Academy video on the Cauchy-Schwarz Inequality, and I just can't seem to understand the proof, and the comments on the video don't seem to help. The video is here.

First, he creates an artificial function: $$ p(t)=||t\vec{y}-\vec{x}||^2\geq0 $$

What is the motivation behind this function? What does it mean?

Next, after substituting in the dot product of $t\vec{y}-\vec{x}$ with itself, he obtains: $$ p(t)=(\vec{y}\cdot\vec{y})t^2-2(\vec{x}\cdot\vec{y})t+\vec{x}\cdot\vec{x} \geq 0\\a\equiv(\vec{y}\cdot\vec{y})\\b\equiv2(\vec{x}\cdot\vec{y})\\c\equiv\vec{x}\cdot\vec{x}\\p(t)=at^2-bt+c \geq 0 $$

I get this part, but it's the next part that confuses me; he chooses $t=\frac{b}{2a}$. Why choose that particular value for t? At first I thought that it had something to do with minimizing the value of the function, but then I realized that it's not $-\frac{b}{2a}$; which further confuses me as for the significance of the chosen value.

I'm currently a high school student taking AP Calculus trying to study linear algebra on my own, so if it's not too much trouble, please dumb things down for me a bit.

  • 5
    $\begingroup$ It does minimise the value. Watch the signs. $\endgroup$ Feb 20, 2014 at 22:48
  • 1
    $\begingroup$ The maximum or minimum of a quadratic $Ax^2+Bx+C$ occurs at $-\frac{B}{2A}$. In this case, $A=a$ and $B=-b$. $\endgroup$
    – crf
    Feb 20, 2014 at 22:50
  • $\begingroup$ Ah, I missed the negative sign. But what is the motivation behind minimizing the function, versus choosing some random other value (e.g. a)? $\endgroup$
    – untitled
    Feb 20, 2014 at 22:51
  • 2
    $\begingroup$ Geometrically, you are finding the point on the line $l=\{ t\vec{y} : t\in\mathbb{R}\}$ which is closest to $\vec{x}$. That point $(b/2a)\vec{y}$ is the orthogonal projection of $\vec{x}$ on the line. Then you end up with an inequality $\|(b/2a)\vec{y}-\vec{x}\|^{2} \ge 0$; equality occurs iff $\vec{x}$ is a scalar multiple of $\vec{y}$ (i.e., iff $\vec{x}$ is on the line $l$.) Draw a picture. $\endgroup$ Feb 20, 2014 at 23:02
  • $\begingroup$ Here's a related thread with several different proofs of Cauchy-Schwarz. math.stackexchange.com/questions/436559/… $\endgroup$
    – littleO
    Feb 20, 2014 at 23:22

1 Answer 1


Sal's proof here works by constructing this function $p(t)$, showing that $p(t)\geq 0$ everywhere, and then using that fact to bound the coefficients of $p$, which thankfully yields the Cauchy-Schwarz inequality. So once he establishes that $p(t)\geq 0$ for all $t$ and shows that $p(t)=at^2-bt+c$ for appropriate choices of $a, b,$ and $c$, the next step is to use this to get information about the coefficients $a,b,c$. Now, it is clear that different choices of $t$ will give us different information about the coefficients—choosing $t=10^{50}$ gives us

$$(\mathbf{y}\cdot\mathbf{y})10^{100}-2(\mathbf{x}\cdot\mathbf{y})10^{50}+(\mathbf{x}\cdot\mathbf{x})\geq 0$$

which is certainly true, but fairly obvious and hardly helpful. In order to exploit the $p(t)\geq 0$ inequality in a useful way, it makes sense to choose $t$ which makes $p(t)$ as small as possible; this will give us the sharpest bound and thus, in a sense, the most information about the coefficients. And information about the coefficients is what we are looking for. So we choose $t$ which minimizes $p(t)$ which is, of course, $b/(2a)$.

I prefer a slightly different approach which uses the same function and essentially works the same. Define this same function $p(t)$, so we get $$ \begin{align} p(t) &= \left\Vert t\mathbf{y}-\mathbf{x}\right\Vert^2 \\ &=(t\mathbf{y}-\mathbf{x})\cdot (t\mathbf{y}-\mathbf{x})\\ &=(\mathbf{y}\cdot\mathbf{y})t^2-2(\mathbf{x}\cdot\mathbf{y})t+(\mathbf{x}\cdot\mathbf{x}) \\&\geq 0 \end{align} $$

This is a quadratic polynomial in $t$ which has at most one real root (can you see why?). As you'll recall from your grade 11 algebra class, a quadratic has at most one real root if the discriminant is 0 or negative, so we obtain


  • $\begingroup$ Thanks for the explanation! Can you clarify what the p(t) equation means or the logic behind constructing it? It seems to me that it was just pulled out of thin air right now. $\endgroup$
    – untitled
    Feb 21, 2014 at 0:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .